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
-- Carsten Bock CEO (Geschäftsführer) ng-voice GmbH Schomburgstr. 80 D-22767 Hamburg / Germany http://www.ng-voice.com mailto:carsten@ng-voice.com Office +49 40 5247593-0 Fax +49 40 5247593-99 Sitz der Gesellschaft: Hamburg Registergericht: Amtsgericht Hamburg, HRB 120189 Geschäftsführer: Carsten Bock Ust-ID: DE279344284 Hier finden Sie unsere handelsrechtlichen Pflichtangaben: http://www.ng-voice.com/imprint/
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 -- Daniel-Constantin Mierla http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Book: SIP Routing With Kamailio - http://www.asipto.com
participants (4)
-
Carsten Bock -
Daniel-Constantin Mierla -
Sven Neuhaus -
ycaner