We were in similar situation. Many years with Asterisk and then we were forced to use ser - and we preferred Kamailio.<div>Now we do:</div><div>Kamailio has global IP address and clients register to it.</div><div>Kamailio forward all calls to Asterisk boxes using following:</div>
<div><div>  ds_select_dst(&quot;1&quot;,&quot;4&quot;);#You can use many asterisk boxes this way</div><div>  $sht(forw=&gt;$ft)=$du; #this way I store used path</div><div>I used t_relay, instead of forward, because my Asterisks are with local IP.</div>
<div>Calls from Asterisk are send to Kamailio if they are to local user, or to our SIP provider. There are no problems with calls from Asterisk to SIP provider, even if Asterisk is behind NAT.</div><div>Asterisk accepts calls from SIP provider though registrar lines in sip.conf. Asterisk can forward calls from our SIP provider to  local users in Kamailio.</div>
<div>I got problems with ACK and BYE. To solve them, I used </div><div><div>if(($td==&quot;<a href="http://sip.name.of.kamailio.server.com">sip.name.of.kamailio.server.com</a>&quot;)||($si==&quot;IPofServer&quot;)){</div>
<div>  $du=$sht(forw=&gt;$ft);</div></div><div>}</div><br><div class="gmail_quote">On Fri, Feb 3, 2012 at 8:13 PM, Greg Mannie <span dir="ltr">&lt;<a href="mailto:greg@latigi.com">greg@latigi.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello<br>
<br>
After much reading I have come to the realization that after years of using Asterisk I know very little about Sip.<br>
<br>
I have my Kamailio box up, I have Asterisk 1.8.x running with realtime working.  I thought it would be just a case of registering SIP trunks from my provider to the kamailio and registering our internal asterisk servers to the kamailio.<br>

<br>
Much of what I read talks about using Asterisk as the PSTN interface, but that interface is through a sip trunk purchased from a provider.  Won&#39;t Kamailio be the PSTN gateway?  The idea here is to pool all the sip trunks from the various hosted asterisk solutions (VM running asterisk) and point them all to a proxy to facilitate the aggregation of traffic.<br>

<br>
I have been reading SIP tutorials and the mailing list archives.  If anyone has a sample config and perhaps a little direction it would be highly appreciated.<br>
<br>
Thank you<br>
<br>
Greg<br>
<br>
<br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">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/<u></u>cgi-bin/mailman/listinfo/sr-<u></u>users</a><br>
</blockquote></div><br></div>