Thanks Daniel. It was very useful but I had to do the transformation in two parts maybe because I'm very new with this.
Is correct like this?
if (t_check_status("302")) { #New contact is sip:xx@172.16.208.111:5060 ;user=phone;q=0.5,sip:xx@172.16.208.112:5060;user=phone;q=0.25; $var(redirect_uri) = $(T_rpl($ct){nameaddr.uri}); xlog("Got a 302 - redirecting to $(var(redirect_uri){uri.host})" ); get_redirects("*:1"); $xavp(ip_b[$avp(current_route)]=>name) = $(var(redirect_uri){uri.host}); xlog("Got a 302 - redirecting $hdr(Contact)"); route(RELAY); #t_relay(); }
Is there a way to do it in one line?
Thanks again!
Diego
2017-01-20 13:16 GMT-03:00 Daniel Tryba d.tryba@pocos.nl:
On Fri, Jan 20, 2017 at 05:11:32PM +0100, Daniel Tryba wrote:
The host part of this contact is: $(T_rpl($ct){nameaddr.uri});
Which is not correct, {uri.host} should to the job (according to https://www.kamailio.org/wiki/cookbooks/4.1.x/transformations#urihost )
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users