MobiLink Server-Initiated Synchronization User's Guide
Setting Up Server-Initiated Synchronization
The recommended filters are called subject and content. However, there are three other types of filter that you may also want to use.
The Listener translates non-printable characters in a message to a tilde (~) so if there are non-printable characters, the filter must also use tildes.
compares the entire message to text you specify. To match, this filter must also be the exact same length as the message. You can specify only one message per message handler.
The format of messages is carrier-dependent, and you must account for this if you use the message, message_start, or sender filters. For example, you may want to match a message from a sender named Bob@mail.com with the subject Help and the message Me. In UDP, this would appear as [Help]Me. On Bell Mobility's e-mail to SMS conversion service, it would be Bob@mail.com[Help]Me. On Fido's e-mail to SMS conversion service, it would arrive as Bob@mail.com\n(Help)\nMe, but would be translated by the Listener to Bob@mail.com~(Help)~Me. You must test with your carrier to determine the appropriate format, using the dblsn options -v and -m.
message_start
compares a portion of the message (from the beginning) to text that you specify. When you specify message_start, the Listener creates the action variables $message_start and $message_end. For more information, see Action variables. There is a maximum of one message_start per message handler.
sender
is the sender of the message. You can only specify one sender per message handler. For UDP gateways, the sender is the IP address of the host of the gateway. For SMS e-mail, the sender is the e-mail address embedded in the beginning of the message if the SMS format is compatible with server-initiated synchronization. Otherwise, the sender information is not available.
Subject and content are the recommended filters when messages arrive in a compatible format. However, if your message format is incompatible, you need to use the message, message_start, and/or sender filters. In that case, if the delivery path can vary (sometimes through UDP and sometimes through SMTP), then you need multiple handlers with different filters.
For example, if you sent a message of the form sub, content through a UDP gateway, it would arrive as [sub]content. But if you sent it through an SMTP gateway, it might be rendered as mySender@mySite.com \n sub \n content. To catch a message that has the subject sub, you would need two message handlers, with the following filters:
-l "subject='sub';action=..."
-l "message_start='mySender@mySite.com ~ sub ~ ';action=..."
For more information about the Listener, see The Listener.
SQL Anywhere Studio 9.0.2
Copyright © 1989–2004 Sybase, Inc. Portions copyright © 2001–2004 iAnywhere Solutions, Inc. All rights reserved.