[Freeswitch-users] dynamic user specific gateways with xml curl

Bipin Patel bipin at xbipin.com
Tue May 31 11:49:55 MSD 2016


well this would work on if u knew the gateways beforehand or u add them 
separately but in my case i know the gateways only when the user 
registers to FS and FS wont send a gw request once its already loaded, 
so the only method i can think of is using esl to issue rescan which 
would trigger gw request which would load them but i think u need to 
reload the profile then only it would register gw accounts but side 
effect is active calls would drop


Regards,
Bipin


------------------------------------------------------------------------
-------- Original Message --------
Subject: Re: [Freeswitch-users] dynamic user specific gateways with xml curl
From: Gregor Nanger <gregor at infomedia.si>
To: FreeSWITCH Users Help <freeswitch-users at lists.freeswitch.org>
Date: 5/31/2016, 11:22:19 AM
> I understand what you want to do. I cannot give you straight answer.
>
> You can feed gateways configuration via xml_curl and maybe with 
> combination with ESL that you trigger commands for rescan gateways:
>
> https://wiki.freeswitch.org/wiki/Reloading
>
> So if you want to register new gateway on the fly add it to xml_curl 
> list of gateways and issue rescan gateways... maybe this should help...
>
> 2016-05-31 7:45 GMT+02:00 Bipin Patel <bipin at xbipin.com 
> <mailto:bipin at xbipin.com>>:
>
>     so currently there is no way to register to a GW on the fly using xml
>     curl for inbound calls?
>
>
>     Regards,
>     Bipin
>
>
>     ------------------------------------------------------------------------
>     -------- Original Message --------
>     Subject: Re: [Freeswitch-users] dynamic user specific gateways
>     with xml curl
>     From: Michael Jerris <mike at jerris.com <mailto:mike at jerris.com>>
>     To: FreeSWITCH Users Help <freeswitch-users at lists.freeswitch.org
>     <mailto:freeswitch-users at lists.freeswitch.org>>
>     Date: 5/29/2016, 11:43:48 PM
>     > there is no jistifucation whatsoever to require registration to
>     make a
>     > call.  It's completely nonsensical.  A registration is telling a
>     > remote gateway how to call you.  It has nothing at all to do with
>     > making a call and adds no benefit whatsoever.
>     >
>     > On Sunday, May 29, 2016, Bipin Patel <bipin at xbipin.com
>     <mailto:bipin at xbipin.com>
>     > <mailto:bipin at xbipin.com <mailto:bipin at xbipin.com>>> wrote:
>     >
>     >     actually my users register to FS which has xml curl with
>     directory
>     >     binding set, now i keep a DB of user accounts which my
>     script gets and
>     >     sends to FS when a user tries to register but each account has a
>     >     different gateway ip in my DB so what im doing is routing the
>     >     calls for
>     >     each client differently, now my upstream GW requires FS to
>     register to
>     >     it but the problem is i dont have the gateway ip and account
>     details
>     >     before hand when sofia loads so im following the user
>     specific gateway
>     >     example and making my script send user account as well as
>     gateway
>     >     details to FS but FS keeps complaining GW not found. The
>     current way i
>     >     solve this is in dialplan by bridging call to GW and passing the
>     >     id/pass
>     >     during bridge but that doesnt make FS register to GW.
>     >
>     >     i have to make FS register to upstream GW, without
>     registration it
>     >     works
>     >     fine, what i learnt so far is FS needs its GW accounts when
>     sofia
>     >     loads
>     >     and im trying to find a way i can create them on the fly because
>     >     there r
>     >     more than 60k client accounts in DB and hundreds of GW so i
>     cant load
>     >     all of them during sofia load so trying to do it
>     dynamically. The
>     >     config
>     >     and dialplan bindings for xml curl i dont use as im using
>     static xml
>     >     files for that.
>     >
>     >     im using this variable in user accounts
>     >     |
>     >
>     >     <variable name="register-gateway" value="user1out"/>
>     >
>     >     |but when FS requests param it gets user account but it
>     sends the same
>     >     request 2 more times and then complains twice GW not found,
>     even if it
>     >     requested GW then i could feed it but even with config
>     binding it
>     >     doesnt, only during sofia load it requests GW
>     >
>     >
>     >     Regards,
>     >     Bipin
>     >
>     >
>     >
>      ------------------------------------------------------------------------
>     >     -------- Original Message --------
>     >     Subject: Re: [Freeswitch-users] dynamic user specific gateways
>     >     with xml curl
>     >     From: Michael Jerris <mike at jerris.com <mailto:mike at jerris.com> <javascript:;>>
>     >     To: FreeSWITCH Users Help
>     <freeswitch-users at lists.freeswitch.org
>     <mailto:freeswitch-users at lists.freeswitch.org>
>     >     <javascript:;>>
>     >     Date: 5/29/2016, 7:46:30 PM
>     >     > there is no way to register a gateway from the dial plan as
>     >     > registering has nothing to do with making calls so it makes no
>     >     sense.
>     >     > Registering is a mechanism for receiving calls, and has
>     nothing
>     >     at all
>     >     > to do with sending calls.  Why would you need to register to
>     >     send a call?
>     >     >
>     >     > On Sunday, May 29, 2016, Bipin Patel <bipin at xbipin.com
>     <mailto:bipin at xbipin.com>
>     >     <javascript:;>
>     >     > <mailto:bipin at xbipin.com <mailto:bipin at xbipin.com> <javascript:;>>> wrote:
>     >     >
>     >     >     well currently i use that only but i need to register
>     to the
>     >     gateway
>     >     >     upstream and this seems not possible using dialplan
>     >     >
>     >     >
>     >     >     Regards,
>     >     >     Bipin
>     >     >
>     >     >
>     >     >
>     >
>     ------------------------------------------------------------------------
>     >     >     -------- Original Message --------
>     >     >     Subject: dynamic user specific gateways with xml curl
>     >     >     From: Bipin Patel <bipin at xbipin.com
>     <mailto:bipin at xbipin.com> <javascript:;>
>     >     <javascript:;>>
>     >     >     To: freeswitch-users at lists.freeswitch.org
>     <mailto:freeswitch-users at lists.freeswitch.org> <javascript:;>
>     >     <javascript:;>
>     >     >     Date: 5/29/2016, 3:53:54 PM
>     >     >     > isnt there anyway to define gateways on the fly
>     using xml
>     >     curl, i
>     >     >     > tried the user specific gateway method by replying with
>     >     the user
>     >     >     > account along with the gw info but sofia keeps saying
>     >     gateway not
>     >     >     > found, i tried asking in irc but didnt get an answer, no
>     >     docs also
>     >     >     > mention this if its possible also or no.
>     >     >     >
>     >     >     > so far reading other places it seems gateways need to be
>     >     present
>     >     >     > during profile load but all those were very old so
>     wanted
>     >     to know if
>     >     >     > its still possible to dynamically create gateways on the
>     >     fly or no
>     >     >     > when using xml curl.
>     >     >     >
>     >     >     >
>     >     >     > --
>     >     >     > Regards,
>     >     >     > Bipin
>     >     >     >
>     >     >     >
>     >     >     >
>     >     >
>     >
>     ------------------------------------------------------------------------
>     >     >
>     >     >
>     >     >
>     >     >
>     >
>     _________________________________________________________________________
>     >     >     Professional FreeSWITCH Consulting Services:
>     >     > consulting at freeswitch.org
>     <mailto:consulting at freeswitch.org> <javascript:;> <javascript:;>
>     >     >http://www.freeswitchsolutions.com
>     >     >
>     >     >     Official FreeSWITCH Sites
>     >     > http://www.freeswitch.org
>     >     > http://confluence.freeswitch.org
>     >     > http://www.cluecon.com
>     >     >
>     >     >     FreeSWITCH-users mailing list
>     >     > FreeSWITCH-users at lists.freeswitch.org
>     <mailto:FreeSWITCH-users at lists.freeswitch.org> <javascript:;>
>     <javascript:;>
>     >     > 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
>     <mailto:consulting at freeswitch.org> <javascript:;>
>     >     > http://www.freeswitchsolutions.com
>     >     >
>     >     > Official FreeSWITCH Sites
>     >     > http://www.freeswitch.org
>     >     > http://confluence.freeswitch.org
>     >     > http://www.cluecon.com
>     >     >
>     >     > FreeSWITCH-users mailing list
>     >     > FreeSWITCH-users at lists.freeswitch.org
>     <mailto:FreeSWITCH-users at lists.freeswitch.org> <javascript:;>
>     >     > 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 <mailto:consulting at freeswitch.org>
>     <javascript:;>
>     > http://www.freeswitchsolutions.com
>     >
>     >     Official FreeSWITCH Sites
>     > http://www.freeswitch.org
>     > http://confluence.freeswitch.org
>     > http://www.cluecon.com
>     >
>     >     FreeSWITCH-users mailing list
>     > FreeSWITCH-users at lists.freeswitch.org
>     <mailto:FreeSWITCH-users at lists.freeswitch.org> <javascript:;>
>     > 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 <mailto:consulting at freeswitch.org>
>     > http://www.freeswitchsolutions.com
>     >
>     > Official FreeSWITCH Sites
>     > http://www.freeswitch.org
>     > http://confluence.freeswitch.org
>     > http://www.cluecon.com
>     >
>     > FreeSWITCH-users mailing list
>     > FreeSWITCH-users at lists.freeswitch.org
>     <mailto: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 <mailto:consulting at freeswitch.org>
>     http://www.freeswitchsolutions.com
>
>     Official FreeSWITCH Sites
>     http://www.freeswitch.org
>     http://confluence.freeswitch.org
>     http://www.cluecon.com
>
>     FreeSWITCH-users mailing list
>     FreeSWITCH-users at lists.freeswitch.org
>     <mailto: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
>
>
>
>
> -- 
> Gregor Nanger
> 	*CTO*
> t./f.: 00386 (0) 7 6000 308/309 • m:. 00386 (0)41 756485
> • Infomedia d.o.o. • Jerebova 3, Novo mesto, Slovenia
> • www.infomedia.si <http://www.infomedia.si>
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.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





Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list