<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
> can be used after transaction has been created several times, for <br>> example in branch_route -- so you have different From in case of many <br>> destinations.<br>> <br>> Cheers,<br>> Daniel<br><br>When I am using substr() in branch_route it creates duplicate FROM fields. So, what is a good place to use this function when <br>branching? branch_route or onreply_route or request route block?<br><br>Thanks,<br>AR<br><br><br><br><br>> Date: Thu, 27 Nov 2008 12:39:06 +0200<br>> From: miconda@gmail.com<br>> To: users@lists.kamailio.org<br>> Subject: Re: [Kamailio-Users] using "substr()" function from TEXTOPS in        "onreply_route" block<br>> <br>> <br>> <br>> On 11/26/08 23:25, Iñaki Baz Castillo wrote:<br>> > El Miércoles, 26 de Noviembre de 2008, Alex R.S.M escribió:<br>> > <br>> >> Hi,<br>> >><br>> >> I was wondering if anyone has used "substr()" function from TEXTOPS in<br>> >> "onreply_route" block. This function works fine in "route" and<br>> >> "branch_route" blocks. However, it creates duplicate fields (instead of<br>> >> substituting) when being used in "onreply_route" blocks.<br>> >><br>> >> I need to modify FROM field in "onreply_route" block. As far as I know,<br>> >> "uac_replace_from()" function works only in request_route block, so my only<br>> >> option is to use "substr()".<br>> >> <br>> ><br>> > "uac_replace_from()" replaces the From downstream cally restores it when a <br>> > reply arrives, before forwarding it upstream (to the caller).<br>> > You don't need to use "uac_replace_from()" in onreply_route.<br>> > <br>> be sure parameter from_restore_mode is set to auto:<br>> http://kamailio.org/docs/modules/1.4.x/uac.html#id2454160<br>> <br>> > Also, I already realized that "uac_replace_from()" can't be used two times <br>> > during the same transaction since it creates duplicate value, but this occurs <br>> > also when using it twice in request_route block.<br>> > <br>> can be used after transaction has been created several times, for <br>> example in branch_route -- so you have different From in case of many <br>> destinations.<br>> <br>> Cheers,<br>> Daniel<br>> <br>> -- <br>> Daniel-Constantin Mierla<br>> http://www.asipto.com<br>> <br>> <br>> _______________________________________________<br>> Users mailing list<br>> Users@lists.kamailio.org<br>> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users<br><br /><hr />Send e-mail faster without improving your typing skills. <a href='http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_speed_122008' target='_new'>Get your Hotmail® account.</a></body>
</html>