<div dir="ltr">Hi Travis,<div><br></div><div>two projects that enables siptrunking and routing:</div><div><br></div><div><a href="https://github.com/voiceboys/sbcOS">https://github.com/voiceboys/sbcOS</a>  (ip-auth based or registrar on your side)</div><div><a href="https://dsiprouter.readthedocs.io/en/latest/">https://dsiprouter.readthedocs.io/en/latest/</a>  <br></div><div><br></div><div>Also intressting to see how they solved this problems.</div><div><br></div><div>If you could describe your siptrunk a bit more,</div><div>then would here many people that can point you in the right direction how to solve that with or without kamailio.</div><div><br></div><div>Cheers</div><div>Karsten</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Di., 20. Aug. 2019 um 17:11 Uhr schrieb Travis Ryan <<a href="mailto:travis@travisryan.com">travis@travisryan.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thanks,<br>
<br>
I want to eventually get to a setup like the one here: <br>
<a href="https://github.com/CyCoreSystems/asterisk-k8s-demo" rel="noreferrer" target="_blank">https://github.com/CyCoreSystems/asterisk-k8s-demo</a><br>
<br>
But since I'll need Kamailio to handle a high load of incoming calls, I <br>
think I need it to direct traffic, etc for any number of Asterisk <br>
servers behind it.<br>
<br>
In this setup it indeed has RTPProxy, etc. I just want to understand how <br>
to use it rather than just drop it in, etc. Also the demo doesn't have <br>
any config for an outside SIP trunk, etc.<br>
<br>
Maybe this helps?<br>
<br>
Thanks,<br>
Travis<br>
<br>
On 8/20/19 11:01 AM, Daniel Tryba wrote:<br>
> On Tue, Aug 20, 2019 at 10:22:26AM -0400, Travis Ryan wrote:<br>
>> What role is Kamailio to my Asterisk? Just an Outbound proxy? Do I need to<br>
>> still register the trunk from each Asterisk box "thru" the Kamailio proxy,<br>
>> etc?<br>
>><br>
>> Also, I'm merely accepting outside calls and then validating the caller and<br>
>> bridging them back out to the PSTN, so I don't have any local SIP clients,<br>
>> etc., so no need to register the sip devices, etc.<br>
> The real question is what do you need kamailio to do? You answer this<br>
> with as a simple proxy.<br>
><br>
> A possible solution for you is to use kamilio with the dispatcher module. One<br>
> id (1) for the PSTN side, one id (2) for the Asterisk side. If a call comes in<br>
> from 1, route it to 2 and v.v.<br>
><br>
> This makes the kamailio machine the "endpoint" for both PSTN and<br>
> Asterisk side.<br>
><br>
> With the "default" config that comes with kamailio all you need to do is<br>
> strip out anything from the accounting bit in request_route (line 508)<br>
> <a href="https://github.com/kamailio/kamailio/blob/master/etc/kamailio.cfg" rel="noreferrer" target="_blank">https://github.com/kamailio/kamailio/blob/master/etc/kamailio.cfg</a><br>
> and insert something like:<br>
><br>
> if(ds_is_from_list("1",3))<br>
> {<br>
>       $avp(dispatcherid)="2";<br>
> }<br>
> else if(ds_is_from_list("2",3))<br>
> {<br>
>       $avp(dispatcherid)="1";<br>
> }<br>
> else<br>
> {<br>
>       send_reply("403", "Go away");<br>
>       exit;<br>
> }<br>
><br>
> route(DISPATCHER);<br>
> route(RELAY);<br>
><br>
> With route DISPATCHER being:<br>
> route[DISPATCHER]<br>
> {<br>
>       if(!ds_select_dst($avp(dispatcherid), "4"))<br>
>       {<br>
>               send_reply("501", "No dispatcher available");<br>
>               exit;<br>
>       }<br>
><br>
>       t_on_failure("RTF_DISPATCH");<br>
><br>
>       return;<br>
> }<br>
><br>
> See <a href="https://kamailio.org/docs/modules/stable/modules/dispatcher.html#dispatcher.ex.config" rel="noreferrer" target="_blank">https://kamailio.org/docs/modules/stable/modules/dispatcher.html#dispatcher.ex.config</a><br>
> for more info on integrating the dispatcher module.<br>
><br>
> More advanced subjects to look at are:<br>
> -do you need an rtp proxy?<br>
> -do you need topology hiding?<br>
> -is NAT involved?<br>
><br>
> But leave them until you have a clue about how to use kamailio as a sip proxy in a<br>
> simple test environment (e.g. between 2 asterisk servers).<br>
><br>
> _______________________________________________<br>
> Kamailio (SER) - Users Mailing List<br>
> <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
> <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Mit freundlichen Grüßen<br>*Karsten Horsmann*<br></div>