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.
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@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@lists.freeswitch.org [mailto:freeswitch-users-bounces@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@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@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@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org