SIP URI matching

The following example shows how to match SIP URIs so that number portability information elements in the inbound call leg can be included in the outbound call leg.



Incoming Called party

Incoming Calling party

Outgoing Called party

Outgoing Calling party

1 default sip:(\d+)(;.*)*(;npdi=yes|;npdi|;rn=\d+)(;*)*(;npdi=yes|;npdi|;rn=\d+)(;*)*@.* sip:(\d+)@.* sip:$1@$3$5 sip:$1@
2 default sip:(\d+)(;.*)*(;npdi=yes|;npdi)(;*)*@.* sip:(\d+)@.* sip:$1@$3 sip:$1@
3 default sip:(\d+)@[^;]*(;.*)*(;npdi=yes|;npdi|;rn=\d+)(;*)*(;npdi=yes|;npdi|;rn=\d+)(;*)* sip:(\d+)@.* sip:$1@$3$5 sip:$1@
4 default sip:(\d+)@[^;]*(;.*)*(;npdi=yes|;npdi)(;*)* sip:(\d+)@.* sip:$1@$3 sip:$1@
5 default sip:(\d+)(;.*)*(;npdi=yes|;npdi)(;*)*@.* sip:(\d+)@.* sip:$1@ sip:$1@


The following rules are used in this route:

Rule Description
1 Routes 1 and 2 are used when the npdi and rn parameters are present in the user part of the SIP URI.
2 Routes 3 and 4 are used when the npdi and rn parameters are present in the parameter section of the SIP URI.
3 Routes 1 and 3 will match when both the ndpi and rn parameters are present in the request URI.

Route 2 and 4 will match when only the npdi parameter is present.

5 Route 5 will match scenarios where neither of the parameters are set in the request URI.