On 20 Oct 2003, Gideon N. Guillen wrote:

> On Mon, 2003-10-20 at 12:14, Pong wrote:
> > > hi, given that the SMSC is using CMG UCP/EMI4, 
> > > when replying to an SMS message or sending an SMS-Push message,
> > > how do we insert a XSER field type (billing identifier) in the
> > > message packet where the XSER field data in hex
> > > format is 0CLLDD where
> > > 
> > >   LL - length of data
> > >   DD - data in hex format
> > > 
> > 
> > replying to my own message:  will encoding this under the UDH do?
> 
> Nope UDH won't do because UDH is stored in another XSer type. 

oh yeah.  i got what you mean.

> If you
> want to implement this, you might want to check the latest CVS release.

i just looked at it and it doesnt seem to be in the CVS release.

> Or if you want, you can code your own patch to the latest stable
> release.
> 

ok, i browsed at the source gw/smsc/smsc_emi2.c  and it looks like
i just need to insert a block of code for  XSer 0C (Billing
Identifier) similar to the following from UDH and DCS:

    /* XSer1: UDH */
    if (octstr_len(msg->sms.udhdata)) {
        str = octstr_create("");
        octstr_append_char(str, 1);
        octstr_append_char(str, octstr_len(msg->sms.udhdata));
        octstr_append(str, msg->sms.udhdata);
        octstr_binary_to_hex(str, 1);
        octstr_append(emimsg->fields[E50_XSER],str);
        octstr_destroy(str);
    }

    /* XSer2: DCS */
    dcs = fields_to_dcs(msg, msg->sms.alt_dcs);
    if (dcs != 0 && dcs != 4) {
        str = octstr_create("");
        octstr_append_char(str, 2);
        octstr_append_char(str, 1); /* len 01 */
        octstr_append_char(str, dcs);
        octstr_binary_to_hex(str, 1);
        octstr_append(emimsg->fields[E50_XSER],str);
        octstr_destroy(str);
    }

---> insert Xser 0C here?  is it that simple?  looks like?

regards,
pong


Reply via email to