[Devel] rr-callbacks and dst-uri for Path and NAT

Bogdan-Andrei Iancu bogdan at voice-system.ro
Wed Jan 25 15:49:24 CET 2006


Hi Andreas,

Andreas Granig wrote:

> Hi,
>
> AFAI understand, one can use the callback API of the rr-module to hook 
> up a function of a custom module which gets passed the parameters of 
> the current Route HF, right?

right

>
> So for handling NAT in combination with the Path HF, one could insert 
> a Path-HF like "Path: <sip:proxy-addr;received=nated-uac-addr>" at an 
> outbound proxy, which is converted to a Route HF by the home proxy for 
> subsequent requests towards the UAC.
>
> For handling this Route by using the received-param at the outbound 
> proxy without touching the rr-module, I could write a module which 
> registers a rr-callback and sets the dst-uri according to the 
> received-param. BUT... :o)

you can also inspect the Route params from the script by using RR 
function check_route_param(reg_exp). see
     http://openser.org/docs/modules/1.1.x/rr.html#CHECK-ROUTE-PARAM-ID
what the function cannot do is to fetch the param value you can just 
test the params against a RE. I was discussing on private with Juha 
about adding a new RR function which will load into an AVP the value of 
a Route param...

>
> The problem is, that the rr-module executes the callbacks before it 
> sets the dst-uri according to the uri of the current Route element. 
> Could the order probably be changed (first setting the dst-uri, then 
> executing rr-callbacks) to give the callback the chance to manipulate 
> the dst-uri?

I will take a look to see what will be the implication of this swap.

regards,
bogdan




More information about the Devel mailing list