<div dir="ltr">Bogdan-Andrei,<div><br></div><div>So I gave it a try and got error: </div><br>Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 [61003]  0. /usr/local/etc/opensips/opensips_residential_2022-10-11.cfg<br>Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 [61003] CRITICAL:core:yyerror: parse error in /usr/local/etc/opensips/opensips_residential_2022-10-11.cfg:456:22-23: too few param><br>Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 [61003]         xlog("new branch at change_from $ru to $avp(furi)<br>Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: ");<br>Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 [61003]         if ($avp(furi) != NULL) {<br>Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 [61003]                 uac_replace_from("$avp(furi)");<br>Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 [61003]                 ^~<br>Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 [61003]         }<br>Oct 14 14:42:22 ip-172-31-29-47 opensips[60994]: Oct 14 14:42:22 [61003] }<div><br></div><div><br></div><div>Here is my code: </div><div><br></div><div>### uac_registrant module<br>loadmodule "uac.so"<br>modparam("uac","restore_mode", "auto")  #auto</div><div><br></div><div><br></div>####### Routing Logic ########<br># main request routing logic<br>route{<div>if (dp_translate(10 ,$rU ,$rU) ) {<br>                $avp(furi) = "<a href="mailto:sip%3A1xxxxxxxxxx@gothamcity.com">sip:1xxxxxxxxxx@gothamcity.com</a>";<br>                #strip(1);<br><br>                if (!do_routing(0)) {<br>                        send_reply(500,"No PSTN Route found");<br>                        exit;<br>                }<br><br>                t_on_branch("change_from");<br>                route(relay);<br>                exit;<br>        }<div>}</div><div><br></div>branch_route[change_from] {<br>        xlog("new branch at change_from $ru to $avp(furi)\n");<br>        if ($avp(furi) != NULL) {<br>                uac_replace_from("$avp(furi)");<br>        }<br>}<div><br></div></div><div><br></div><div>NOTE: This is my first time playing with C-style code... Trying to learn what branches do/return, etc... </div><div><br></div><div>Rest of the code is default residential cfg. </div><div><br></div><div>Cheers,</div><div>Nitesh</div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 13, 2022 at 10:19 AM Nitesh Divecha <<a href="mailto:aviator.nitesh.d@gmail.com">aviator.nitesh.d@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">Bogdan-Andrei,<div><br></div><div>Thanks for your feedback... </div><div><br></div><div>Yes, the remote SIP server expects FROM HEADER (Calling Identity) in order to authenticate the caller to make outbound calls. </div><div><br></div><div>Where in cfg do I implement <span style="font-family:monospace">uac_replace_from()</span> ? Is it in Routing Logic or where modules are declared? </div><div><br></div><div>Also what happens if multiple DID providers are implemented in future? How will it affect the cfg file? Can we just implement via Control Panel? </div><div><br></div><div>Cheers, </div><div>Nitesh</div><div><br></div><div><br></div><div></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Oct 10, 2022 at 9:42 AM Bogdan-Andrei Iancu <<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
  
    
  
  <div>
    <font face="monospace">Hi Nitesh,<br>
      <br>
      In SIP, registration is done for receiving calls, it does not
      impact sending calls. So, define the remote server as GW in
      Dynamic Route and simply route the calls to it.  Note that maybe
      the remote server will expect you to use the as FROM hdr (calling
      identity) the AOR (SIP address) you are registering with, so maybe
      you should be an uac_replace_from() in cfg when sending to the GW.<br>
      <br>
      Best regards,<br>
    </font>
    <pre cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a href="https://www.opensips-solutions.com" target="_blank">https://www.opensips-solutions.com</a>
OpenSIPS Summit 27-30 Sept 2022, Athens
  <a href="https://www.opensips.org/events/Summit-2022Athens/" target="_blank">https://www.opensips.org/events/Summit-2022Athens/</a></pre>
    <div>On 10/7/22 9:00 PM, Nitesh Divecha
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">Hello All, 
        <div><br>
        </div>
        <div>Anyone using OpenSIPS CP 9.3.2? Need small help!</div>
        <div><br>
        </div>
        <div>I got OpenSIPS 3.3.1 running and I can make calls out to
          the gateway (SIP trunk) without any problems. </div>
        <div><br>
        </div>
        <div>My provider issued me a DID with user/pass and I was able
          to configure them under "UAC Registrant" and registered to a
          remote server. </div>
        <div><br>
        </div>
        <div>Question is - how can I route calls to "UAC Registrant"?
          From the "Dynamic Routing" menu I can only route calls to
          Gateway. How can I route calls to "UAC Registrant"?</div>
        <div><br>
        </div>
        <div>Any suggestions?</div>
        <div><br>
        </div>
        <div>Thank you in advance!</div>
        <div><br>
        </div>
        <div>Cheers,</div>
        <div>Nitesh</div>
      </div>
      <br>
      <fieldset></fieldset>
      <pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </div>

</blockquote></div>
</blockquote></div>