Hello,
what is printed by the line:
xinfo("duri = $var(duri)\n");
Cheers,
Daniel
On 12.12.23 08:01, hanxiaofang--- via sr-users wrote:
Hi Kamailio experts,
OS: Debian11
Kamailio ver: 5.7.3
{uri.duri} doesn't seem to work
The following script can be reproduced:
```
debug=2
log_stderror=yes
# mpath="/usr/local/lib/kamailio/modules/"
loadmodule "tm.so"
loadmodule "sl.so"
loadmodule "pv.so"
loadmodule "siputils.so"
loadmodule "xlog.so"
loadmodule "ctl.so"
loadmodule "htable.so"
modparam("tm", "failure_reply_mode", 3)
modparam("tm", "fr_timer", 30000)
modparam("tm", "fr_inv_timer", 120000)
request_route {
xinfo("*** $sel(msg)\n");
sl_send_reply("404", "Not here");
exit;
}
event_route[htable:mod-init] {
$var(ouri) = "sip:alice@server.com:5060;nat=yes;transport=tcp;line=xyz";
$var(duri) = $(var(ouri){uri.duri}); # =>
"sip:server.com:5060;transport=tcp"
xinfo("ouri = $var(ouri)\n");
xinfo("duri = $var(duri)\n");
if ($var(duri) == "sip:server.com:5060;transport=tcp" ) {
xinfo("uri.duri work well\n");
} else {
xerr("something is wrong\n");
}
}
```
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-leave(a)lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
--
Daniel-Constantin Mierla (@
asipto.com)
twitter.com/miconda --
linkedin.com/in/miconda
Kamailio Consultancy and Development Services
Kamailio Advanced Training --
asipto.com