[Spce-user] REWRITE ROULES

Alessandro Romano alessandro.romano at rpeng.it
Mon Mar 11 06:48:05 EDT 2019


 

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.positi
vonet.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.posi
tivonet.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.posi
tivonet.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.posi
tivonet.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.posi
tivonet.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.posi
tivonet.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.posi
tivonet.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

	

 

 

 

 

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


More information about the Spce-user mailing list