[SR-Users] Problem Re-writing RURI

Geoffrey Mina geoffreymina at gmail.com
Thu Jan 30 02:03:17 CET 2014


I am trying to manually rewrite the RURI for a certain scenario.

The RURI is currently:
sip:110219546496707 at 12.12.12.12;npdi;rate=0.000880

I want to re-write so it's just:
sip:110219546496707 at 12.12.12.12

I have the following snippet which isn't working:
xlog("L_INFO","sip:$(ruri{uri.user})@$(ruri{uri.host})");
$ru = "sip:$(ruri{uri.user})@$(ruri{uri.host})";
t_relay();


the log spits out exactly what I want, but writing the $ru variable results
in:
Jan 29 18:59:36 dev-sipgateway /usr/local/sbin/kamailio[23042]: ERROR:
<core> [resolve.c:1733]: sip_hostport2su(): ERROR: sip_hostport2su: could
not resolve hostname: "$(ruri{uri.host})"
Jan 29 18:59:36 dev-sipgateway /usr/local/sbin/kamailio[23042]: ERROR: tm
[ut.h:337]: uri2dst2(): failed to resolve "$(ruri{uri.host})"
Jan 29 18:59:36 dev-sipgateway /usr/local/sbin/kamailio[23042]: ERROR: tm
[t_fwd.c:1773]: t_forward_nonack(): ERROR: t_forward_nonack: failure to add
branches
Jan 29 18:59:36 dev-sipgateway /usr/local/sbin/kamailio[23042]: ERROR: tm
[tm.c:1502]: _w_t_relay_to(): ERROR: w_t_relay_to: t_relay_to failed
Jan 29 18:59:36 dev-sipgateway /usr/local/sbin/kamailio[23042]: ERROR: tm
[t_reply.c:1067]: run_failure_handlers(): ERROR: run_failure_handlers:
Error in run_top_route

Any hint would be greatly appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20140129/8bd73413/attachment-0001.html>


More information about the sr-users mailing list