Routable TAG in SMS

187 views
Skip to first unread message

Vsms

unread,
Mar 23, 2017, 1:51:44 PM3/23/17
to Jasmin SMS Gateway
Hey

I've successfully added an interceptor to lookup the destination number in my numbering plan db and return an operatorid (mccmnc) . 
I add this operatorid to the routable tag to be used in routing rules. 

I also have a script similar to sms logger in order to insert and update the sms into my traffic log. Here I also need to record the operatorid used for routing.

Has anyone done anything similar in order to have routable data such as tags available in the sms or header object? 

Thanks in advance!

Vsmsr

Vsms

unread,
Mar 24, 2017, 2:38:52 PM3/24/17
to Jasmin SMS Gateway
Seems adding routable tags to the submit_sm header was the easiest option to achieve my goal. 

spear a sea

unread,
Feb 14, 2023, 1:20:42 PM2/14/23
to Jasmin SMS Gateway
Hi Vsms.
This was a long time ago, how do you access the routable tag via submit_sm header ?

I am able to add tag via interceptor, but when log request ( print.pdu ) don't see the value there.

spear a sea

unread,
Feb 14, 2023, 9:54:37 PM2/14/23
to Jasmin SMS Gateway
routable.pdu.params['hlr_number']=hlr_number
routable.lockPduParam('hlr_number');

I was able to access from the sms_logger script, by setting a param (above in interceptor script )
and then in the sms_logger script:

        if msg.routing_key[:10] == 'submit.sm.' and msg.routing_key[:15] != 'submit.sm.resp.':
            hlr_number = pdu.params['hlr_number']
            # logger.info("HLR from submit.sm %s" % hlr_number)

            q[props['message-id']] = {
                'hlr_number': hlr_number,
            }

            For submit.sm.resp bit, the hlr_number is accessed from q[props]/qmsg

        elif msg.routing_key[:15] == 'submit.sm.resp.':
            # It's a submit_sm_resp
            qmsg = q[props['message-id']]

qmsg['hlr_number']
Reply all
Reply to author
Forward
0 new messages