farhadi / node-smpp

SMPP client and server implementation in node.js
MIT License
417 stars 177 forks source link

MCCMNC info #217

Closed guicuton closed 2 years ago

guicuton commented 2 years ago

Hi guys!

first of all, amazing lib! very friendly and easy to use!

I would like to know if is there a way to get the MCCMNC (carrier) of the mobile that we sent through submit_sm since the providers by default don't give us back this info by deliver_sm.

This would be very usefull to create rules of message routing through each carrier

juliangut commented 2 years ago

Hi @guicuton

The only way to have this information is through your providers in deliver_sm PDUs

Contact your provider and ask them if they can provide MCC/MNC in a custom TLV, and what the configuration for that TLV is

smpp.addTLV('mccmnc', { id: 0x1441, type: smpp.types.tlv.string });

After gathering that it's as simple as registering your TLV and then extracting it from the PDU itself

const mccmnc = pdu.mccmnc;
guicuton commented 2 years ago

Hi @juliangut

Thanks for your information!