<div dir="ltr">Hello Vic,<div><br></div><div>Can you tell me from which route are you trying this function? It only allows on request route, branch route and failure route. I think you misunderstood how to use the exported function, let me guide you. It will not update only the user part of the 'from' uri but works on uri. So you need to create a custom string like below to fulfill your requirements and the first argument is for display part not for uri part.</div><div><br></div><div><div>$avp(fromuri) = "sip:" + <b>$avp(650)</b> + "@" + $fd;</div><div><br></div><div><div>It should be called only once at initial requests and the subsequent requests(if you loaded the dialog module and created module or used forced_dialog in the uri module) and responses(using tm module) will be automatically updated your 'from uri'.</div><div></div></div><div><br></div><div>Refer the below example which helps you to guide how you can use this function in different use cases.</div><div><br></div><div><i>$avp(display) = "Jolin";</i></div><div><i>$avp(fromuri) = "<a href="mailto:sip%3A%2B18736352333@myopensipsdomain.com">sip:+18736352333@myopensipsdomain.com</a>"</i></div><div><i><br></i></div><div><i>REPLACE BOTH display name and uri</i></div><div><i>uac_replace_from("$avp(display)","$avp(fromuri)");</i></div><div><i>e.g. received From: "Vic" <<a href="mailto:sip%3A8736352333@receiveddomain.com">sip:8736352333@receiveddomain.com</a>>;tag=ca4a1348</i></div><div><i> sent From: "<b>Jolin</b>" <<b><a href="mailto:sip%3A%2B18736352333@myopensipsdomain.com">sip:+18736352333@myopensipsdomain.com</a></b>>;tag=ca4a1348</i></div><div><br></div><div>REPLACE ONLY display name</div><div><div><i>uac_replace_from("$avp(display)","");</i></div><div><i>e.g. received From: "Vic" <<a href="mailto:sip%3A8736352333@receiveddomain.com">sip:8736352333@receiveddomain.com</a>>;tag=ca4a1348</i></div><div><i> sent From: "<b>Jolin</b>" <sip:</i><a href="mailto:8736352333@receiveddomain.com">8736352333@receiveddomain.com</a><i>>;tag=ca4a1348</i></div><div></div></div><div><br></div><div><div><i>REPLACE ONLY uri WITHOUT TOUCHING display name</i></div><div><i>uac_replace_from( ,"$avp(fromuri)");</i></div><div><i>e.g. received From: "Vic" <<a href="mailto:sip%3A8736352333@receiveddomain.com">sip:8736352333@receiveddomain.com</a>>;tag=ca4a1348</i></div><div><i> sent From: "Vic" <<b><a href="mailto:sip%3A%2B18736352333@myopensipsdomain.com">sip:+18736352333@myopensipsdomain.com</a></b>>;tag=ca4a1348</i></div><div></div></div><div><br></div><div>REMOVE display and REPLACE uri</div><div><div><div><i>uac_replace_from("","$avp(fromuri)");</i></div><div><i>e.g. received From: "Vic" <<a href="mailto:sip%3A8736352333@receiveddomain.com">sip:8736352333@receiveddomain.com</a>>;tag=ca4a1348</i></div><div><i> sent From: <<b><a href="mailto:sip%3A%2B18736352333@myopensipsdomain.com">sip:+18736352333@myopensipsdomain.com</a></b>>;tag=ca4a1348</i></div><div></div></div><div></div></div><div><br></div><div><br></div><div>For more information you can read the uri module documentation <a href="https://opensips.org/html/docs/modules/devel/uac.html#func_uac_replace_from">here.</a></div><div><br></div><div><b>NOTE:</b> If you're using <b>3.X.X</b> version then avoid double quotes for avp variables.</div><div><div><i>e.g. </i><i><b>uac_replace_from($avp(display),$avp(fromuri));</b></i></div><div><br></div></div><div><br></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div>Thanks & Regards</div><div dir="ltr"><b>Diptesh Patel</b><div>Software Developer </div><div>Ecosmob Technologies Ltd, </div><div>Ahmedabad</div><div>Mo:<b>+919898962659</b></div></div></div></div></div></div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 10, 2020 at 12:29 AM Vic Jolin <<a href="mailto:adjolin@gmail.com">adjolin@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>Are there other ways of "changing" callerids for a certain call aside from uac_replace_from?</div><div><br></div><div>And what is the correct way of doing this?</div><div><br></div><div>I have uac_replace_from("$avp(650)", ""); </div><div><br></div><div>I find it giving errors when I try to update the uri with</div><div><br></div><div>sip:$avp(650)@ipadddress:poprt</div></div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div>
<br>
<div><font face="Arial" size="2" style="background-color:white" color="#808080"><b>Disclaimer</b></font></div><div><div><span style="background-color:white;color:rgb(128,128,128);font-family:Arial;font-size:small">In addition to generic Disclaimer which you have agreed on our website, any views or opinions presented in this email are solely those of the originator and do not necessarily represent those of the Company or its sister concerns. Any liability (in negligence, contract or otherwise) arising from any third party taking any action, or refraining from taking any action on the basis of any of the information contained in this email is hereby excluded.</span></div></div><div><span style="background-color:white;color:rgb(128,128,128);font-family:Arial;font-size:small"><br></span></div><div><font face="Arial" size="2" style="background-color:white" color="#808080"><b>Confidentiality</b></font></div><div><font face="Arial" size="2" style="background-color:white" color="#808080">This communication (including any attachment/s) is intended only for the use of the addressee(s) and contains information that is PRIVILEGED AND CONFIDENTIAL. Unauthorized reading, dissemination, distribution, or copying of this communication is prohibited. Please inform originator if you have received it in error.</font></div><div><font face="Arial" size="2" style="background-color:white" color="#808080"><br></font></div><div><span style="background-color:white;color:rgb(128,128,128);font-family:Arial;font-size:small"><b>Caution for viruses, malware etc.</b></span></div><div><font face="Arial" size="2" style="background-color:white" color="#808080">This communication, including any attachments, may not be free of viruses, trojans, similar or new contaminants/malware, interceptions or interference, and may not be compatible with your systems. You shall carry out virus/malware scanning on your own before opening any attachment to this e-mail. The sender of this e-mail and Company including its sister concerns shall not be liable for any damage that may incur to you as a result of viruses, incompleteness of this message, a delay in receipt of this message or any other computer problems. </font></div>