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
I'm sure this is doable with the right combination of conditions in your extensions, but before you do all of that I think many here would want to know: why a 10-digit extension? Does that give you a specific advantage of some kind? -MC On Tue, Oct 7, 2014 at 11:17 AM, Jerry Allen <jerry.allen@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@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.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
Hi Michael, Other than a 1:1 mapping to “lower the confusion level” or the user asking why does it “say extension” or the confusion when user 3035551717 in domain xxx.com calls user 4035551212 in xxx.com and the caller id says 1005 (fixed this one already) or the headers in a voicemail say extension 1005. No particular reason. Fortunately, I am trying to get away from asterisk (using freepbx) onto a better platform however I am hitting obstacles and this one I can’t seem to configure around. Of course, asterisk allowed this 10 digit extension usage so I have a lot of ATA already out there with accounts using their 10 digit DID as the sip registration etc. Jerry Allen From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Michael Collins Sent: Tuesday, October 07, 2014 4:50 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] local extensions <> DID I'm sure this is doable with the right combination of conditions in your extensions, but before you do all of that I think many here would want to know: why a 10-digit extension? Does that give you a specific advantage of some kind? -MC On Tue, Oct 7, 2014 at 11:17 AM, Jerry Allen <jerry.allen@vistabeam.com <mailto:jerry.allen@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@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto: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
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@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@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.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
I use a SQL query to determine if the called DID is mine: if so it bridges directly, rather than hitting the pstn. -Avi On Oct 8, 2014 2:46 AM, "Stanislav Sinyagin" <ssinyagin@gmail.com> wrote:
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@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@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.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
_________________________________________________________________________ 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-powered IP PBX: The CudaTel Communication Server http://www.cudatel.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
participants (4)
-
Avi Marcus
-
Jerry Allen
-
Michael Collins
-
Stanislav Sinyagin