[Spce-user] Peer outbound re-write rules

Andrew Pogrebennyk apogrebennyk at sipwise.com
Thu Dec 5 16:20:47 EST 2013


Hi Clint,

Clint Wiley wrote:
> Hi,
> 
> Here is the proxy log:

the rewrite rule is applied properly and the call leaves the server
without 333 prefix:

Dec  5 13:16:23 sipproxy2 /usr/sbin/kamailio[1711]: INFO: <script>:
Relaying request, du='sip:sip.flowroute.com:5060',
fs='udp:67.20.37.3:5060' - R=sip:2405201302 at sip.flowroute.com
ID=NjdhOWM1MzFjYTRmMjgwMDkyNzY0N2EwYzU4OGZmOTY_b2b-1

This 'sip:sip.flowroute.com:5060' has caught my attention. From
proxy.log it looks like your peering IP address is 216.115.69.144.
However because of peer_auth_realm set to sip.flowroute.com proxy
changes R-URI to that address:

Dec  5 13:16:23 sipproxy2 /usr/sbin/kamailio[1882]: INFO: <script>:
Setting R-URI using peer auth realm '2405201302 at sip.flowroute.com' -
R=sip:2405201302 at 216.115.69.144:5060;transport=udp
ID=NjdhOWM1MzFjYTRmMjgwMDkyNzY0N2EwYzU4OGZmOTY

Then it sends request to the lb which resolves sip.flowroute.com via DNS
SRV. The request goes somewhere, but probably not where you want it.

Probably we should not overwrite R-URI with peer_auth_realm; we'll
review that. In the meantime you can disable this overwrite. Copy
/etc/ngcp-config/templates/etc/kamailio/proxy/proxy.cfg.tt2 to
/etc/ngcp-config/templates/etc/kamailio/proxy/proxy.cfg.customtt.tt2 (if
it doesn't exist yet) and remove the following lines (for version 3.1,
in 2.8 search for the line which says "Setting R-URI using peer auth
realm"), save and ngcpcfg apply:
>                 if(pv_isset("$xavp(caller_real_prefs[0]=>peer_auth_realm)"))
>                 {
>                         xlog("L_NOTICE", "Setting R-URI '$rU@$xavp(caller_real_prefs[0]=>peer_auth_realm)' using peer auth realm of subscriber - [% logreq -%]\n");
>                         $ru = "sip:" + $rU + "@" + $xavp(caller_real_prefs[0]=>peer_auth_realm);
>                 }
>                 else if(pv_isset("$xavp(callee_real_prefs[0]=>peer_auth_realm)"))
>                 {
>                         xlog("L_NOTICE", "Setting R-URI '$rU@$xavp(callee_peer_prefs[0]=>peer_auth_realm)' using peer auth realm of peer - [% logreq -%]\n");
>                         $ru = "sip:" + $rU + "@" + $xavp(callee_peer_prefs[0]=>peer_auth_realm);
>                 }

Regards,
Andrew




More information about the Spce-user mailing list