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

> So I posted this yesterday, and got a response (thanks Paul Keogh!):
> 
>      Subject: [Kannel-Users] Re: Unknown TLV -- How to extract?
> 
>      > SMPP: Unknown TLV(0x1402,0x0004,22312200) for PDU type (deliver_sm)

The parameter tag 0x1402 is not part of the SMPP 3.4 specification. So we
can only try to guess the type of the value. The actual kannel version
declares the TLV with their types in smpp_pdu.def as TLV_INTEGER,
TLV_OCTETS,...

>      > received!
>      >
>      > Great!  There it is, just waiting for me.  The question is, on an
>      > sms-service get-url, how do I pass this information to my PHP
> script?
> 
>      You'll need to write code to;
> 
>      1. Capture the TLV value in the SMPP driver and hold it somewhere in
> the
>      Msg struct by either overloading an existing field or adding a new
> field.
> 
>      2. Expose the same value in the Msg struct to the send SMS service
> code
>      in the SMS Box (smsbox.c) so that the value is passed in the HTTP
> session
>      as a CGI param, POST body, XML element, your choice.
> 
> And I started thinking that there are probably a lot of people who need to
> do just that -- write extra code to grab or set certain parts of the PDU
> for carrier or aggregator specific data.
> 
> Since, and I believe wisely, the leaders of Kannel don't want to add
> specific carrier or aggregator code to Kannel.  So let's abstract it.
> 
> For submitting SMS's via sendsms CGI, let's add some new fields.  Here is
> my initial proposal, not knowing squat about PDU's:
> 
>      user=foo
>      pass=bar
>      to=17035551212
>      from=12345
>      text=hey+there+buddy
>      k1=0x1402
>      v1=0x0001
>      k2=0x1405
>      v2=0x0035

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...

> 
> What does this do?  It allows me to set several (1 to n) specific PDU
> modifications via the web interface, without having to muck with the
> proposed modified kannel code-base.  Now, I'm assuming 0x1402 is an
> offset,
> and thus by defining the value as a dual octet or longer, you decide how
> much data you are updating in the PDU.  And probably the PDU should be
> created, and then modified by each k(n)/v(n) pair after its creation.
> 
> On the flip side, add some %k1 and %v1 tags to the URL for sms-service...
> 
> get-url =
>
"http://4.3.2.1/smsin.php?from=%p&to=%P&text=%a&smsc=%i&coding=%c&k1=0x1402&v1=%v1";
> 
> 
> Now what I don't know is if I have to give a length?  i.e. 2 octets
> please,
> starting at 0x1402.  If so, just add a colon after the offset to outline
> how many octets to pass to %v1:
> 
>      ...&coding=%c&k1=0x1402:2&v1=%v1
> 
> and after processing, %v1 would be 0x0035 (or whatever the value was).
> 
> My motivation here is to allow me to screw with the PDU at a deeper level,
> so that I can do some really cool stuff and write code in whatever
> language
> I want to help me deal with stupid non-standard SMPP requirements that
> seem
> to be different with each carrier/aggregator.

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.

> 
> Thoughts?  Has this been proposed and shot down?
> 
> Beckman
>
---------------------------------------------------------------------------
> Peter Beckman                                                  Internet
> Guy
> [EMAIL PROTECTED]                            
> http://www.purplecow.com/
>
---------------------------------------------------------------------------
> 

-- 
Andreas W.

+++ GMX DSL Premiumtarife 3 Monate gratis* + WLAN-Router 0,- EUR* +++
Clevere DSL-Nutzer wechseln jetzt zu GMX: http://www.gmx.net/de/go/dsl


Reply via email to