Authenticated users still using public context
Hi, I fear I am going to ask a very stupid and/or commong question, but after searching the internet I stil lcoudln't find the answer. My Setup * I have users in the directory (see an example configuration at the bottom of this mail) * Authenticated users should be able to use the default Dialplan * I want my DID provider to be able to make calls to me, it should use the public Dialplan / context. My DID provider is mydivert but that seems to be irrelevant. * I only have one SIP Profile (external) which has as default context public. All my users are connecting from the internet and not from the local network, so the internal profile would not make sense (or am I wrong?) My problem is that calls from nathan@sip.radarwerk.be are NOT using the default context, but are using the public context. 2013-12-15 15:04:53.206937 [DEBUG] switch_core_state_machine.c:117 sofia/external/nathan@sip.radarwerk.be Standard ROUTING "2013-12-15 15:04:53.206937 [INFO] mod_dialplan_xml.c:558 Processing nathan <nathan>->1999 in context public" The user nathan in the directory has user_context set to default, so I do not get why this is happening. See below for my configuration. [root@sip freeswitch]# cat directory/default/nathan.xml <include> <user id="nathan" number-alias="1200"> <params> <param name="password" value="**"/> </params> <variables> <variable name="toll_allow" value="domestic,international,local"/> <variable name="user_context" value="default"/> <variable name="effective_caller_id_name" value="Nathan Samson"/> <variable name="effective_caller_id_number" value="1200"/> <variable name="outbound_caller_id_name" value="Nathan Samson"/> <variable name="outbound_caller_id_number" value="1200"/> </variables> </user> </include> Anyone an idea why the user_context is ignored? I am happy to provide my complete configuration. But basically I am using freeswitch-config-rayo 1.2.16 from the CentOS 6 repositories with some small modifications (mainly adding mydivert gateway, my users and my custom extensions in the default directory). Regards, Nathan
You need 2 profiles. Internal and external. Your users even remote users need to register to your internal profile, external profile is used to talk to your Gateways / ITSP. Get a copy of the Freeswitch book<http://www.amazon.com/FreeSWITCH-1-2-Anthony-Minessale/dp/1782161007%3FSubscriptionId%3D0FXDC1DRZ42TM6KY7Y82%26tag%3Dnysolutionsco-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D1782161007> or read the wiki. Thanks, Moishe Grunstein Tornado Computer Systems, Inc. 212.400.7650 888.IPPBX.US Service Request Email: support@nysolutions.com<mailto:support@nysolutions.com> Polycom Certified VAR Microsoft Small Business Specialist, Cisco SMB Select Certified [cid:image001.jpg@01C72F94.9EE45D60]<http://www.nysolutions.com/> Computer Networking * Managed Services * IP Video Surveillance * Network Assessments * Web Solutions * Voice over IP * Disaster Recovery * Network Security * Site Surveys * CMS From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Nathan Samson Sent: Sunday, December 15, 2013 10:17 AM To: freeswitch-users@lists.freeswitch.org Subject: [Freeswitch-users] Authenticated users still using public context Hi, I fear I am going to ask a very stupid and/or commong question, but after searching the internet I stil lcoudln't find the answer. My Setup * I have users in the directory (see an example configuration at the bottom of this mail) * Authenticated users should be able to use the default Dialplan * I want my DID provider to be able to make calls to me, it should use the public Dialplan / context. My DID provider is mydivert but that seems to be irrelevant. * I only have one SIP Profile (external) which has as default context public. All my users are connecting from the internet and not from the local network, so the internal profile would not make sense (or am I wrong?) My problem is that calls from nathan@sip.radarwerk.be<mailto:nathan@sip.radarwerk.be> are NOT using the default context, but are using the public context. 2013-12-15 15:04:53.206937 [DEBUG] switch_core_state_machine.c:117 sofia/external/nathan@sip.radarwerk.be<mailto:nathan@sip.radarwerk.be> Standard ROUTING "2013-12-15 15:04:53.206937 [INFO] mod_dialplan_xml.c:558 Processing nathan <nathan>->1999 in context public" The user nathan in the directory has user_context set to default, so I do not get why this is happening. See below for my configuration. [root@sip freeswitch]# cat directory/default/nathan.xml <include> <user id="nathan" number-alias="1200"> <params> <param name="password" value="**"/> </params> <variables> <variable name="toll_allow" value="domestic,international,local"/> <variable name="user_context" value="default"/> <variable name="effective_caller_id_name" value="Nathan Samson"/> <variable name="effective_caller_id_number" value="1200"/> <variable name="outbound_caller_id_name" value="Nathan Samson"/> <variable name="outbound_caller_id_number" value="1200"/> </variables> </user> </include> Anyone an idea why the user_context is ignored? I am happy to provide my complete configuration. But basically I am using freeswitch-config-rayo 1.2.16 from the CentOS 6 repositories with some small modifications (mainly adding mydivert gateway, my users and my custom extensions in the default directory). Regards, Nathan
Did you remove the comment tags at the end of public.xml? Nathan Samson <nathan@nathansamson.be> wrote:
Hi,
I fear I am going to ask a very stupid and/or commong question, but after searching the internet I stil lcoudln't find the answer.
My Setup * I have users in the directory (see an example configuration at the bottom of this mail) * Authenticated users should be able to use the default Dialplan * I want my DID provider to be able to make calls to me, it should use the public Dialplan / context. My DID provider is mydivert but that seems to be irrelevant. * I only have one SIP Profile (external) which has as default context public. All my users are connecting from the internet and not from the local network, so the internal profile would not make sense (or am I wrong?)
My problem is that calls from nathan@sip.radarwerk.be are NOT using the default context, but are using the public context.
2013-12-15 15:04:53.206937 [DEBUG] switch_core_state_machine.c:117 sofia/external/nathan@sip.radarwerk.be Standard ROUTING "2013-12-15 15:04:53.206937 [INFO] mod_dialplan_xml.c:558 Processing nathan <nathan>->1999 in context public"
The user nathan in the directory has user_context set to default, so I do not get why this is happening. See below for my configuration.
[root@sip freeswitch]# cat directory/default/nathan.xml <include> <user id="nathan" number-alias="1200"> <params> <param name="password" value="**"/> </params> <variables> <variable name="toll_allow" value="domestic,international,local"/> <variable name="user_context" value="default"/> <variable name="effective_caller_id_name" value="Nathan Samson"/> <variable name="effective_caller_id_number" value="1200"/> <variable name="outbound_caller_id_name" value="Nathan Samson"/> <variable name="outbound_caller_id_number" value="1200"/> </variables> </user> </include>
Anyone an idea why the user_context is ignored? I am happy to provide my complete configuration. But basically I am using freeswitch-config-rayo 1.2.16 from the CentOS 6 repositories with some small modifications (mainly adding mydivert gateway, my users and my custom extensions in the default directory).
Regards, Nathan
---------------------------------------------------- Alternatives:
---------------------------------------------------- _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
-- Your life is like a penny. You're going to lose it. The question is: How do you spend it? John Covici covici@ccs.covici.com
@Moishe Thanks, that seemed to help. My Current configuration is now Internal profile listening on 5060, auth_calls is set to true, so anyone else is blocked. dialplan is default. External profile listening on 5080, anyone can enter, dial plan is public This configuration means that anyone registered on an external SIP provider (lets say mydivert.com) needs to talk to me on (the non default) port 5080. Is that normal? Except for that small problem (which in practice is not really a problem) everything is working perfectly now. Thanks for the clarification. @covici You mean these lines right? <!-- <extension name="check_auth" continue="true"> <condition field="${sip_authorized}" expression="^true$" break="never"> <anti-action application="respond" data="407"/> </condition> </extension> <extension name="transfer_to_default"> <condition> <action application="transfer" data="${destination_number} XML default"/> </condition> </extension> --> Note that in the public.xml from freeswitch-config-rayo these lines do not exist, and is having a catch all anyway sending everythign to rayo... Uncommenting those and making the rayo extension not a catch all was possible but seemed a bit like a hack. The solution with two profiles seems the more normal one. Thanks for the quick responses, Nathan On Sun, Dec 15, 2013 at 8:40 PM, <covici@ccs.covici.com> wrote:
Did you remove the comment tags at the end of public.xml?
Nathan Samson <nathan@nathansamson.be> wrote:
Hi,
I fear I am going to ask a very stupid and/or commong question, but after searching the internet I stil lcoudln't find the answer.
My Setup * I have users in the directory (see an example configuration at the bottom of this mail) * Authenticated users should be able to use the default Dialplan * I want my DID provider to be able to make calls to me, it should use the public Dialplan / context. My DID provider is mydivert but that seems to be irrelevant. * I only have one SIP Profile (external) which has as default context public. All my users are connecting from the internet and not from the local network, so the internal profile would not make sense (or am I wrong?)
My problem is that calls from nathan@sip.radarwerk.be are NOT using the default context, but are using the public context.
2013-12-15 15:04:53.206937 [DEBUG] switch_core_state_machine.c:117 sofia/external/nathan@sip.radarwerk.be Standard ROUTING "2013-12-15 15:04:53.206937 [INFO] mod_dialplan_xml.c:558 Processing nathan <nathan>->1999 in context public"
The user nathan in the directory has user_context set to default, so I do not get why this is happening. See below for my configuration.
[root@sip freeswitch]# cat directory/default/nathan.xml <include> <user id="nathan" number-alias="1200"> <params> <param name="password" value="**"/> </params> <variables> <variable name="toll_allow" value="domestic,international,local"/> <variable name="user_context" value="default"/> <variable name="effective_caller_id_name" value="Nathan Samson"/> <variable name="effective_caller_id_number" value="1200"/> <variable name="outbound_caller_id_name" value="Nathan Samson"/> <variable name="outbound_caller_id_number" value="1200"/> </variables> </user> </include>
Anyone an idea why the user_context is ignored? I am happy to provide my complete configuration. But basically I am using freeswitch-config-rayo 1.2.16 from the CentOS 6 repositories with some small modifications (mainly adding mydivert gateway, my users and my custom extensions in the default directory).
Regards, Nathan
---------------------------------------------------- Alternatives:
---------------------------------------------------- _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
-- Your life is like a penny. You're going to lose it. The question is: How do you spend it?
John Covici covici@ccs.covici.com
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.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
Configuration looks correct now, and yes SIP Provider should send traffic to your IP:5080. If you register to the provider, that is automatic, if the provider uses IP authentication, just have them send traffic to IP:5080. Most sip providers have no problem doing it, otherwise you will need to have them send to :5060 and will need to add their IP to the ACL. Thanks, Moishe Grunstein Tornado Computer Systems, Inc. 212.400.7650 888.IPPBX.US Service Request Email: support@nysolutions.com<mailto:support@nysolutions.com> Polycom Certified VAR Microsoft Small Business Specialist, Cisco SMB Select Certified [cid:image001.jpg@01C72F94.9EE45D60]<http://www.nysolutions.com/> Computer Networking * Managed Services * IP Video Surveillance * Network Assessments * Web Solutions * Voice over IP * Disaster Recovery * Network Security * Site Surveys * CMS From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Nathan Samson Sent: Sunday, December 15, 2013 3:12 PM To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] Authenticated users still using public context @Moishe Thanks, that seemed to help. My Current configuration is now Internal profile listening on 5060, auth_calls is set to true, so anyone else is blocked. dialplan is default. External profile listening on 5080, anyone can enter, dial plan is public This configuration means that anyone registered on an external SIP provider (lets say mydivert.com<http://mydivert.com>) needs to talk to me on (the non default) port 5080. Is that normal? Except for that small problem (which in practice is not really a problem) everything is working perfectly now. Thanks for the clarification. @covici You mean these lines right? <!-- <extension name="check_auth" continue="true"> <condition field="${sip_authorized}" expression="^true$" break="never"> <anti-action application="respond" data="407"/> </condition> </extension> <extension name="transfer_to_default"> <condition> <action application="transfer" data="${destination_number} XML default"/> </condition> </extension> --> Note that in the public.xml from freeswitch-config-rayo these lines do not exist, and is having a catch all anyway sending everythign to rayo... Uncommenting those and making the rayo extension not a catch all was possible but seemed a bit like a hack. The solution with two profiles seems the more normal one. Thanks for the quick responses, Nathan On Sun, Dec 15, 2013 at 8:40 PM, <covici@ccs.covici.com<mailto:covici@ccs.covici.com>> wrote: Did you remove the comment tags at the end of public.xml? Nathan Samson <nathan@nathansamson.be<mailto:nathan@nathansamson.be>> wrote:
Hi,
I fear I am going to ask a very stupid and/or commong question, but after searching the internet I stil lcoudln't find the answer.
My Setup * I have users in the directory (see an example configuration at the bottom of this mail) * Authenticated users should be able to use the default Dialplan * I want my DID provider to be able to make calls to me, it should use the public Dialplan / context. My DID provider is mydivert but that seems to be irrelevant. * I only have one SIP Profile (external) which has as default context public. All my users are connecting from the internet and not from the local network, so the internal profile would not make sense (or am I wrong?)
My problem is that calls from nathan@sip.radarwerk.be<mailto:nathan@sip.radarwerk.be> are NOT using the default context, but are using the public context.
2013-12-15 15:04:53.206937 [DEBUG] switch_core_state_machine.c:117 sofia/external/nathan@sip.radarwerk.be<mailto:nathan@sip.radarwerk.be> Standard ROUTING "2013-12-15 15:04:53.206937 [INFO] mod_dialplan_xml.c:558 Processing nathan <nathan>->1999 in context public"
The user nathan in the directory has user_context set to default, so I do not get why this is happening. See below for my configuration.
[root@sip freeswitch]# cat directory/default/nathan.xml <include> <user id="nathan" number-alias="1200"> <params> <param name="password" value="**"/> </params> <variables> <variable name="toll_allow" value="domestic,international,local"/> <variable name="user_context" value="default"/> <variable name="effective_caller_id_name" value="Nathan Samson"/> <variable name="effective_caller_id_number" value="1200"/> <variable name="outbound_caller_id_name" value="Nathan Samson"/> <variable name="outbound_caller_id_number" value="1200"/> </variables> </user> </include>
Anyone an idea why the user_context is ignored? I am happy to provide my complete configuration. But basically I am using freeswitch-config-rayo 1.2.16 from the CentOS 6 repositories with some small modifications (mainly adding mydivert gateway, my users and my custom extensions in the default directory).
Regards, Nathan
---------------------------------------------------- Alternatives:
---------------------------------------------------- _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.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
-- Your life is like a penny. You're going to lose it. The question is: How do you spend it? John Covici covici@ccs.covici.com<mailto:covici@ccs.covici.com> _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.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
participants (3)
-
covici@ccs.covici.com
-
Moishe Grunstein
-
Nathan Samson