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 [email protected] http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
