[Freeswitch-users] Call FS users from external gateway.

Stanislav Sinyagin ssinyagin at gmail.com
Mon Sep 21 13:34:13 MSD 2015


well, if you blindly transfer an unauthenticated call from public
context into the default context, you may get a hefty bill at the end
of the month :)



On Mon, Sep 21, 2015 at 11:28 AM, Michael Nielsen <mic.niel84 at gmail.com> wrote:
> Hi Stanislav,
>
> Thank you. I'll follow that tutorial.
>
> One thing, my way of knowing whether to route to other FS user or to the
> pstn gw is to use the user_exists condition.
> My users ids are e.164 numbers so they match numbers for use with the pstn
> gw.
>
> If I place that in the internal dial plan in default context, will that
> expose a security issues or should that be fine?
>
>
> On Monday, September 21, 2015, Stanislav Sinyagin <ssinyagin at gmail.com>
> wrote:
>>
>> You can split the inbound and outbound calls for your registered users
>> into different contexts, and that will ensure that calls from outside are
>> not sent to PSTN in an uncontrolled way. See an example here:
>>
>>
>> https://github.com/voxserv/freeswitch_conf_minimal/blob/master/docs/tutorial_01_simple_pbx.md
>>
>> In your public context, you match the calks from the gsm gateway and
>> transfer them to an extension in one if your internal contexts.
>>
>> On Sep 20, 2015 6:59 PM, "Michael Nielsen" <mic.niel84 at gmail.com> wrote:
>>>
>>> I've tried different scenarios.
>>> One was to put all my dial plans in public context. This worked, but of
>>> course opened up a lot of security issues.
>>>
>>> My thoughts are now to have all my dial plans in the default context, so
>>> only registered users can dial them, but also have one single dial plan in
>>> the public context for transferring incoming calls to the default dial plan.
>>>
>>> BUT will this not still open up for security issues?
>>>
>>> I currently see calls in my cdr csv made from user 100 even though no
>>> such user exists!?
>>>
>>> How can one be sure that calls are only made from registered and
>>> authenticated users in FS?
>>>
>>> On Wednesday, September 16, 2015, Bote Man <bote_radio at botecomm.com>
>>> wrote:
>>>>
>>>> This is the job of the dialplan. The example entries that are included
>>>> with the vanilla FS config provide guidance, but in my particular case I had
>>>> to test on a different SIP field than the vanilla config was looking for.
>>>>
>>>>
>>>>
>>>> My inbound calls from CallCentric put the destination number (DID) in
>>>> sip_to_user so my dialplan test condition reads:
>>>>
>>>>     <condition field="${sip_to_user}" expression="^(12345678900)$">
>>>>
>>>>
>>>>
>>>> I had to read the FS debug logs to see what it was seeing, and then
>>>> adjust my dialplan accordingly.
>>>>
>>>>
>>>>
>>>> If you have many FS users you might consider looking up the directory
>>>> entries with XML as is typically done.
>>>>
>>>>
>>>>
>>>> Here is a good place to start for more information:
>>>>
>>>> https://freeswitch.org/confluence/display/FREESWITCH/Dialplan
>>>>
>>>>
>>>>
>>>> Hope this helps.
>>>>
>>>>
>>>>
>>>> Bote
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> From: freeswitch-users-bounces at lists.freeswitch.org
>>>> [mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Michael
>>>> Nielsen
>>>> Sent: Wednesday, 16 September, 2015 08:33
>>>> To: FreeSWITCH Users Help
>>>> Subject: [Freeswitch-users] Call FS users from external gateway.
>>>>
>>>>
>>>>
>>>> I've got my users in FS in /directory/users.xml in a certain domain and
>>>> user-context = public.
>>>>
>>>> I've got my FS hooked up to a SIP gateway for connection to the
>>>> GSM-world.
>>>>
>>>>
>>>>
>>>> I'm able to route calls to my SIP gateway for outbound calls, but
>>>> incoming calls to my FS from the GSM-world does not get routed to my users
>>>> in FS.
>>>>
>>>>
>>>>
>>>> My users have the ID's "+4412345678", and incoming calls from my SIP
>>>> gateway does contain +4412345678 at my-sip-gateway-domain.com
>>>>
>>>>
>>>>
>>>> I guess I need to tell FS somehow that incoming calls from my SIP
>>>> gateway should match my user IDs in users from my /directory/users.xml.
>>>>
>>>>
>>>>
>>>> But how to I do this?
>>>
>>>
>>> _________________________________________________________________________
>>> 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
>
>
> _________________________________________________________________________
> 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