[Freeswitch-users] Setup FreeSwitch behind Kamailio Dispatcher.

Leon de Rooij leon at scarlet-internet.nl
Tue Nov 15 13:50:36 MSK 2011


Hello Vik and Matt,

Of course, here's my current opensips.cfg, but note that it contains bugs and is far from ready, just call setup/teardown and registrations work.

Also, I have a dispatcher.list containing one set ("1") pointing to two sip profiles (at different udp ports) on one fs instance. Both sip profiles have the outbound-proxy param set to the sip uri of the proxy.

kind regards,

Leon





On Nov 14, 2011, at 5:18 PM, Matt Stockton wrote:

> I would love to see the config too. I'm actively trying to use OpenSips as an inbound / outbound proxy SBC and am having mixed success as well
> 
> On Mon, Nov 14, 2011 at 10:08 AM, Vik Killa <vipkilla at gmail.com> wrote:
> Any chance you can post your opensips config? I've been struggling
> with mixed success trying same setup.
> 
> On Mon, Nov 14, 2011 at 10:18 AM, Leon de Rooij
> <leon at scarlet-internet.nl> wrote:
> > Hi,
> > I'm actually trying to configure the same thing right now - with opensips
> > though, but (afaik) it uses the same dispatcher module.
> > First I used a simple route script in opensips with using dispatcher, but
> > after the first message (from ua through proxy to fs), the proxy would get
> > out of the signaling path, while I want it to stay in.
> > To fix that, I added record routing in the proxy configuration so it stays
> > in the path.
> > Registrations are also balanced towards the fs servers - but some clients
> > are nat'ed so the contact header was wrong - fix_nated_contact() in route
> > and in  onreply_route fixed that.
> > To get calls originating from fs to go through the proxy before going to the
> > client, I tried:
> > originate
> > sofia/some_profile/sip:user at mydomain.com;fs_path=sip:ip_of_sip_proxy:5060
> > &park
> > which worked. Then I found out about the sip_route_uri variable that can be
> > set in the bridge string:
> > originate
> > {sip_route_uri=sip:ip_of_sip_proxy:5060}sofia/some_profile/sip:some_user at mydomain.com
> > &park
> > which seemed to do the same thing (does anyone know if there's any
> > difference between the two variants ?)
> > Then I tried putting the sip_route_uri in the dial-string param of the
> > domain (or user), for example:
> > <param name="dial-string"
> > value="{sip_route_uri=sip:ip_of_sip_proxy:5060,sip_invite_domain=${dialed_domain},presence_id=${dialed_user}@${dialed_domain}}${sofia_contact(${dialed_user}@${dialed_domain})}"/>
> > so now it's possible to just call the user as:
> > originate user/some_user at mydomain.com &park
> > nice !
> > And then I found out that you can just set an outbound-proxy param in the
> > sip profile that's used for originating:
> > <param name="outbound-proxy" value="sip:ip_of_sip_proxy:5060"/>
> > so now you can leave out the sip_route_uri or fs_path variables, it just
> > works.
> > My proxy config still needs a lot of work, but I got the basic functionality
> > working, still need to find out about using acls on fs side based on a sip
> > header added by the proxy - I'm already adding X-AUTH-IP headers on messages
> > from clients towards fs which should do the trick, but I didn't test it yet.
> > Anyway, would love to read some configs of ppl who successfuly setup
> > opensips/kamailio/openser/... proxies in front of fs, what their experience
> > is with using record-routing or not, etc.
> > regards,
> > Leon
> >
> >
> >
> > On Nov 14, 2011, at 6:40 AM, Henrik Aagaard Sørensen wrote:
> >
> > The handling of several FS are not a issue, actually easy enough.
> > I would like to have as little load on Kamailio as possible, as it just
> > should load balance.
> > Also, having to handle users on both Kamailio and FS makes unecessary work
> > loads.
> >
> > On 14/11/2011, at 00.32, Sammy Govind <govoiper at gmail.com> wrote:
> >
> > Hi again,
> > Why don't you just let Kamailio handle registrations. Anyway I was thinking
> > about that LBing the registration would result in such a scenario that
> > calling one extension to another would not make a successful call because
> > the other endpoint maybe registered on some other FS.
> > This may further lead you to making a dial-plan which would work somewhat
> > like DUNDI but it'd just have to search all the FS servers before joining a
> > call.(Obv there are other intelligent approaches to minimize the headache)
> > Try following the link I sent you and implement that in front of your FS, I
> > think that Kamailio configuration is so well written that anyone can start
> > understanding kamailio and implement such setups with little effort.
> > By explaining your topology I meant how do you plan to use Kamailio in front
> > of FS? i.e Kamailio on Public IP and all FS on private IPs and etc  as in a
> > topo-hiding or SBC like setup!
> > --
> > Regards,
> > Sammy
> >
> > 2011/11/14 Henrik Aagaard Sørensen <henrikaagaardsorensen at gmail.com>
> >>
> >> Hi Sammy.
> >> I've actually removed registration and presence from Kamailio, so all it
> >> does is dispatch everything to FreeSwitch.
> >> Currently I only have 1 FreeSwitch, for testing this basic setup.
> >> Next move would be 2 FreeSwitch with 1 common database etc. But that's
> >> later.
> >> My FreeSwitch is the basic setup, without anything else. Just as the
> >> installation manuel is written. So I have my extension 1000 - 1019 etc. And
> >> calls between them works when connected directly to FreeSwitch.
> >> But when going through Kamailio Dispatcher it fails between the
> >> extensions.
> >> So I guess there should be some more setup in FreeSwitch when using a load
> >> balancer (dispatcher) in front of it.
> >> My setup is just Kamailio -> FreeSwitch and FreeSwitch should handle
> >> everything.
> >>
> >> On Mon, Nov 14, 2011 at 5:56 AM, Sammy Govind <govoiper at gmail.com> wrote:
> >>>
> >>> Hi,
> >>> If everything is setup as you expected it then don't read this
> >>> > http://kb.asipto.com/asterisk:realtime:kamailio-3.1.x-asterisk-1.6.2-astdb,
> >>> else follow the article from start till end and implement it. Don't worry
> >>> about the name asterisk, just replace that all with FreeSWICTH. It will work
> >>> like that too.
> >>> Once that is implemented then apply dispatcher module on the route which
> >>> says [REGFWD] or [TOASTERISK].
> >>> Also explain your topology abit more  and features required as well that
> >>> may help in telling which extra module you will require in order to make
> >>> things work.
> >>> In your current implementation are you sure SIP phones are registering on
> >>> FS and not on Kamailio?and that both end points making call to each other
> >>> are on same FS?
> >>> --
> >>> Regards,
> >>> Sammy
> >>>
> >>> 2011/11/14 Henrik Aagaard Sørensen <henrikaagaardsorensen at gmail.com>
> >>>>
> >>>> Hi everyone. In regards to my earlier question regarding with FreeSwitch
> >>>> behind Kamailio Dispatcher, I've attached a call from extension 1001 to
> >>>> 1002, which fails. It just hangs for some time and then says that 1002
> >>>> cannot be found, and then the voicemail for it comes up.
> >>>> 2011/11/13 Henrik Aagaard Sørensen <henrikaagaardsorensen at gmail.com>
> >>>>>
> >>>>> I'm trying to get the setup Kamailio Dispatcher -> FreeSwitch to work.
> >>>>> I've setup Kamailio via
> >>>>> this: http://www.kamailio.org/docs/modules/stable/modules_k/dispatcher.html
> >>>>> I've installed FreeSwitch from scratch on Ubuntu
> >>>>> via: http://wiki.freeswitch.org/wiki/Ubuntu_Quick_Start
> >>>>> Now, when registering extensions via Kamailio Dispatcher I'm able to
> >>>>> call to FreeSwitch and listen to hold music. But that's it. I'm not able to
> >>>>> call between extensions etc.
> >>>>> Can anyone help me setting up FreeSwitch to accept registration, calls
> >>>>> etc. from Kamailio and everything else that is needed to use FreeSwitch
> >>>>> behind a load balancer?
> >>>>> I'm very new to FreeSwitch, but I'm trying to use the terminal (without
> >>>>> any GUI etc.) as I want the installation to be as clean as possible. So I
> >>>>> would prefer very precise help, as I'm still getting hold of FreeSwitch.
> >>>>
> >>>>
> >>>> _________________________________________________________________________
> >>>> Professional FreeSWITCH Consulting Services:
> >>>> consulting at freeswitch.org
> >>>> http://www.freeswitchsolutions.com
> >>>>
> >>>> 
> >>>> 
> >>>>
> >>>> Official FreeSWITCH Sites
> >>>> http://www.freeswitch.org
> >>>> http://wiki.freeswitch.org
> >>>> http://www.cluecon.com
> >>>>
> >>>> FreeSWITCH-users mailing list
> >>>> FreeSWITCH-users at lists.freeswitch.org
> >>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> >>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> >>>> http://www.freeswitch.org
> >>>>
> >>>
> >>>
> >>> _________________________________________________________________________
> >>> Professional FreeSWITCH Consulting Services:
> >>> consulting at freeswitch.org
> >>> http://www.freeswitchsolutions.com
> >>>
> >>> 
> >>> 
> >>>
> >>> Official FreeSWITCH Sites
> >>> http://www.freeswitch.org
> >>> http://wiki.freeswitch.org
> >>> http://www.cluecon.com
> >>>
> >>> FreeSWITCH-users mailing list
> >>> FreeSWITCH-users at lists.freeswitch.org
> >>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> >>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> >>> http://www.freeswitch.org
> >>>
> >>
> >>
> >> _________________________________________________________________________
> >> Professional FreeSWITCH Consulting Services:
> >> consulting at freeswitch.org
> >> http://www.freeswitchsolutions.com
> >>
> >> 
> >> 
> >>
> >> Official FreeSWITCH Sites
> >> http://www.freeswitch.org
> >> http://wiki.freeswitch.org
> >> http://www.cluecon.com
> >>
> >> FreeSWITCH-users mailing list
> >> FreeSWITCH-users at lists.freeswitch.org
> >> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> >> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> >> http://www.freeswitch.org
> >>
> >
> > _________________________________________________________________________
> > Professional FreeSWITCH Consulting Services:
> > consulting at freeswitch.org
> > http://www.freeswitchsolutions.com
> >
> > 
> > 
> >
> > Official FreeSWITCH Sites
> > http://www.freeswitch.org
> > http://wiki.freeswitch.org
> > http://www.cluecon.com
> >
> > FreeSWITCH-users mailing list
> > FreeSWITCH-users at lists.freeswitch.org
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> > http://www.freeswitch.org
> >
> > _________________________________________________________________________
> > Professional FreeSWITCH Consulting Services:
> > consulting at freeswitch.org
> > http://www.freeswitchsolutions.com
> >
> > 
> > 
> >
> > Official FreeSWITCH Sites
> > http://www.freeswitch.org
> > http://wiki.freeswitch.org
> > http://www.cluecon.com
> >
> > FreeSWITCH-users mailing list
> > FreeSWITCH-users at lists.freeswitch.org
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> > http://www.freeswitch.org
> >
> >
> > _________________________________________________________________________
> > Professional FreeSWITCH Consulting Services:
> > consulting at freeswitch.org
> > http://www.freeswitchsolutions.com
> >
> > 
> > 
> >
> > Official FreeSWITCH Sites
> > http://www.freeswitch.org
> > http://wiki.freeswitch.org
> > http://www.cluecon.com
> >
> > FreeSWITCH-users mailing list
> > FreeSWITCH-users at lists.freeswitch.org
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> > http://www.freeswitch.org
> >
> >
> 
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
> 
> 
> 
> 
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
> 
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
> 
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
> 
> 
> 
> 
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
> 
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20111115/bbb63a86/attachment-0002.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: opensips.cfg
Type: application/octet-stream
Size: 6819 bytes
Desc: not available
Url : http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20111115/bbb63a86/attachment-0001.obj 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20111115/bbb63a86/attachment-0003.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list