[Freeswitch-users] 302 redirect variable
Miha Zoubek
miha at softnet.si
Mon Mar 5 17:51:04 MSK 2012
On 03/05/2012 09:33 AM, Gregor Nanger wrote:
> Yes Miha!
>
> I think that is impossible to get password in raw format via
> variables. If you have registration data somewhere else in database,
> you can make sql query.
>
> You need to make, that on redirection your sbc is using IP
> authentication, not username/pass. That way, you wouldn't need password.
>
> BR Grega
>
>
> 2012/3/5 Miha Zoubek <miha at softnet.si <mailto:miha at softnet.si>>
>
> Hi @João,
>
> first thank you for your quick response.
>
> I have add ${sip_authorized} condition, but still no luck, as when
> 302 happens FS indicate user as inbound call who is calling on
> redirected number due to this I can not use password which is set
> for phone who is having redirect set and is connected on FS. SO, I
> can only use variables which are set for incoming call.
>
> This is my public dialplan:
>
> <include>
>
>
>
> <extension name="check_auth" continue="true">
> <condition field="${sip_authorized}" expression="^true$"
> break="never">
> <anti-action application="respond" data="407"/>
> </condition>
> </extension>
>
>
>
> <extension name="trunk_sbc_1">
>
>
> <!-- <condition field="${user_exists(id
> ${destination_number}.fs_kabelvoip1 fs_kabelvoip1.fs1.softnet.si
> <http://fs_kabelvoip1.fs1.softnet.si>)}" expression="true">-->
> <condition field="${user_exists(id
> ${destination_number}.fs_kabelvoip1 fs_kabelvoip1.fs1.softnet.si
> <http://fs_kabelvoip1.fs1.softnet.si>)}" expression="true">
> <!-- <condition field="destination_number" expression="$"> -->
> <action application="log" />
>
> <action application="set"
> data="domain_name=fs_kabelvoip1.fs1.softnet.si
> <http://fs_kabelvoip1.fs1.softnet.si>"/>
> <action application="set"
> data="domain=fs_kabelvoip1.fs1.softnet.si
> <http://fs_kabelvoip1.fs1.softnet.si>"/>
> <action application="export" data="destination_number"=$1"/>
> <!-- <action application="transfer" data="1000 XML default"/> -->
>
> <action application="set" data="process_cdr=false"/>
> <action application="set" data="domain_name=$${domain}"/>
> <action application="info"/>
> <action application="bridge"
> data="sofia/internal/${destination_number}.fs_kabelvoip1%fs_kabelvoip1.fs1.softnet.si
> <http://fs_kabelvoip1.fs1.softnet.si>"/>
> <!-- This example maps the DID 5551212 to ring 1000 in the default
> context -->
>
>
>
> <anti-action application="log" data="INFO ################# CALL
> FORWARD ################\n"/>
> <!-- <anti-action application="log" data=" INFO
> sip_redirect_contact_={ip_redirect_contact_}" /> -->
> <!-- <anti-action application="set"
> data="sip_redirect_contex=default" /> -->
> <anti-action application="info"/>
> <anti-action application="set" data="process_cdr=false"/>
> <anti-action application="execute_extension"
> data="{origination_callee_id_name='${sip_req_user}'}IZVEDI_PREUSMERITEV
> XML default"/>
>
>
>
> </condition>
> </extension>
> </include>
>
>
> I have also add log to pastebin: http://pastebin.freeswitch.org/18575
>
> Thanks!
> Miha
>
>
> On 03/04/2012 09:31 PM, João Mesquita wrote:
>> Yes
>>
>> --
>> João Mesquita
>> Sent with Sparrow <http://www.sparrowmailapp.com/?sig>
>>
>> On Sunday, March 4, 2012 at 2:17 PM, Miha wrote:
>>
>>> Thank you for that!
>>>
>>> After that I will be able to use variables from user/dir?
>>>
>>> Regards,
>>> Miha
>>>
>>> On Sun, 4 Mar 2012 01:14:13 -0300
>>> Jo?o Mesquita <jmesquita at freeswitch.org
>>> <mailto:jmesquita at freeswitch.org>> wrote:
>>>> You won't get the user's password in plain text like that
>>>> EVER. If we did that, we would be considered to be
>>>> insanely insecure.
>>>>
>>>> I am guessing you are using SIP only so you can take a
>>>> look at the dialplan/public.xml file of the default
>>>> configs. On the end of that file you will see that there
>>>> is a verification to do dial plan based authentication.
>>>>
>>>> Look for this extension in particular:
>>>>
>>>> <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>
>>>>
>>>>
>>>> Regards,
>>>>
>>>> --
>>>> Jo?o Mesquita
>>>> Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
>>>>
>>>>
>>>> On Friday, March 2, 2012 at 7:09 AM, Miha Zoubek wrote:
>>>>
>>>>> Hi,
>>>>> in my directory I set variable password (<variable
>>>> name="password" value="52166"/>) for every user.
>>>>> After I am doing 302 redirect in my public dialplan and
>>>> transfer call to extension, I can not use varible
>>>> pasword.
>>>>> How can I get varible password, so that I can
>>>> authenticate call.
>>>>> public dialplan:
>>>>> <anti-action application="log" data="INFO
>>>> ################# CALL FORWARD ################\n"/>
>>>>> <!-- <anti-action application="log" data=" INFO
>>>> sip_redirect_contact_={ip_redirect_contact_}" /> -->
>>>>> <!-- <anti-action application="set"
>>>> data="sip_redirect_contex=default" /> -->
>>>>> <anti-action application="info"/>
>>>>> <anti-action application="set"
>>>> data="process_cdr=false"/>
>>>>> <anti-action application="execute_extension"
>>>> data="IZVEDI_PREUSMERITEV XML default"/>
>>>>> default dialplan:
>>>>> <condition field="destination_number"
>>>> expression="IZVEDI_PREUSMERITEV" />
>>>>> <condition field="${sip_redirect_contact_user_0}"
>>>> expression="^0(\d+)$" >
>>>>> <action application="set" data="process_cdr=true"/>
>>>>> <action inline="true" application="set"
>>>> data="CALLINGNUMBER=${sip_redirect_contact_user_0}"/>
>>>>> <action inline="true" application="set"
>>>> data="USERNAME=${sip_req_user}"/>
>>>>> <action application="info"/>
>>>>> <action application="set"
>>>> data="effective_caller_id_name=${sip_req_user}"/>
>>>>> <action application="set"
>>>> data="origination_caller_id_name=${sip_req_user} "/>
>>>>> <action inline="true" application="set"
>>>> data="PASSWD=${password}"/>
>>>>> <action application="execute_extension"
>>>> data="RADIUS_ANI_AUTH XML default"/>
>>>>> <action application="enum"
>>>> data="386${sip_redirect_contact_user_0:1}
>>>> enumsbc.softnet.si <http://enumsbc.softnet.si>
>>>> (http://enumsbc.softnet.si)"/>
>>>>> <action application="bridge"
>>> data="{origination_callee_id_name='${effective_caller_id_name}'}${enum_auto_route}"/>
>>>>> <action application="info"/>
>>>>> <action application="bridge"
>>> data="sofia/external/386${sip_redirect_contact_user_0:1}@xxx.xxx.xxx.xxx
>>> <http://xxx.xxx.xxx.xxx>"
>>> (mailto:sofia/external/386${sip_redirect_contact_user_0:1}@xxx.xxx.xxx.xxx
>>> <mailto:sofia/external/386$%7Bsip_redirect_contact_user_0:1%7D at xxx.xxx.xxx.xxx>)
>>>> />
>>> _________________________________________________________________________
>>>>> Professional FreeSWITCH Consulting Services:
>>>>> consulting at freeswitch.org <mailto:consulting at freeswitch.org>
>>>> (mailto:consulting at freeswitch.org)
>>>>> http://www.freeswitchsolutions.com
>>>>> FreeSWITCH-powered IP PBX: The CudaTel Communication
>>>> Server
>>>>>
>>>>> Official FreeSWITCH Sites
>>>>> http://www.freeswitch.org
>>>>> http://wiki.freeswitch.org
>>>>> http://www.cluecon.com
>>>>> FreeSWITCH-users mailing list
>>>>> FreeSWITCH-users at lists.freeswitch.org
>>>>> <mailto:FreeSWITCH-users at lists.freeswitch.org>
>>>> (mailto: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
>>>
>>>
>>> _________________________________________________________________________
>>> Professional FreeSWITCH Consulting Services:
>>> consulting at freeswitch.org <mailto:consulting at freeswitch.org>
>>> http://www.freeswitchsolutions.com
>>>
>>>
>>>
>>>
>>> Official FreeSWITCH Sites
>>> http://www.freeswitch.org
>>> http://wiki.freeswitch.org
>>> http://www.cluecon.com
>>>
>>> FreeSWITCH-users mailing list
>>> FreeSWITCH-users at lists.freeswitch.org
>>> <mailto: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
>>
>>
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org <mailto:consulting at freeswitch.org>
>> http://www.freeswitchsolutions.com
>>
>>
>>
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://wiki.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org <mailto: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
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org <mailto:consulting at freeswitch.org>
> http://www.freeswitchsolutions.com
>
>
>
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> <mailto: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
>
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
>
>
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.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
Hi,
so you say that I can not authenticate call via radius when is goes for
302 redirect?
Regards,
Miha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120305/e52ec49d/attachment-0001.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list