[SR-Users] Kamailio and FreeSwitch integration

Daniel Tryba d.tryba at pocos.nl
Thu Oct 19 13:37:05 CEST 2017


On Thu, Oct 19, 2017 at 12:13:47PM +0100, Timothy oladapo olawuyi wrote:
> Kamailio will act as our SIP control while Freeswitch will act media server
> for incoming calls. 
> 
> Freeswitch will send all outgoing calls to Kamailio for onward transfer to
> our SIP provider network.
> 
> No registration, presence, location Accounting, Authentication etc. are
> required.
> 
> I have gone through the book SIP ROUTING WITH KAMAILIO and FreeSwitch and
> Kamailio integration sample config available at
> http://kb.asipto.com/freeswitch:kamailio-3.0.x-freeswitch-1.0.6d-ms am still
> unable to figure out how to go with the configuration.

That sample does all the things you don't want to implement.
 
> I will appreciate any one who can provide guideline for achieving the above
> scenario.

Your required config is a simple proxy.
https://kamailio.org/docs/modules/stable/modules/dispatcher.html#dispatcher.ex.config
contains a config example, which sends all traffic to 1 dispatcher. You
need to modify this a little. Add a second dispatcher so you have 1 for
your upstream and 1 for your freeswitch. If a message arrives from 1
dispatcher send it to the other. For example something like:

route[DISPATCH] 
{
  if(ds_is_from_list("1"))
  {
    ds_select_dst("2", "4");
  }
  else if(ds_is_from_list("2"))
  {
    ds_select_dst("1", "4");
  }
  else
  {
    sl_send_reply("403","Forbidden");
	exit;
  }
...



More information about the sr-users mailing list