Hi,
I was wondering if anyone has used "substr()" function from TEXTOPS in "onreply_route" block. This function works fine in "route" and "branch_route" blocks. However, it creates duplicate fields (instead of substituting) when being used in "onreply_route" blocks.
I need to modify FROM field in "onreply_route" block. As far as I know, "uac_replace_from()" function works only in request_route block, so my only option is to use "substr()".
Thanks, Alex R
_________________________________________________________________ Proud to be a PC? Show the world. Download the “I’m a PC” Messenger themepack now. hthttp://clk.atdmt.com/MRT/go/119642558/direct/01/
El Miércoles, 26 de Noviembre de 2008, Alex R.S.M escribió:
Hi,
I was wondering if anyone has used "substr()" function from TEXTOPS in "onreply_route" block. This function works fine in "route" and "branch_route" blocks. However, it creates duplicate fields (instead of substituting) when being used in "onreply_route" blocks.
I need to modify FROM field in "onreply_route" block. As far as I know, "uac_replace_from()" function works only in request_route block, so my only option is to use "substr()".
"uac_replace_from()" replaces the From downstream cally restores it when a reply arrives, before forwarding it upstream (to the caller). You don't need to use "uac_replace_from()" in onreply_route.
Also, I already realized that "uac_replace_from()" can't be used two times during the same transaction since it creates duplicate value, but this occurs also when using it twice in request_route block.
On 11/26/08 23:25, Iñaki Baz Castillo wrote:
El Miércoles, 26 de Noviembre de 2008, Alex R.S.M escribió:
Hi,
I was wondering if anyone has used "substr()" function from TEXTOPS in "onreply_route" block. This function works fine in "route" and "branch_route" blocks. However, it creates duplicate fields (instead of substituting) when being used in "onreply_route" blocks.
I need to modify FROM field in "onreply_route" block. As far as I know, "uac_replace_from()" function works only in request_route block, so my only option is to use "substr()".
"uac_replace_from()" replaces the From downstream cally restores it when a reply arrives, before forwarding it upstream (to the caller). You don't need to use "uac_replace_from()" in onreply_route.
be sure parameter from_restore_mode is set to auto: http://kamailio.org/docs/modules/1.4.x/uac.html#id2454160
Also, I already realized that "uac_replace_from()" can't be used two times during the same transaction since it creates duplicate value, but this occurs also when using it twice in request_route block.
can be used after transaction has been created several times, for example in branch_route -- so you have different From in case of many destinations.
Cheers, Daniel
can be used after transaction has been created several times, for example in branch_route -- so you have different From in case of many destinations.
Cheers, Daniel
When I am using substr() in branch_route it creates duplicate FROM fields. So, what is a good place to use this function when branching? branch_route or onreply_route or request route block?
Thanks, AR
Date: Thu, 27 Nov 2008 12:39:06 +0200 From: miconda@gmail.com To: users@lists.kamailio.org Subject: Re: [Kamailio-Users] using "substr()" function from TEXTOPS in "onreply_route" block
On 11/26/08 23:25, Iñaki Baz Castillo wrote:
El Miércoles, 26 de Noviembre de 2008, Alex R.S.M escribió:
Hi,
I was wondering if anyone has used "substr()" function from TEXTOPS in "onreply_route" block. This function works fine in "route" and "branch_route" blocks. However, it creates duplicate fields (instead of substituting) when being used in "onreply_route" blocks.
I need to modify FROM field in "onreply_route" block. As far as I know, "uac_replace_from()" function works only in request_route block, so my only option is to use "substr()".
"uac_replace_from()" replaces the From downstream cally restores it when a reply arrives, before forwarding it upstream (to the caller). You don't need to use "uac_replace_from()" in onreply_route.
be sure parameter from_restore_mode is set to auto: http://kamailio.org/docs/modules/1.4.x/uac.html#id2454160
Also, I already realized that "uac_replace_from()" can't be used two times during the same transaction since it creates duplicate value, but this occurs also when using it twice in request_route block.
can be used after transaction has been created several times, for example in branch_route -- so you have different From in case of many destinations.
Cheers, Daniel
-- Daniel-Constantin Mierla http://www.asipto.com
Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
_________________________________________________________________ Send e-mail faster without improving your typing skills. http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_speed_1...