Hello,
I'm having some troubles with modifying $fU in my kamailio.cfg.
The following line appears to have no effect: $fU = $(fU{s.substr,2,0});
I would expect it to remove the first two leading characters from $fU. Has anyone else seen this? I have the same issue with modifying $fu. We're not using the uac module. And we're using the latest stable version of Kamailio.
Thanks, -Sven
Hi Sven,
$fU is read-only. You will have to use uac_replace_from("$(fU{s.substr,2,0})", "");
Thanks, Carsten
2015-09-30 16:17 GMT+02:00 Sven Neuhaus neuhaus@tyntec.com:
Hello,
I'm having some troubles with modifying $fU in my kamailio.cfg.
The following line appears to have no effect: $fU = $(fU{s.substr,2,0});
I would expect it to remove the first two leading characters from $fU. Has anyone else seen this? I have the same issue with modifying $fu. We're not using the uac module. And we're using the latest stable version of Kamailio.
Thanks, -Sven
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
Hi Carsten,
Am 30.09.2015 um 16:26 schrieb Carsten Bock:
$fU is read-only. You will have to use uac_replace_from("$(fU{s.substr,2,0})", "");
the documentation is wrong then, it states that both $fu and $fU are R/W. Will adding the uac module (to get these functions) have any adverse effects?
Thanks, -Sven
Hello; it is applied after t_relay() or msg_apply() functions. you can try it like
$var(fufix)=$fU; $fU=$(var(fufix){s.substr,2,0});
-- View this message in context: http://sip-router.1086192.n5.nabble.com/modifying-fu-fU-R-URI-From-tp141949p... Sent from the Users mailing list archive at Nabble.com.
On 30/09/15 16:31, Sven Neuhaus wrote:
Hi Carsten,
Am 30.09.2015 um 16:26 schrieb Carsten Bock:
$fU is read-only. You will have to use uac_replace_from("$(fU{s.substr,2,0})", "");
the documentation is wrong then, it states that both $fu and $fU are R/W. Will adding the uac module (to get these functions) have any adverse effects?
These variables are no longer read-only like it used to be long time ago, but updating them is not immediately visible in the incoming sip message, being operations over headers, see:
- http://www.kamailio.org/wiki/tutorials/faq/main#why_changes_made_to_headers_...
Cheers, Daniel