Selecting specific SMPP link selection from incoming mm7

Selecting specific SMPP link selection from incoming mm7 SearchSearch
Author Message
Robert Barretto
Frequent Contributor
Username: Barretto

Post Number: 65
Registered: 09-2019
Posted on Friday, December 10, 2021 - 06:50 pm:   

Hi guys,

I have two SMSC SMPP connections defined to two different servers. I need to route outgoing SMS[MMS term notify] messages to a specific link, because my numbers are spread across both SMSC server connections. Unfortunately, my numbers are not in nice contiguous ranges, they are intermingled (so I can't set a pattern in the "Preferred SMSC Connection for" list like ^44.* or similar). Short of adding every specific number for each connection in their respective "Preferred SMSC Connection for" list, is there another way to do this? I saw documentation about setting service_type and routing on that, but it doesn't appear I can set a service type indication when the termination is coming via MM7 from a VASP server.

I also tried created separate MMSC VASP accounts for my incoming MM7 terminations and sending the "VASP Sender Address" to 0000000000 for one and 1111111111 for the other. Then I put the same value in the respective "Sender Address" field on the defined SMPP Connection. My hope was that the MMSC would see the sender address 0000000000 on the VASP and match that against the sender address on the SMPP connection, but I couldn't get that to work either.

I'm sure I'm just missing something obvious, but I can't see it. Can you give me some advice on whether or not this is possible?

My config is:
Now SMS/MMS Gateway v2020.01.15 on Windows 10 Pro
MMSC Users:
1. "zone1-term" with "Accept connections via MM7", "VASP Sender Address: 00000000000", "Allow Sender Address Override" is ticked, "MMSC Routing for Received Messages: Standard MMS Delivery"
2. "zone2-term" with "Accept connections via MM7", "VASP Sender Address: 1111111111", "Allow Sender Address Override" is ticked, "MMSC Routing for Received Messages: Standard MMS Delivery"
SMSC:
1. "zone1-smsc" with "Server Host 192.168.xxx.yyy", "Server Port: 2778", "Sender Address: 0000000000", "Allow Sender Address Override" is ticked, "Support any outbound message traffic" is ticked.
2. "zone2-smsc" with "Server Host 192.168.www.zzz", "Server Port: 2778", "Sender Address: 1111111111", "Allow Sender Address Override" is ticked, "Support any outbound message traffic" is ticked.
MMSC Routing:
1. "mm7-zone1-terms" with "Allow Sender Address Override" ticked, "Route messages using: MM7", "Server Address is the https://www.xxx.yyy.zzz:8443/mm7/term", "Connection Type: To VASP (deliver format)"
2. "mm7-zone2-terms" with "Allow Sender Address Override" ticked, "Route messages using: MM7", "Server Address is the https://www.xxx.yyy.vvv:8443/mm7/term", "Connection Type: To VASP (deliver format)"
3. "terms-zone1-smsc" with "Default Sender Address: 192.168.xxx.yyy:2778", "Allow Sender Address Override" is ticked, "Route messages using: Direct Deliver (internal MMSC)"
4. "terms-zone2-smsc" with "Default Sender Address: 192.168.www.zzz:2778", "Allow Sender Address Override" is ticked, "Route messages using: Direct Deliver (internal MMSC)"
MMSC.INI:
MMSSMSUseSender=Yes
MMSRoutingURL=https://192.168.aaa.bbb:8443/routing/mms/query.php
ForceRoutingCallback=Yes

My MMS termination flow is:
1. MM4 termination comes in from a supplier
2. MMSC calls routing hook to determine where to route (used for policy checking, compliancy recording, etc)
3. routing hook server sends back MMSC Routing name for appropriate MMS Outbound route (e.g., mm7-zone1-terms)
4. MMSC sends MM7 DeliverRequest to mm7-dev-terms route definition (i.e., https://www.xxx.yyy.zzz:8443/mm7/term)
5. zone1-term VASP server processes message and then initiates a separate MM7 SubmitReqest back to the MMSC for actual delivery
6. MMSC calls routing hook to determine where to route (used for determining final route to mobile)
7. routing hook server sends back MMSC Routing name for the appropriate MMS Outbound route (e.g., terms-zone1-smsc)
8. at this point the MMSC seems to randomly pick between "terms-zone1-smsc" and "terms-zone2-smsc".

In my SMSOUT logfile I see:

2021-12-10 10:37:13:236,SAR-+1469******6-ad-2-1,zone1-term,+1469******6,OK -- SMPP - 192.168.xxx.yyy:2778,SubmitUser=localsystem-mmsc;SMSCRouteName=zone1-smsc;Sender=1111111111;SMSCMsgId=6161;Binary=1;DCS=F5;UDH=0B05040B8423F00003AD0201;Data=AD062261...1313231
2021-12-10 10:38:31:572,SAR-+1469******6-ae-2-1,zone1-term,+1469******6,OK -- SMPP - 192.168.www.zzz:2778,SubmitUser=localsystem-mmsc;SMSCRouteName=zone2-smsc:Sender=0000000000;SMSCMsgId=29675;Binary=1;DCS=F5;UDH=0B05040B8423F00003AE0201;Data=AE0622617...1313231

Where the first attempt delivered because it went to the zone1-smsc where this mobile is served, and the second attempt failed because it went to the zone2-smsc connection.

If I untick the "Support any outbound message traffic" from both SMPP definitions, then the message is eaten by the MMSC and I get a:


2021-12-10 10:28:05:984,SAR-+1469******6-ac-2-1,zone1-term,+1469******6,Error: No SMSC defined to route message -- SYSTEM,SubmitUser=localsystem-mmsc;SMSCRouteName=SYSTEM;Binary=1;DCS=F5;UDH=0B05040B8423F00003AC0201;Data=AC06226170706...3231313231


Does my scenario make sense? What am I doing wrong? Any guidance would be greatly appreciated.

Thanks!
//Robert
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 8463
Registered: 10-2002
Posted on Friday, December 10, 2021 - 07:27 pm:   

Hi Robert,

It sounds like you need an SMS accounting callback, so that you can control which SMSC is used for which MSISDN.

This works very much like the MMS routing callback that you have implemented on the MMS side.

Details here: https://nowsms.com/doc/advanced-configuration-settings/sms-accounting-callbacks

Regards,

Bryce
NowSMS Support
Robert Barretto
Frequent Contributor
Username: Barretto

Post Number: 66
Registered: 09-2019
Posted on Friday, December 10, 2021 - 08:29 pm:   

Hi Bryce,

I got so MMS centered that I didn't even think to look for something like that. That's exactly what I'm looking for! As always, your quick help is very much appreciated. I'll let you know how it goes.

Cheers!
//Robert
Robert Barretto
Frequent Contributor
Username: Barretto

Post Number: 67
Registered: 09-2019
Posted on Friday, December 10, 2021 - 09:46 pm:   

Hi Bryce,

Ok. So I've added the following to my SMSGW.INI [SMSGW] section:

SMSAccountingURL=https://192.168.xxx.yyy:8443/routing/sms/query.php
SMSAccountingMustSetRoute=Yes

However, when I do an MMS Termination. The hook is only being hit once, after the outgoing smpp route has been selected.

GET /routing/sms/query.php?Type=SMSOut&From=localsystem-mmsc&To=%2B1469******6&MessageID=SAR-%2B14695926306-ba-2-1&SubmitIP=zone1-term&Sender=0000000000&Binary=1&DCS=F5&UDH=0B05040B8423F00003BA0201&Data=BA062261707....31313231&SMSCRouteName=terms-zone2-smsc&SMSCMsgId=29722&SMSCName=SMPP%20-%20192.168.www.zzz%3A2778&Status=OK&SourcePort=23F0&DestPort=0B84&SegRef=186&SegCount=2&SegNum=1


I made a guess and tried adding a "ForceAccountCallback=Yes", similar to the MMS ForceRoutingCallback option, but that didn't have any effect.

There's really no SMSIn or SMSSend in this case because it's the MMSC generating the SMS[MMS notify] itself so I assume that's always allowed by the system?

Ideas?

Thanks!
//Robert}
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 8464
Registered: 10-2002
Posted on Monday, December 13, 2021 - 05:25 pm:   

Hi Robert,

Unfortunately, that is correct. The SMSSend callbacks do not get triggered for SMS messages generated by the MMSC.

I've reviewed this with our engineering team, and they've confirmed that there are very limited mechanisms for impacting the routing of SMS messages generated by the MMSC.

We're investigating the impact of adding a callback for the processing of these messages, but in the meantime, I have a work-around.

Enable the SMPP server in NowSMS, and create an account under "SMS Users" that will be used for submitting these messages from the MMSC.

Define an SMPP SMSC connection that NowSMS will use to connect to its own SMPP server. "Support any outbound message traffic" should not be checked for this connection.

In MMSC.INI, under the [MMSC] header, add MMSSMSCRoute=routename, using the route name that you assign to this connection.

When the MMSC submits an SMS message, it will be queued to this SMPP connection, and then resubmitted to NowSMS. The SMSSend callback will then be available to allow control which SMPP connection should be used.

Regards,

Bryce
NowSMS Support
Robert Barretto
Frequent Contributor
Username: Barretto

Post Number: 68
Registered: 09-2019
Posted on Tuesday, December 14, 2021 - 10:30 pm:   

Hi Bryce,

Your work-around is working like a champ! I'm return the proper SMSCRoute when I get the Type=SMSSend event, based on the "to" party digits in the event.

Thanks!
//Robert

Add Your Message Here, or click here to start a new topic.
Post:
Bold text Italics Underline Create a hyperlink Insert a clipart image
Options: Automatically activate URLs in message
Action: