[Spce-user] Rewrite Rules outbound calls

Daniel Grotti dgrotti at sipwise.com
Mon Jun 15 03:15:15 EDT 2015


Hi Jay,
the problem is the '^' symbol.
You have probably choose the wrong one or you have copy/paste the regexp
from a pdf.
Please change that symbol with the right one, which is '^'.


--
Daniel Grotti
VoIP Engineer


Sipwise GmbH
Europaring F15 | 2345 Brunn am Gebirge, Austria | www.sipwise.com

On 06/14/2015 03:19 PM, Daniel Grotti wrote:
> Hi Jay,
> Your ruri is not rewritten at all.
> So please check again your rewrite rule set and rules.
> Also you can increase the proxy debug with: ngcp-kamctl proxy fifo debug 2
> 
> You can see what's happening.
> Did you assign the reqwrite rule set to your peer?
> 
> Daniel
> 
> 
> On Jun 14, 2015 2:03 PM, Jay Autar <jay.k.autar at gmail.com> wrote:
>>
>> Goodday everyone,
>>
>> I am struggling white this issue for a few days, searching the lists but I cannot figure this issue out.
>>
>> Could you help me with this one:
>>
>> Situation:
>>
>> Subscriber---->Peer (Outbound)----->Outside world
>>
>> 1) I Create Rewrite rules for my domain sip1.ntelecom.com
>>
>> Inbound Rewrite Rules for Caller
>> ˆ(00|\+)([1-9][0-9]+)$     \2         International to E.164     yes     
>> ˆ0([1-9][0-9]+)$     ${caller_cc}\1     National to E.164     yes     
>> ˆ([1-9][0-9]+)$     ${caller_cc}${caller_ac}\1     Local to E.164     yes
>>
>> Inbound Rewrite Rules for Callee
>> ˆ(00|\+)([1-9][0-9]+)$     \2         International to E.164     yes     
>> ˆ0([1-9][0-9]+)$     ${caller_cc}\1     National to E.164     yes     
>> ˆ([1-9][0-9]+)$     ${caller_cc}${caller_ac}\1     Local to E.164     yes     
>> ˆ(911|112)$         emergency_\1     Tag Emergency Numbers     yes
>>
>> Outbound Rewrite Rules for Caller
>> ˆemergency_(.+)$     ${caller_emergency_prefix}${caller_ac}\1     Normalize Emergency Numbers     yes
>>
>> 2) For the peer sip.voxbone.com I create the following:
>> 2.1) Peering rules:
>> One empty rule to match everything
>>
>> 2.2) Rewrite rule(VoxBone requires me to use a prefix of 0011 for all numbers that will be 
>> So I created the following rewrite rule and added to this peer:
>>
>> Outbound Rewrite Rules for Callee
>> ˆ([1-9]+)$     0011\1     Prefix for number yes
>>
>> Now when I call a number for example 31612345678
>> The following happens in the log:
>>
>> *************
>> Jun 14 12:51:15 sip1 proxy[3829]: NOTICE: <script>: New request on proxy - M=REGISTER R=sip:sip1.ntelecom.com F=sip:erik at sip1.ntelecom.com T=sip:erik at sip1.ntelecom.com IP=92.69.229.52:36671 (127.0.0.1:5060) ID=Zt1EaYvnb-QInZ6J1PwU-NcpUpEgBgN1
>> Jun 14 12:51:15 sip1 proxy[3829]: NOTICE: <script>: Contacts successfully updated, expires in 900s - R=sip:sip1.ntelecom.com ID=Zt1EaYvnb-QInZ6J1PwU-NcpUpEgBgN1
>> Jun 14 12:51:21 sip1 proxy[3828]: NOTICE: <script>: New request on proxy - M=INVITE R=sip:31612345678 at sip1.ntelecom.com F=sip:erik at sip1.ntelecom.com T=sip:31612345678 at sip1.ntelecom.com IP=92.69.229.52:36671 (127.0.0.1:5060) ID=4OuHzx0F-f7N5o27zPs7VCmg1a371A5r
>> Jun 14 12:51:21 sip1 proxy[3828]: NOTICE: <script>: Authentication failed, no credentials - R=sip:31612345678 at sip1.ntelecom.com ID=4OuHzx0F-f7N5o27zPs7VCmg1a371A5r
>> Jun 14 12:51:21 sip1 proxy[3831]: NOTICE: <script>: New request on proxy - M=INVITE R=sip:31612345678 at sip1.ntelecom.com F=sip:erik at sip1.ntelecom.com T=sip:31612345678 at sip1.ntelecom.com IP=92.69.229.52:36671 (127.0.0.1:5060) ID=4OuHzx0F-f7N5o27zPs7VCmg1a371A5r
>> Jun 14 12:51:21 sip1 proxy[3831]: NOTICE: <script>: User-Provided CLI 'erik' taken from From-User - R=sip:31612345678 at sip1.ntelecom.com ID=4OuHzx0F-f7N5o27zPs7VCmg1a371A5r
>> Jun 14 12:51:21 sip1 proxy[3831]: NOTICE: <script>: User-provided CLI 'erik' rejected, using network-provided CLI '31207132454' - R=sip:31612345678 at sip1.ntelecom.com ID=4OuHzx0F-f7N5o27zPs7VCmg1a371A5r
>> Jun 14 12:51:21 sip1 proxy[3831]: NOTICE: <script>: Setting '31207132454 at sip1.ntelecom.com' as initiating user-provided CLI - R=sip:31612345678 at sip1.ntelecom.com ID=4OuHzx0F-f7N5o27zPs7VCmg1a371A5r
>> Jun 14 12:51:21 sip1 proxy[3831]: NOTICE: <script>: Setting '31207132454 at sip1.ntelecom.com' as initiating network-provided CLI - R=sip:31612345678 at sip1.ntelecom.com ID=4OuHzx0F-f7N5o27zPs7VCmg1a371A5r
>> Jun 14 12:51:21 sip1 proxy[3831]: NOTICE: <script>: Callee is not local - R=sip:31612345678 at sip1.ntelecom.com ID=4OuHzx0F-f7N5o27zPs7VCmg1a371A5r
>> Jun 14 12:51:21 sip1 proxy[3831]: NOTICE: <script>: Call to SIP Peering - R=sip:31612345678 at sip1.ntelecom.com ID=4OuHzx0F-f7N5o27zPs7VCmg1a371A5r
>> Jun 14 12:51:21 sip1 proxy[3831]: NOTICE: <script>: Load gws matching calling part 'sip:31207132454 at sip1.ntelecom.com' and called user '31612345678' and called part 'sip:31612345678 at sip1.ntelecom.com' - R=sip:31612345678 at sip1.ntelecom.com ID=4OuHzx0F-f7N5o27zPs7VCmg1a371A5r
>> Jun 14 12:51:21 sip1 proxy[3831]: NOTICE: <script>: Setting acc source-leg for uuid '67ad8967-9d19-4c4a-ba4b-19b3a564906a': '67ad8967-9d19-4c4a-ba4b-19b3a564906a|erik|sip1.ntelecom.com|31207132454|||3|||0|call|92.69.229.52|1434279081.116248|||||||||||' - R=sip:31612345678 at sip.voxbone.com ID=4OuHzx0F-f7N5o27zPs7VCmg1a371A5r
>> Jun 14 12:51:21 sip1 proxy[3831]: NOTICE: <script>: Setting acc destination-leg for uuid '0': '0|||0|31612345678|0|31612345678|sip.voxbone.com|31612345678|sip1.ntelecom.com|1|||||||||||' - R=sip:31612345678 at sip.voxbone.com ID=4OuHzx0F-f7N5o27zPs7VCmg1a371A5r
>> Jun 14 12:51:21 sip1 proxy[3831]: NOTICE: <script>: Setting caller_cli_userprov/caller_domain_userprov '31207132454 at sip1.ntelecom.com' for upn - R=sip:31612345678 at sip.voxbone.com ID=4OuHzx0F-f7N5o27zPs7VCmg1a371A5r
>> Jun 14 12:51:21 sip1 proxy[3831]: NOTICE: <script>: Setting From to '<sip:31207132454 at sip1.ntelecom.com>' - R=sip:31612345678 at sip.voxbone.com ID=4OuHzx0F-f7N5o27zPs7VCmg1a371A5r
>> Jun 14 12:51:21 sip1 proxy[3831]: NOTICE: <script>: Setting caller_cli_netprov/caller_domain_netprov '31207132454 at sip1.ntelecom.com' for npn - R=sip:31612345678 at sip.voxbone.com ID=4OuHzx0F-f7N5o27zPs7VCmg1a371A5r
>> Jun 14 12:51:21 sip1 proxy[3831]: NOTICE: <script>: Setting PAI to '<sip:31207132454 at sip1.ntelecom.com>' - R=sip:31612345678 at sip.voxbone.com ID=4OuHzx0F-f7N5o27zPs7VCmg1a371A5r
>> Jun 14 12:51:21 sip1 proxy[3831]: NOTICE: <script>: Setting P-Called-Party-ID '<sip:31612345678 at sip.voxbone.com>' - R=sip:31612345678 at sip.voxbone.com ID=4OuHzx0F-f7N5o27zPs7VCmg1a371A5r
>> Jun 14 12:51:21 sip1 proxy[3831]: NOTICE: <script>: Setting 'sip:98.222.112.123:5060' taken from D-URI as next hop after lb for PSTN call - R=sip:31612345678 at sip.voxbone.com ID=4OuHzx0F-f7N5o27zPs7VCmg1a371A5r
>> Jun 14 12:51:21 sip1 proxy[3831]: NOTICE: <script>: Appending P-D-URI 'sip:127.0.0.1:5060;received='sip:98.222.112.123:5060;lr;transport=udp'' - R=sip:31612345678 at sip.voxbone.com ID=4OuHzx0F-f7N5o27zPs7VCmg1a371A5r
>> Jun 14 12:51:21 sip1 proxy[3831]: NOTICE: <script>: Forcing request via B2BUA 'sip:127.0.0.1:5080' - R=sip:31612345678 at sip.voxbone.com ID=4OuHzx0F-f7N5o27zPs7VCmg1a371A5r
>> Jun 14 12:51:21 sip1 proxy[3831]: NOTICE: <script>: Request leaving server, D-URI='sip:127.0.0.1:5080' - R=sip:31612345678 at sip.voxbone.com ID=4OuHzx0F-f7N5o27zPs7VCmg1a371A5r
>> Jun 14 12:51:21 sip1 proxy[3830]: NOTICE: <script>: NAT-Reply - S=100 - Connecting M=INVITE IP=92.69.229.52:36671 (127.0.0.1:5080) ID=4OuHzx0F-f7N5o27zPs7VCmg1a371A5r
>> Jun 14 12:51:21 sip1 proxy[3827]: NOTICE: <script>: NAT-Reply - S=503 - Internal Server Error - tnk M=INVITE IP=92.69.229.52:36671 (127.0.0.1:5080) ID=4OuHzx0F-f7N5o27zPs7VCmg1a371A5r
>> Jun 14 12:51:21 sip1 proxy[3827]: NOTICE: <script>: Failure route for PSTN call - R=sip:31612345678 at sip.voxbone.com ID=4OuHzx0F-f7N5o27zPs7VCmg1a371A5r
>> *****************************
>>
>> As seen in the log, the number which is dialed by the subscriber erik  (31612345678) is not rewrited in the form of 001131612345678 which is defined in the PEER Outbound Rewrite Rules for Callee. I am getting a S=503 - Internal Server Error back from voxbone because there is no prefix set.
>>
>> Could you help me to solve this issue. I thing it is a setting but now i do not know where to look.
>>
>> Thanks for your help!
>>
>> Warm regards,
>> Jay
>>
>>
> _______________________________________________
> Spce-user mailing list
> Spce-user at lists.sipwise.com
> https://lists.sipwise.com/listinfo/spce-user
> 



More information about the Spce-user mailing list