How to check whether incoming call is authenticated
In our external.xml: <domains> <domain name="all" alias="false" parse="true"/> </domains> <param name="auth-calls" value="false"/> It means, that everyone can make call from outside to our freeswitch. Is it possible to know if caller already authenticated in our freeswitch? (in a dialplan) Thanks. -- Arthur
I think you want this. <extension name="is user authorized?" continue="true"
<condition field="${sip_authorized}" expression="true" break="never"
<anti-action application="respond" data="407"
</anti-action> </condition> </extension>
On Mon, Jan 18, 2016 at 6:40 AM, Artur Mega <findmeinwland@gmail.com> wrote:
In our external.xml: <domains> <domain name="all" alias="false" parse="true"/> </domains>
<param name="auth-calls" value="false"/>
It means, that everyone can make call from outside to our freeswitch. Is it possible to know if caller already authenticated in our freeswitch? (in a dialplan)
Thanks. --
Arthur
_________________________________________________________________________ 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
No, it doesnt work, becouse we set in external.xml <param name="auth-calls" value="false"/> documentation (https://wiki.freeswitch.org/wiki/Sofia.conf.xml#auth-calls) says that *"Value can be "false" to disable authentication on this profile, meaning that when calls come in the profile will not send an auth challenge to the caller."* We can receive calls, no problem, but for our needs we want to check who is calling - user is authorised or not.
Did you try it? Because what was posted will work. On Tuesday, January 19, 2016, Artur Mega <findmeinwland@gmail.com> wrote:
No, it doesnt work, becouse we set in external.xml
<param name="auth-calls" value="false"/>
documentation (https://wiki.freeswitch.org/wiki/Sofia.conf.xml#auth-calls) says that *"Value can be "false" to disable authentication on this profile, meaning that when calls come in the profile will not send an auth challenge to the caller."*
We can receive calls, no problem, but for our needs we want to check who is calling - user is authorised or not.
-- *Brian West* brian@freeswitch.org *Twitter: @FreeSWITCH , @briankwest* http://www.freeswitchbook.com http://www.freeswitchcookbook.com Got Bugs? Report them here <https://freeswitch.org/jira>! | Reddit: /r/freeswitch <https://www.reddit.com/r/freeswitch> *T:*+19184209001 | *F:*+19184209002 | *M:*+1918424WEST (9378) *iNUM:*+883 5100 1420 9001 | *ISN:*410*543 | *Skype:*briankwest
We tried, but doesn't work. In the dialplan: <context name="public-external"> <extension name="transfer_it"> <condition field="${sip_authorized}" expression="true" break="never"> <action application="log" data="TEEEEEST ${sip_authorized}"/> <anti-action application="log" data="NOT LOGINED ${sip_authorized}"></anti-action> </condition> </extension> </context> See two attachments. First - it is when in external.xml we set <param name="auth-calls" value="*false*"/>: (in anti-action it must print the value of ${sip_authorized}, but prints nothing) [image: Встроенное изображение 1] (${sip_authorized} is nothing, even not false) Next screen - it is when in external.xml we set <param name="auth-calls" value="*true*"/>: (we made call from phone not in our domain, and it behaviored like should - call is breaked) [image: Встроенное изображение 2] 2016-01-19 18:14 GMT+05:00 Brian West <brian@freeswitch.org>:
Did you try it? Because what was posted will work.
On Tuesday, January 19, 2016, Artur Mega <findmeinwland@gmail.com> wrote:
No, it doesnt work, becouse we set in external.xml
<param name="auth-calls" value="false"/>
documentation (https://wiki.freeswitch.org/wiki/Sofia.conf.xml#auth-calls) says that *"Value can be "false" to disable authentication on this profile, meaning that when calls come in the profile will not send an auth challenge to the caller."*
We can receive calls, no problem, but for our needs we want to check who is calling - user is authorised or not.
--
*Brian West* brian@freeswitch.org
*Twitter: @FreeSWITCH , @briankwest* http://www.freeswitchbook.com http://www.freeswitchcookbook.com
Got Bugs? Report them here <https://freeswitch.org/jira>! | Reddit: /r/freeswitch <https://www.reddit.com/r/freeswitch>
*T:*+19184209001 | *F:*+19184209002 | *M:*+1918424WEST (9378) *iNUM:*+883 5100 1420 9001 | *ISN:*410*543 | *Skype:*briankwest
_________________________________________________________________________ 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
-- Arthur
Please check provided example on vanila config. Example is correct. On Tue, Jan 19, 2016, 20:24 Artur Mega <findmeinwland@gmail.com> wrote:
We tried, but doesn't work. In the dialplan:
<context name="public-external"> <extension name="transfer_it"> <condition field="${sip_authorized}" expression="true" break="never"> <action application="log" data="TEEEEEST ${sip_authorized}"/> <anti-action application="log" data="NOT LOGINED ${sip_authorized}"></anti-action> </condition> </extension> </context>
See two attachments. First - it is when in external.xml we set <param name="auth-calls" value="*false*"/>: (in anti-action it must print the value of ${sip_authorized}, but prints nothing) [image: Встроенное изображение 1] (${sip_authorized} is nothing, even not false)
Next screen - it is when in external.xml we set <param name="auth-calls" value="*true*"/>: (we made call from phone not in our domain, and it behaviored like should - call is breaked) [image: Встроенное изображение 2]
2016-01-19 18:14 GMT+05:00 Brian West <brian@freeswitch.org>:
Did you try it? Because what was posted will work.
On Tuesday, January 19, 2016, Artur Mega <findmeinwland@gmail.com> wrote:
No, it doesnt work, becouse we set in external.xml
<param name="auth-calls" value="false"/>
documentation ( https://wiki.freeswitch.org/wiki/Sofia.conf.xml#auth-calls) says that *"Value can be "false" to disable authentication on this profile, meaning that when calls come in the profile will not send an auth challenge to the caller."*
We can receive calls, no problem, but for our needs we want to check who is calling - user is authorised or not.
--
*Brian West* brian@freeswitch.org
*Twitter: @FreeSWITCH , @briankwest* http://www.freeswitchbook.com http://www.freeswitchcookbook.com
Got Bugs? Report them here <https://freeswitch.org/jira>! | Reddit: /r/freeswitch <https://www.reddit.com/r/freeswitch>
*T:*+19184209001 | *F:*+19184209002 | *M:*+1918424WEST (9378) *iNUM:*+883 5100 1420 9001 | *ISN:*410*543 | *Skype:*briankwest
_________________________________________________________________________ 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
--
Arthur _________________________________________________________________________ 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
participants (4)
-
Artur Mega
-
Brian West
-
Russell Treleaven
-
Sergey Safarov