[Spce-user] REWRITE ROULES

Daniel Grotti dgrotti at sipwise.com
Mon Mar 11 06:55:00 EDT 2019


Hi,
what call is that?
Call FROM PSTN ? Call TO PSTN ?
It would be better to paste the full proxy log, and not only a section.

Also, please notice you *cannot* use ${caller_cc} and the other 
variables in the Rewrite Rules for a PEER!
Please check documentation for that.*



*

--
Daniel Grotti

Head of Customer Support                               Sipwise GmbH
e: dgrotti at sipwise.com                               Europaring F15
t: +43(0)130120332                          A-2345 Brunn Am Gebirge
w: www.sipwise.com          FN: 305595f      FG: LG Wiener Neustadt

On 3/11/19 11:48 AM, Alessandro Romano wrote:
>
> Dear All,
>
> i’m very confused on revrite roules
>
> i’ve this situation
>
> Mar 11 10:55:54 c5 proxy[1561]: NOTICE: <script>: Setting acc 
> destination-leg for uuid 'd4e8bc38-c34a-4c99-839a-b73c88093c24': 
> '0|||8|0899358191|d4e8bc38-c34a-4c99-839a-b73c88093c24|0899358191|sip.positivonet.it|390899358191|sip.positivonet.it|0||||||||||||0899358191||' 
> - R=sip:0899358191 at 91.214.72.26:5060 
> ID=f515e00016f5-5c8630a9-bb6f630-2c2e8048-f7b at 127.0.0.1 UA='TELES-SBC'
>
> Mar 11 10:55:54 c5 proxy[1561]: NOTICE: <script>: Rewriting first 
> user-provided CLI '3351402534' to '003351402534' - 
> R=sip:0899358191 at 91.214.72.26:5060 
> ID=f515e00016f5-5c8630a9-bb6f630-2c2e8048-f7b at 127.0.0.1 UA='TELES-SBC'
>
> Mar 11 10:55:54 c5 proxy[1561]: NOTICE: <script>: Rewriting first 
> network-provided CLI '3351402534' to '003351402534' - 
> R=sip:0899358191 at 91.214.72.26:5060 
> ID=f515e00016f5-5c8630a9-bb6f630-2c2e8048-f7b at 127.0.0.1 UA='TELES-SBC'
>
> Mar 11 10:55:54 c5 proxy[1561]: NOTICE: <script>: Setting 
> caller_cli_userprov/caller_domain_userprov 
> '003351402534 at sip.positivonet.it' for upn - 
> R=sip:0899358191 at 91.214.72.26:5060 
> ID=f515e00016f5-5c8630a9-bb6f630-2c2e8048-f7b at 127.0.0.1 UA='TELES-SBC'
>
> Mar 11 10:55:54 c5 proxy[1561]: NOTICE: <script>: Setting From to 
> '<sip:003351402534 at sip.positivonet.it>' - 
> R=sip:0899358191 at 91.214.72.26:5060 
> ID=f515e00016f5-5c8630a9-bb6f630-2c2e8048-f7b at 127.0.0.1 UA='TELES-SBC'
>
> Mar 11 10:55:54 c5 proxy[1561]: NOTICE: <script>: Setting 
> caller_cli_netprov/caller_domain_netprov 
> '003351402534 at sip.positivonet.it' for npn - 
> R=sip:0899358191 at 91.214.72.26:5060 
> ID=f515e00016f5-5c8630a9-bb6f630-2c2e8048-f7b at 127.0.0.1 UA='TELES-SBC'
>
> Mar 11 10:55:54 c5 proxy[1561]: NOTICE: <script>: Setting PAI to 
> '<sip:003351402534 at sip.positivonet.it>' - 
> R=sip:0899358191 at 91.214.72.26:5060 
> ID=f515e00016f5-5c8630a9-bb6f630-2c2e8048-f7b at 127.0.0.1 UA='TELES-SBC'
>
> Mar 11 10:55:54 c5 proxy[1561]: NOTICE: <script>: Setting 
> P-Called-Party-ID '<sip:0899358191 at sip.positivonet.it>' - 
> R=sip:0899358191 at 91.214.72.26:5060 
> ID=f515e00016f5-5c8630a9-bb6f630-2c2e8048-f7b at 127.0.0.1 UA='TELES-SBC'
>
> Mar 11 10:55:54 c5 proxy[1561]: NOTICE: <script>: Appending P-D-URI 
> 'sip:lb at 127.0.0.1;lr;socket=sip:31.7.144.145:5060' - 
> R=sip:0899358191 at 91.214.72.26:5060 
> ID=f515e00016f5-5c8630a9-bb6f630-2c2e8048-f7b at 127.0.0.1 UA='TELES-SBC'
>
> Mar 11 10:55:54 c5 proxy[1561]: NOTICE: <script>: Forcing request via 
> B2BUA 'sip:127.0.0.1:5080' - R=sip:0899358191 at 91.214.72.26:5060 
> ID=f515e00016f5-5c8630a9-bb6f630-2c2e8048-f7b at 127.0.0.1 UA='TELES-SBC'
>
> Mar 11 10:55:54 c5 proxy[1561]: NOTICE: <script>: Request leaving 
> server, D-URI='sip:127.0.0.1:5080' - 
> R=sip:0899358191 at 91.214.72.26:5060 
> ID=f515e00016f5-5c8630a9-bb6f630-2c2e8048-f7b at 127.0.0.1 UA='TELES-SBC'
>
> Mar 11 10:56:14 c5 proxy[1561]: NOTICE: <script>: New request on proxy 
> - M=ACK R=sip:127.0.0.1:5080;prxroute=1 
> F=sip:3351402534 at telecomitalia.it;user=phone 
> T=sip:0899358191 at sip.positivonet.it;user=phone IP=185.29.248.37:5060 
> (127.0.0.1:5060) 
> ID=f515e00016f5-5c8630a9-bb6f630-2c2e8048-f7b at 127.0.0.1 UA='<null>'
>
> The from field is 003351402534 , must be 00393351402534
>
> Current config
>
> Rewrite roule on peering
>
> Inbound Rewrite Rules for Caller 
> <https://sip.positivonet.it:1443/rewrite/3/rules?back=https%3A%2F%2Fsip.positivonet.it%3A1443%2Frewrite#collapse_icaller> 
>
>
>
> 	
>
> *Match Pattern***
>
> 	
>
> *Replacement Pattern*
>
> 	
>
> *Description*
>
> 	
>
> *Enabled*
>
> 	
>
> 	
>
> ^(00|\+)([1-9][0-9]+)$
>
> 	
>
> \1
>
> 	
>
> International to E.164
>
> 	
>
> yes
>
> 	
>
> 	
>
> ^0([1-9][0-9]+)$
>
> 	
>
> ${caller_cc}0\1
>
> 	
>
> National to E.164
>
> 	
>
> yes
>
>
> 	
>
> ^([1-9][0-9]+)$
>
> 	
>
> ${caller_cc}${caller_ac}\1
>
> 	
>
> Local to E.164
>
> 	
>
> no
>
> Inbound Rewrite Rules for Callee 
> <https://sip.positivonet.it:1443/rewrite/3/rules?back=https%3A%2F%2Fsip.positivonet.it%3A1443%2Frewrite#collapse_icallee> 
>
>
>
> 	
>
> *Match Pattern***
>
> 	
>
> *Replacement Pattern*
>
> 	
>
> *Description*
>
> 	
>
> *Enabled*
>
> 	
>
> 	
>
> ^(00|\+)([1-9][0-9]+)$
>
> 	
>
> \2
>
> 	
>
> International to E.164
>
> 	
>
> yes
>
> 	
>
> 	
>
> ^0([1-9][0-9]+)$
>
> 	
>
> ${caller_cc}390\1
>
> 	
>
> National to E.164
>
> 	
>
> yes
>
> 	
>
> 	
>
> ^([1-9][0-9]+)$
>
> 	
>
> ${caller_cc}${caller_ac}\1
>
> 	
>
> Local to E.164
>
> 	
>
> no
>
> 	
>
> 	
>
> 	
>
> 	
>
> 	
>
> 	
>
> Outbound Rewrite Rules for Caller 
> <https://sip.positivonet.it:1443/rewrite/3/rules?back=https%3A%2F%2Fsip.positivonet.it%3A1443%2Frewrite#collapse_ocaller> 
>
>
>
> 	
>
> *Match Pattern***
>
> 	
>
> *Replacement Pattern*
>
> 	
>
> *Description*
>
> 	
>
> *Enabled*
>
> 	
>
> 	
>
> ^39([0-9][0-9]+)$
>
> 	
>
> \1
>
> 	
>
> E.164 to Italia National
>
> 	
>
> yes
>
> 	
>
> 	
>
> ^([1-9][0-9]+)$
>
> 	
>
> 00\1
>
> 	
>
> E.164 to International
>
> 	
>
> yes
>
> 	
>
> 	
>
> 	
>
> 	
>
> 	
>
> 	
>
> Outbound Rewrite Rules for Callee 
> <https://sip.positivonet.it:1443/rewrite/3/rules?back=https%3A%2F%2Fsip.positivonet.it%3A1443%2Frewrite#collapse_ocallee> 
>
>
>
> 	
>
> *Match Pattern***
>
> 	
>
> *Replacement Pattern*
>
> 	
>
> *Description*
>
> 	
>
> *Enabled*
>
> 	
>
> 	
>
> ^39([0-9][0-9]+)$
>
> 	
>
> \1
>
> 	
>
> E.164 to Italia National
>
> 	
>
> yes
>
> 	
>
> 	
>
> ^39(3[1-9][0-9]+)$
>
> 	
>
> \1
>
> 	
>
> E.164 to Italian MOBILE
>
> 	
>
> yes
>
> 	
>
> 	
>
> ^([1-9][0-9]+)$
>
> 	
>
> 00\1
>
> 	
>
> E.164 to International
>
> 	
>
> yes
>
> 	
>
> Rewrite roule for domain
>
> Inbound Rewrite Rules for Caller 
> <https://sip.positivonet.it:1443/rewrite/1/rules?back=https%3A%2F%2Fsip.positivonet.it%3A1443%2Frewrite#collapse_icaller> 
>
>
>
> 	
>
> *Match Pattern***
>
> 	
>
> *Replacement Pattern*
>
> 	
>
> *Description*
>
> 	
>
> *Enabled*
>
> 	
>
> 	
>
> ^(00|\+)([1-9][0-9]+)$
>
> 	
>
> \1
>
> 	
>
> International to E.164
>
> 	
>
> yes
>
> 	
>
> 	
>
> ^0([1-9][0-9]+)$
>
> 	
>
> ${caller_cc}0\1
>
> 	
>
> National to E.164
>
> 	
>
> yes
>
> 	
>
> 	
>
> ^([1-9][0-9]+)$
>
> 	
>
> ${caller_cc}${caller_ac}\1
>
> 	
>
> Local to E.164
>
> 	
>
> no
>
> 	
>
>
> 	
>
> *Match Pattern*
>
> 	
>
> *Replacement Pattern*
>
> 	
>
> *Description*
>
> 	
>
> *Enabled*
>
> 	
>
> 	
>
> ^(00|\+)([1-9][0-9]+)$
>
> 	
>
> \2
>
> 	
>
> International to E.164
>
> 	
>
> yes
>
> 	
>
> 	
>
> ^0([1-9][0-9]+)$
>
> 	
>
> ${caller_cc}0\1
>
> 	
>
> National to E.164
>
> 	
>
> yes
>
> 	
>
> 	
>
> ^3([1-9][0-9]+)$
>
> 	
>
> ${caller_cc}3\1
>
> 	
>
> National Mobile to E.164
>
> 	
>
> yes
>
> 	
>
> 	
>
> ^([1-9][0-9]+)$
>
> 	
>
> ${caller_cc}${caller_ac}\1
>
> 	
>
> Local to E.164
>
> 	
>
> no
>
> 	
>
> Outbound Rewrite Rules for Caller 
> <https://sip.positivonet.it:1443/rewrite/1/rules?back=https%3A%2F%2Fsip.positivonet.it%3A1443%2Frewrite#collapse_ocaller> 
>
>
>
> 	
>
> *Match Pattern***
>
> 	
>
> *Replacement Pattern*
>
> 	
>
> *Description*
>
> 	
>
> *Enabled*
>
> 	
>
> 	
>
> ^39([0-9][0-9]+)$
>
> 	
>
> \1
>
> 	
>
> E.164 to Italia National
>
> 	
>
> yes
>
> 	
>
> 	
>
> ^([1-9][0-9]+)$
>
> 	
>
> 00\1
>
> 	
>
> E.164 to International
>
> 	
>
> yes
>
> 	
>
>
> _______________________________________________
> Spce-user mailing list
> Spce-user at lists.sipwise.com
> https://lists.sipwise.com/listinfo/spce-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20190311/f50d9ec4/attachment-0001.html>


More information about the Spce-user mailing list