[Freeswitch-users] local extensions <> DID
Stanislav Sinyagin
ssinyagin at gmail.com
Wed Oct 8 03:46:28 MSD 2014
first of all, you will want separate contexts for inbound and outbound
calls:
- Inbound calls would be looked up in the local extension database, and
hung up if nothing found;
- Outbound calls would be looked up in the local extensions, and forwarded
to PSTN if nothing found.
The fundamental difference is that inbound calls are not authenticated, and
you don't anyone to call PSTN through your server ;-)
So, you need to elaborate a mechanism for looking up the local extension.
If those are users in your directory, you simply lookup with "user_exists"
function, and route the call depending on the returned value.
Also, you can do more:
for the sake of scalability, your users might be registered elsewhere, for
example, on several Kamailio servers. Then FreeSWITCH will need to lookup
in an external user database before routing the call. This can be done, for
example, in a separate process where FreeSWITCH would connect via ESL. The
Go language allows easy and cheap multithreading, so this daemon could be
implemented in Go.
Alternatively, you can use mod_enum and a local DNS server which would give
the answer if a given 10-digit number is local or not.
so, there are ways to do it, you just need to select one that fits your
requirements for scalability and fault tolerance.
On Tue, Oct 7, 2014 at 8:17 PM, Jerry Allen <jerry.allen at vistabeam.com>
wrote:
> For a public voip server, I would like to use the 10 digit DID for the
> extension and be able to route all non-local DID out to my gateway(s). Is
> it possible to use the PSTN DID as the SIP extension? I do not find any
> information concerning this. I understand DID > extension as long as
> extension matches the predefined <extension name="Local_Extension">
> destination_number expression. The issue is using a 10 digit extension
> collides with the 10 digit routing to my gateway and loops.
>
> Jerry Allen
>
>
>
>
>
> _________________________________________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20141008/aacb02bc/attachment.html
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list