[Spce-user] need rewrite rules advise

Rogier Banis rogier at ningaloo.nl
Thu Mar 27 07:09:43 EDT 2014


Hello list,

I have a question about rewriting caller id’s in Sipwise. The situation is like this: behind SIPWise we have several PBX’es that use SIPwise to dial out to our trunk providers. Server A presents it’s caller id like 201234567 without country code. Server B presents like 0201234567 also without country code. The 3rd server presents E164 so 31201234567.
Now the outbound calls to our trunk provider need the CLI to be presented in E164 so 31201234567. On the trunk i created the following rewrite rules:

Outbound rewrite rules for caller
__
Match pattern: \A(?:06)
Replacement pattern: 316
—
Match pattern: ([1-9][0-9]+)$
Replacement pattern: 31\1


For some reason it works but not perfect. For example when a customer dials outbound and he has callerid 318123456 (that is without country code) the NL country code still has to be added so the number looks like 31318123456.
Can anyone help me or point me in the right direction? I have tried so many riles already and i just doesn’t work 100% every time.

Thank you very much.

With best regards,

Rogier B


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/mailman/private/spce-user_lists.sipwise.com/attachments/20140327/b06eff89/attachment.html>


More information about the Spce-user mailing list