On Tue, 25 Nov 2003, Johann Vincent Paul de Ungria Tagle wrote:
> This is with regard to the xser type 0c for billing.
> 
> The way I understand it, for "push" messages, we can use binfo of the 
> HTTP interface.  


'binfo' is available in the CVS version (for emi2/sendsms).  it is not
there using 1.2.1.


> But in sending responses to MO messages, how can this
> field be sent back to the SMSC?

havent used the CVS version, but if there is no 'binfo' parameter
per keyword sms-service definition in kannel.conf, then
a workaround is to let your webserver do the reply by sending a 
'push message' which allows you access to the 'binfo' field =)

the dirtier path (which i took) is to hardcode and use the patch below
(against 1.2.1 smsc_emi2.c) to *always* send the billing identifier
block.  just change the number of bytes in payload and set the payload 
to whatever billing codes your SMSC requires.
if the billing codes you send need to vary per keyword/service, this will 
*not* work.  just use, the 'push' trick above.

regards,
pong

--- smsc_emi2.c.orig    Thu Nov  6 23:47:40 2003
+++ smsc_emi2.c Thu Nov  6 23:47:40 2003
@@ -429,6 +429,18 @@
        octstr_destroy(str);
     }

+    /* XSer0C: Billing Identifier */
+    if (1)
+    {
+       str = octstr_create("");
+       octstr_append_char(str, 12 ); /* 0C */
+       octstr_append_char(str,  4 ); /* Byte Length of Payload. */
+       octstr_append_cstr(str, "0000" ); /* Billing Code Payload */
+       octstr_binary_to_hex(str, 1);
+       octstr_append(emimsg->fields[E50_XSER],str);
+       octstr_destroy(str);
+    }
+
     if (msg->sms.coding == DC_8BIT || msg->sms.coding == DC_UCS2) {
        emimsg->fields[E50_MT] = octstr_create("4");
        emimsg->fields[E50_MCLS] = octstr_create("1");




Reply via email to