[SR-Users] basic Kamailio frontend to Asterisk

Travis Ryan travis at travisryan.com
Thu Aug 22 14:56:56 CEST 2019


I'm using sip.digiumcloud.net but eventually will be using wholesale at 
bandwidth.com. I'll take a look at your links. Thanks!

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


More information about the sr-users mailing list