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

Bipin Patel bipin at xbipin.com
Sun May 29 20:37:27 MSD 2016


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>
To: FreeSWITCH Users Help <freeswitch-users at lists.freeswitch.org>
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>> 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 <javascript:;>>
>     To: freeswitch-users at lists.freeswitch.org <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 <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 <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
> 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