Hello, finally I think I solved... I assigned inside gw/smsc/smsc_smpp.c on function handle_pdu the var msg.sms->foreign_id in this way:
Inside "case submit_sm_resp" there are a tmp var with this data: tmp = octstr_duplicate(pdu->u.submit_sm_resp.message_id) so, I added on next line: msg->sms.foreign_id = tmp; and then commented: //octstr_destroy(tmp); And It works perfect! But I'm not sure if this can make memory leaks, because I don't know deeply the code and I'm not used to C language. What do you think? Thanks BR 2011/1/22 Santiago Cattaneo <santia...@gmail.com> > Hi, Alex, I tried that but I couldn't get the id, I called: > > debug(0, "test message_id: %d", msg->sms.foreign_id); > > and allways get "test message_id: 0" > > Just for you know, If I do: > > debug(0, "test message_id: %d", msg->sms.dlr_url); > > I get the Id correctly. > > > > > 2011/1/19 Alejandro Guerrieri <alejandro.guerri...@gmail.com> > > Command status, it's not available directly, but it'll affect the DLR >> outcome (if it's not 0, it's an error and you'll get a NACK instead of an >> ACK). On the SVN code you get the smpp "dlr_err" optional parameter as well. >> >> message_id, it's the %F "foreign_id" parameter. >> >> Regards, >> >> Alex >> >> >> On Wed, Jan 19, 2011 at 7:47 PM, Santiago Cattaneo >> <santia...@gmail.com>wrote: >> >>> Hello, I'm trying to obtain from submit_sm_resp the highlighted data from >>> C code of gwlib. >>> >>> command_id: 2147483652 = 0x80000004 >>> command_status: 0 = 0x00000000 >>> sequence_number: 7 = 0x00000007 >>> message_id: "2B23AF36" >>> >>> I know that exist the Msg structure, but I could't find on the web the >>> field names for that, I found the Msg->sms structure with this information: >>> >>> MSG(sms, >>> { >>> OCTSTR(sender) >>> OCTSTR(receiver) >>> OCTSTR(udhdata) >>> OCTSTR(msgdata) >>> INTEGER(time) >>> OCTSTR(smsc_id) >>> OCTSTR(smsc_number) >>> OCTSTR(foreign_id) >>> OCTSTR(service) >>> OCTSTR(account) >>> UUID(id) >>> INTEGER(sms_type) >>> INTEGER(mclass) >>> INTEGER(mwi) >>> INTEGER(coding) >>> INTEGER(compress) >>> INTEGER(validity) >>> INTEGER(deferred) >>> INTEGER(dlr_mask) >>> OCTSTR(dlr_url) >>> INTEGER(pid) >>> INTEGER(alt_dcs) >>> INTEGER(rpi) >>> OCTSTR(charset) >>> OCTSTR(boxc_id) >>> OCTSTR(binfo) >>> INTEGER(msg_left) >>> VOID(split_parts) >>> INTEGER(priority) >>> INTEGER(resend_try) >>> INTEGER(resend_time) >>> OCTSTR(meta_data) >>> }) >>> >>> I have to use dlr_mask??? Any Idea? >>> >>> Thanks a lot. >>> >> >> >