<div dir="ltr">Hi Jibran,<div><br><div>Here is an old thread as reference:</div><div><br><a href="http://lists.sip-router.org/pipermail/sr-users/2013-August/079336.html">http://lists.sip-router.org/pipermail/sr-users/2013-August/079336.html</a><br></div><div><br></div><div>I wouldn't want to do the whole handshake of INVITE,PROXY-AUTH,INVITE with username/password on a Provider for huge number of calls..imagine sending thousands of call to that provider and for each call going through the trouble of exchanging authentication. </div><div>Thats why its usually recommended to go with IP-Authentication only. Send INVITE and Provider says Lets do this call,simple and easy.</div><div><br></div><div>From the configuration perspective this is my idea of still using UAC.</div><div><br></div><div>- Call coming from FS on kamailio</div><div>- Rewrite the from-uri  (so the provider receives calls from the registered username)</div><div>- modify the to-domain part to contain the IP address of the provider</div><div>- set the $du to ip of the provider, and t_relay() the call.</div><div>- Most likely the Provider would say Proxy-Auth required..that can be caught in failure_route[]</div><div>- There you can call the uac_auth() function to have username.password attached to the response of above. <a href="http://kamailio.org/docs/modules/4.3.x/modules/uac.html#uac.f.uac_auth()">http://kamailio.org/docs/modules/4.3.x/modules/uac.html#uac.f.uac_auth()</a></div><div>- once this function is successful send the INVITE again to the provider.</div><div><br></div><div>Last three steps can be the following snippet of code(reference from <a href="http://opensips.org/pipermail/users/2010-August/013947.html">here</a>):</div><div><br></div><div><pre style="color:rgb(0,0,0)">failure_route[2] {
     if (t_check_status("40[17]")) {
        xlog("got challenged \n");
        if (uac_auth()) {
            xlog("auth was succesful \n");
            t_relay("udp:ip_addr:5060"); //provider's IP_ADDR
        }
}
</pre></div><div><br></div><div><br></div><div>I hope you get IP Auth from the provider, and find the reply useful.</div><div><br></div><div>Regards,</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 29, 2015 at 4:49 PM, Ali Jibran <span dir="ltr"><<a href="mailto:alijibran@vividtech.io" target="_blank">alijibran@vividtech.io</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Hi all.<br>
I have this setup.<br>
Trunk--->Kamailio---->FreeSWITCH<br>
<br>
I have a trunk from a sip provided and registered successfully with the UAC module. Incoming is working fine. I need to make out going through kamailio too.<br>
<br>
I have it in the dialplan to forward the invite to kamailio from FreeSWITCH. I can see it the logs that it reaches kamailio. Now how do I make the call via the trunk?<br>
<br>
Basically this is what I'm trying to workout<br>
FS---->kamailio---->trunk.<br>
<br>
<br>
Any help will be much appreciated. Thanks.<br>
AJ<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div><br></div></div>