SMPP Forced destination format

SMPP Forced destination format SearchSearch
Author Message
GSM TEST
New member
Username: Gsmtest

Post Number: 19
Registered: 04-2006
Posted on Friday, September 30, 2011 - 05:42 am:   

The SMPP connection that we are using requires the destination address to contain +1 or it will not be delivered. I have tried to modify the TON and NPI settings, but for some strange reason it has no impact on the destination address. I set the destination TON to 1 and the destination address was sent without adding 1

This is what I am trying to accomplish:

Destination = 10 digits -> add +1
Destination = 11 digits -> add +
Destination = 12 digits -> no change
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 3497
Registered: 08-2008
Posted on Friday, September 30, 2011 - 05:27 pm:   

Hi,

The setting to force the TON value does just that.

It won't add a "+1", just a "+".

That said, in v2011.07.05 and later, we did add a feature that provides prefix conversions on a per SMSC basis. (This version is linked to here: http://www.nowsms.com/nowsms-update)

Here's a description of how it works:


quote:

SMS Gateway: Add support for prefix number conversion when submitting SMS messages to an SMSC connection in order to deal with situations where a particular provider requires national or international number format. In the SMSC specific section of SMSGW.INI (e.g., [Modem - modem driver name] or [SMPP - server:port]) the following settings are now supported to apply number prefix conversions for inbound or outbound messages: OutRecipPrefixConvert, OutSenderPrefixConvert, InRecipPrefixConvert, InSenderPrefixConvert. These settings apply to sender (source) and recipient (destination) addresses, as denoted in the settings name. Prefix conversions can be a comma delimited list, such as 00:+,0:+44 In this case, 0044777777777 is converted to +44777777777, and 0777777777 would be converted to +44777777777. For outbound messages, the conversion occurs before the message is submitted via this SMSC connection. For inbound messages, it is applied as the message is received from the SMSC connection.




It's a little more complicated for North America +1, because you don't have the "0" prefix for local numbers.

But I did use this feature to do some prefix conversions for someone who needed a conversion similar to what you describe.

Here is what we added to the [SMPP - server:port] section of their SMSGW.INI:


OutRecipPrefixConvert=1:+1,2:+12,3:+13,4:+14,5:+15,6:+16,7:+17,8:+18,9:+19,

If the number started with "+", it wasn't touched.

If it was of the format 123456789 it became +123456789.

If it was of the format 234567890 it became +1234567890.

Hopefully that should be sufficient for your requirement.

Unfortunately this setting does not deal with lengths, so sending to other country codes requires submission with +. (It is possible to implement a callback to do more complex conversions, but that is considerably more complicated to implement.)

--
Des
NowSMS Support
GSM TEST
New member
Username: Gsmtest

Post Number: 20
Registered: 04-2006
Posted on Saturday, October 01, 2011 - 08:05 am:   

This solution is perfect! Thanks a lot Des!

Log file before modification

23:35:07,4E825E03.req,1,OK - 4D845B6B
23:35:07,4E825E04.req,2,OK - 4D845B6C
23:35:08,4E825E05.req,3,OK - 4D845B6D
23:35:09,4E825E06.req,4,OK - 4D845B6E
23:35:10,4E825E07.req,5,OK - 4D845B6F
23:35:11,4E825E08.req,6,OK - 4D845B70
23:35:12,4E825E09.req,7,OK - 4D845B71
23:35:13,4E825E0A.req,8,OK - 4D845B72
23:35:14,4E825E0B.req,9,OK - 4D845B73

Log file after modification

23:42:15,4E825E0E.req,+1,OK - 4D845B76
23:42:16,4E825E0F.req,+12,OK - 4D845B77
23:42:17,4E825E10.req,+13,OK - 4D845B78
23:42:18,4E825E11.req,+14,OK - 4D845B79
23:42:19,4E825E12.req,+15,OK - 4D845B7A
23:42:20,4E825E13.req,+16,OK - 4D845B7B
23:42:21,4E825E14.req,+17,OK - 4D845B7C
23:42:22,4E825E15.req,+18,OK - 4D845B7D
23:42:23,4E825E16.req,+19,OK - 4D845B7E
GSM TEST
New member
Username: Gsmtest

Post Number: 22
Registered: 04-2006
Posted on Thursday, October 06, 2011 - 06:39 am:   

I spoke too soon. It appears that rule does not apply to MMS. I sent a series of message and they did not arrive. The log file shows that the destination was not modified.

22:32:10,MMSOUT,VASP:11C,8174443456/TYPE=PLMN,1239990000
22:32:10,MMSOUT,VASP:11C,8174443456/TYPE=PLMN,2239990000
22:32:10,MMSOUT,VASP:11C,8174443456/TYPE=PLMN,3239990000
22:32:10,MMSOUT,VASP:11C,8174443456/TYPE=PLMN,4239990000
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 3503
Registered: 08-2008
Posted on Thursday, October 06, 2011 - 03:52 pm:   

That is because the rule was defined for the outbound SMPP connection only.

There is a similar facility for the MMSC, however it applies to all MMS messages, not on a per connection basis.

Add the following to the [MMSC] section of MMSC.INI:

MSISDNRecipientPrefixConvert=1:+1,2:+12,3:+13,4:+14,5:+15,6:+16,7:+17,8:+18,9:+1 9,


--
Des
NowSMS Support
GSM TEST
New member
Username: Gsmtest

Post Number: 24
Registered: 04-2006
Posted on Friday, October 07, 2011 - 12:37 am:   

Thank you, that fixed it.
jeremy
New member
Username: Jmahiat

Post Number: 1
Registered: 02-2012
Posted on Wednesday, February 15, 2012 - 03:56 pm:   

Hi,

I need to do the same kind of configuration but can't make it work.
I'm using nowSMS v2011.07.05 and added the following parameter to my modems:

OutRecipPrefixConvert=1:001,2:002,3:003,4:004,5:005,6:006,7:007,8:008,9:009

basically, the numbers are sent to nowsms in international format without "00" or "+" and as we use modems, it doesn't work when sending on other networks.

Unfortunately this doesn't seem to work...

logs before and after are the same:

2012-02-15 16:30:00,4F2C1D74.req,10.1.1.8,3247896392,OK -- GlobeTrotter GI0505 - Modem Interface,SubmitUser=staging;Sender=32478781815;Text="blabla"

I expected 3247896392 to be modified into 003247896392.

Thanks in advance for your support!
jeremy
New member
Username: Jmahiat

Post Number: 2
Registered: 02-2012
Posted on Wednesday, February 15, 2012 - 04:01 pm:   

Hi again,

for info, if I add

InRecipPrefixConvert=1:001,2:002,3:003,4:004,5:005,6:006,7:007,8:008,9:009

at the same location in the smsgw.ini, it is well modifying the recipient for incoming messages so I guess I put the parameter at the right place...

Thanks
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 3788
Registered: 08-2008
Posted on Wednesday, February 15, 2012 - 07:34 pm:   

Hi Jeremy,

There does seem to be a bug with this OutRecipPrefixConvert setting for modem connections only.

I did some checking, and there is an error in how this setting is being checked.

NowSMS should be looking for:

[Modem - GlobeTrotter GI0505 - Modem Interface]
OutRecipPrefixConvert=1:001,2:002,3:003,4:004,5:005,6:006,7:007,8:008,9:009

However, by mistake, it is actually checking this:

[GlobeTrotter GI0505 - Modem Interface]
OutRecipPrefixConvert=1:001,2:002,3:003,4:004,5:005,6:006,7:007,8:008,9:009

If you create this section header and use it for the setting, it will work as expected.

I would suggest duplicating the setting so that it is applied in both the correct and incorrect sections, as we will be fixing this in the next update.

--
Des
NowSMS Support
jeremy
New member
Username: Jmahiat

Post Number: 3
Registered: 02-2012
Posted on Thursday, February 16, 2012 - 08:09 am:   

Thank you so much for your help! That fixes it.
GSM TEST
New member
Username: Gsmtest

Post Number: 27
Registered: 04-2006
Posted on Saturday, June 16, 2012 - 12:17 am:   

Des, I found that if you make any changes at all to the SMPP bind settings the special rule (OutRecipPrefixConvert=1:+1,2:+12,3:+13,4:+14,5:+15,6:+16,7:+17,8:+18,9:+19,) is kicked out of the SMSGW.ini file. It will remain in the MMSC.ini file. Is this intentional?
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 3998
Registered: 08-2008
Posted on Monday, June 18, 2012 - 10:11 pm:   

Hi,

I don't see any issues in my tests.

Unless you change the server host name/address. Was that the issue? Doing that does seem to reset any connection-specific settings that are require direct configuration file edits.

--
Des
NowSMS Support
GSM TEST
New member
Username: Gsmtest

Post Number: 28
Registered: 04-2006
Posted on Tuesday, June 19, 2012 - 05:22 am:   

Correct, I am seeing it with any changes to the SMPP port, URL,etc. Under the same conditions the MMSC.ini is maintained.
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 4001
Registered: 08-2008
Posted on Wednesday, June 20, 2012 - 06:01 pm:   

Confirmed. In all current releases, changing a server host name or port number will cause any "advanced" settings for that connection (settings that can only be applied directly by editing the INI file) to be discarded.

We will correct this bug in the next update.

--
Des
NowSMS Support