[Kamailio-Users] using "substr()" function from TEXTOPS in "onreply_route" block

Alex R.S.M alex_rsm at hotmail.com
Mon Dec 8 16:34:28 CET 2008


> 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 at gmail.com
> To: users at 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 at 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_122008
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kamailio.org/pipermail/users/attachments/20081208/60326f78/attachment.htm 


More information about the Users mailing list