On Thu, 30 Sep 2004 [EMAIL PROTECTED] wrote:

The SMPP specification says that optional parameters have the format
* Parameter Tag
* Length
* Value

OK, so that helps. So the three things we need to be able to pass are a parameter tag (0x1402?), length (2 octets), and a value (0x0001).

For defined parameters we should use the name of the tag and map that
internally. For other parameters we would have to specify also the type of
the parameter...

A key design goal of kannel (as I understood it) is to abstract the details
of the operator connections (each one may use a different protocol). So
sending special parameters for a specific protocol and operator should be
defined in the configuration file and not in individual requests where the
smsbox has no knowledge about the connection that will be used.

That helps me. So let's say in the config, I want kannel to, every time an MO comes in, give me one or more non-standard pieces of the PDU in a format I can use:

 smsc = smpp
 smsc_id = supersms
 pass-param = 0x1402:2,%n,myparam1
 pass-param = 0x1404:4,%p,myparam2
 [...]

 Now when I do a "get-url" or something, I can do:

    http://x/foo.php?to=%t&from=%f&myparam1=%n&myparam2=%p

 and %n will be the value of the PDU starting at 0x1402, and having 2
 octets in length, and %p will contain the 4 octets starting at 0x1404.

 When I submit an SMS to the gateway, I use myparam1 and myparam2, and the
 system will automatically check if they are set correctly (expected
 format) and set the PDU accordingly.

Thoughts on that?  I'm sure the config option could be cleaned up, but this
would allow me to do anything I wanted to the PDU in the config.  I
definitely agree with Andreas -- this should go in the config, not per SMS.

Beckman
---------------------------------------------------------------------------
Peter Beckman                                                  Internet Guy
[EMAIL PROTECTED]                             http://www.purplecow.com/
---------------------------------------------------------------------------



Reply via email to