MSISDNHeaderPrefixConvert

MSISDNHeaderPrefixConvert SearchSearch
Author Message
Dziugas Baltrunas
New member
Username: Menulis

Post Number: 6
Registered: 02-2006
Posted on Friday, June 02, 2006 - 11:59 am:   

Hi,

there was a discussion on MSISDNHeaderPrefixConvert some time ago (http://support.nowsms.com/discus/messages/485/10730.html), but I still don't understand in which cases this will work.

What I wanted to achieve is to rewrite recipient number in local format having particular prefix to international format. We have country code 370, but it's also legal to make local calls prefixing them with "8", so I want to make both 3706xxyyyyy and 86xxyyyyy valid numbers (6 is mobile network prefix).

I tried defining MSISDNHeaderPrefixConvert values like 86:3706 or +37086:+3706 or 86:+3706 but both without success.

According to the logs, initially happens number "normalization" which is automagically based on sender address (MSISDN header), so recipient 861234567 becomes +370861234567 (assuming that sender number has +370 prefix) and looks like it bybasses MSISDNHeaderPrefixConvert rules at all passing it futher to accounting and routing callbacks. Is it expected to be like this?

I also tried setting MSISDNHeaderDefaultCountryCode and MSISDNHeaderLocalPrefix, however, having these set I get normal (international) sender addresses double "normalized", i.e. +370+37061234567.

Thanks,
Dziugas
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6005
Registered: 10-2002
Posted on Tuesday, June 06, 2006 - 09:11 pm:   

Hi Dziugas,

Generally the MSISDNHeaderPrefixConvert setting is not used for internationalising numbers. It's for more advanced requirements.

If I understand your configuration correctly, you want to use the following settings:

MSISDNHeaderDefaultCountryCode=370
MSISDNHeaderLocalPrefix=8

This would cause the following conversions to occur:

37061234567 ==> +37061234567
861234567 ==> +37061234567

Optionally, you might also want to use this setting:

MSISDNHeaderConvertToLocalNumber=Yes

The above setting performs the reverse conversion at the time that a message is delivered to a local recipient ... so that the recipient sees phone numbers in local format.

-bn
Dziugas Baltrunas
New member
Username: Menulis

Post Number: 7
Registered: 02-2006
Posted on Wednesday, June 07, 2006 - 02:18 pm:   

Hi, Bryce,

thanks for the answer.

As you wrote these are working as expected:

37061234567 ==> +37061234567
861234567 ==> +37061234567

But what about situation when original recipient is in correct (international) format, i.e. +37061234567? What I figured out is that international prefix is still added, so we get the following:

+37061234567 ==> +370+37061234567

This is really not as intended.

Thanks,
Dziugas
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6015
Registered: 10-2002
Posted on Friday, June 09, 2006 - 03:48 pm:   

Hi Dziugas,

That is not normal. I wonder if it is something specific to your country code.

But I can't see how it could be.

When we process a recipient phone number, if it starts with "+" ... we don't perform any transformation on the number.

I could only see the possibility of an "MSISDNHeaderPrefixConvert" setting causing that type of transformation. Are you sure you don't also have one of those settings present?

And actually, MSISDNHeaderPrefixConvert wouldn't apply here. It only applies against the sender address, when we are parsing the "X-MSISDN" (or similar) header from the WAP proxy.

Can I see your MMSC.INI file? I can't think of any settings that would cause this type of transformation, but I might notice something looking at your MMSC.INI.

I'm probably also going to need to see an MMSCDEBUG.LOG showing a message coming in where the recipient gets mangled like this. (If it has details that shouldn't be posted publicly, e-mail it to nowsms@now.co.uk with a subject of "Attention: Bryce" ... and reference back to what the problem is that I'm supposed to take a look at.)

-bn
Dziugas Baltrunas
New member
Username: Menulis

Post Number: 8
Registered: 02-2006
Posted on Friday, June 09, 2006 - 05:23 pm:   

Hi,

ok, let me explain what happens when. As I already wrote, sender address (comes from WAP gateway) is always in international format, i.e. X-WAP-Network-Client-MSISDN: +37061234567.

1.
Recipient: 861234568
No MSISDNHeader* settings

Sender ==> +37061234567
Recipient ==> +370861234568

2.
Recipient: 861234568
MSISDNHeaderDefaultCountryCode=370
MSISDNHeaderLocalPrefix=8

Sender ==> +370+37061234567
Recipient ==> +370861234568

3.
Recipient: 861234568
MSISDNHeaderPrefixConvert=86:3706 (or +37086:+3706 or 86:+3706)

Sender ==> +37061234567
Recipient ==> +370861234568

So in neither case I result is as expected. What I can see from debug log is that normalizing destination number is always the same, i.e.

NormalizePhoneNumber: Normalizing 861234568/TYPE=PLMN to +370861234568/TYPE=PLMN

Thanks,
Dziugas Baltrunas
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6018
Registered: 10-2002
Posted on Friday, June 09, 2006 - 05:46 pm:   

Ok ... so it is the sender address that is getting corrupted?

That would explain why you are looking at the MSISDNHeaderPrefixConvert setting.

The problem is that the MMSC is not expecting a "+" to be in this string.

This is something that we need to fix. However, I believe you can work around this with an MSISDNHeaderPrefixConvert setting.

I believe this will work:

MSISDNHeaderPrefixConvert=+370:370

-bn
Dziugas Baltrunas
New member
Username: Menulis

Post Number: 9
Registered: 02-2006
Posted on Tuesday, June 13, 2006 - 01:23 pm:   

Hi Bryce,

indeed, setting MSISDNHeaderPrefixConvert=+370:370 does not double the country prefix in the sender address anymore. However, recipient address remain untouched, that is 861234567 again becomes +370861234567.

What I would expect is to make MSISDNHeaderPrefixConvert work both for sender and destination addresses. One more more rules would solve most of the problems.

Thanks,
Dziugas
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6036
Registered: 10-2002
Posted on Wednesday, June 14, 2006 - 10:36 pm:   

Hi Dziugas,

The MSISDNHeaderPrefixConvert setting was added specifically to deal with unusual or unexpected prefixes appearing in the MSISDN that is presented by the WAP Proxy. So it was only implemented to process against the sender address.

The recipient address would get processed by standard transformation rules.

If you have the following settings:

MSISDNHeaderDefaultCountryCode=370
MSISDNHeaderLocalPrefix=8

Then I would expect "861234567" to become "+37061234567".

However, you are correct. The transformation is not properly occurring on the recipient address when MSISDNHeaderLocalPrefix is a value other than "0".

We're preparing a patch to address this. Are you running NowSMS 2006 or an earlier version?

-bn
Dziugas Baltrunas
New member
Username: Menulis

Post Number: 10
Registered: 02-2006
Posted on Thursday, June 15, 2006 - 11:29 am:   

Hi Bryce,

we're running earlier 5.51k version.

Dziugas
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6037
Registered: 10-2002
Posted on Thursday, June 15, 2006 - 07:18 pm:   

Hi Dziugas,

Ok. Send me an e-mail at nowsms@now.co.uk. Put "Attention: Bryce" in the subject line, and I'll reply back with an update for v5.51k that includes a fix for the handling of the MSISDNHeaderLocalPrefix setting as it pertains to recipient address conversion.

-bn
Dziugas Baltrunas
New member
Username: Menulis

Post Number: 11
Registered: 02-2006
Posted on Tuesday, June 20, 2006 - 09:57 am:   

Hi, Bryce,

what is actually an order of applying MSISDNHeaderDefaultCountryCode MSISDNHeaderLocalPrefix versus automatical internacionalization based on sender's country code? Which goes first?

I suppose former is but then funcionality provider by the latter (i.e. internacionalization) applies no more.

Thanks,
Dziugas
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6089
Registered: 10-2002
Posted on Tuesday, June 20, 2006 - 03:29 pm:   

Hi Dziugas,

Recipient internationalisation is performed based upon the sender's country code (if sender not in international format, no internationalisation is performed).

The "MSISDNHeader" settings are really intended for options relating to the parsing of the "X-MSISDN" (or similar) HTTP header that identifies the sender.

However, the internationalisation of the recipient, based upon the sender's country code, was assuming that the local dialing prefix was "0", not "8" as in your country. (It is usually "0", but I do know of other places where it is "9".)

Therefore, the recipient internationalisation now uses "MSISDNHeaderLocalPrefix" in its conversion. This could cause a problem if you are supporting users in two different country codes where the national (local) dialing prefix is different.

-bn