[Freeswitch-users] Problem in getting digits value in Playback application

Manish Talwar manish.talwar at zaristo.com
Thu Sep 18 12:14:13 MSD 2014


Hi,


As you suggested, "Play_and_get_digits" command is running fine now, But I am still not able to get the value of Channel variable "myChannelVar" in a call as Its returning me blank value.


I am sending request as:


<document type="xml/freeswitch-httapi">

    ​<params></params>

    <work>

        <getVariable  name="myChannelVar" permanent="1"/>

        <execute application="play_and_get_digits" data="1 4 1 5000 # ivr/MP3/card_activate_birth_date.mp3 '' myChannelVar \d+" />

        <execute application="log" data="INFO my_chan_var contains ${myChannelVar}"/>

        <execute application="hangup"/>

    ​</work>

</document>


As a output, its play a audio file and I pressed a key 2222 digits in a call but its returning me blank value in channel variable "myChannelVar​".

I got a response in a console log as:

2014-09-18 13:28:49.739010 [DEBUG] mod_httapi.c:1217 Process Tag: [execute]
EXECUTE portaudio/5000 log(INFO my_chan_var contains )
2014-09-18 13:28:49.739010 [INFO] mod_dptools.c:1628 my_chan_var contains


I have set the permission in my HTTAPI config file to "set-vars", "get-vars" & "expand-vars" tags and its seem like working fine. For reference, please find my HTTAPI config file as an attachment.


Please suggest me how do I got a channel variable value and pass it to other POST request.


Thanks,


Regards,

Manish Talwar

________________________________
From: Manish Talwar <manish.talwar at zaristo.com>
Sent: 18 September 2014 11:54
To: FreeSWITCH Users Help
Subject: Re: [Freeswitch-users] Problem in getting digits value in Playback application


​Its working fine now, Thanks a lot.


Regards,

Manish Talwar


________________________________
From: Michael Collins <msc at freeswitch.org>
Sent: 18 September 2014 01:00
To: FreeSWITCH Users Help
Subject: Re: [Freeswitch-users] Problem in getting digits value in Playback application

I think what you did was set the default to allow and everything you listed underneath became denied. Try setting the default back to deny and see if it works as expected.
-MC

On Wed, Sep 17, 2014 at 7:28 AM, Manish Talwar <manish.talwar at zaristo.com<mailto:manish.talwar at zaristo.com>> wrote:

Hi,


Please revert me about Permission setting ASAP.


Regards,

Manish Talwar


________________________________
From: Manish Talwar
Sent: 17 September 2014 10:59
To: FreeSWITCH Users Help
Subject: RE: [Freeswitch-users] Problem in getting digits value in Playback application


Hi,


I have tried by giving below Permission with my HTTAPI config file.​


    <permission name="execute-apps" value="true">
 <!-- default to "deny" or "allow" -->
 <application-list default="allow">
       <!-- type attr can be "deny" or "allow" nothing defaults to opposite of the list default so allow in this case -->
       <application name="info"/>
<application name="play_and_get_digits"/>
       <application name="hangup"/>
 </application-list>
    </permission>

and from Web Application, I am sending request as:

<document type="xml/freeswitch-httapi">
    <params></params>
    <work>
        <execute application="play_and_get_digits" data="1 4 1 5000 # /ivr/8000/ivr-enter_number_to_remove_from_blacklist.wav '' foobar \d+" />
    </work>
</document>

but still its giving me error as  "[ERR] mod_httapi.c:840 Permission Denied!"​

However, its work fine with hangup application:

<document type="xml/freeswitch-httapi">
    <params></params>
    <work>
        <execute application="hangup"/>
    ​</work>
</document>

I feel, it must be some setting problem in config file only​. Please find my HTTAPI config file​ as an attachment and let me know if any changes required in this file.

Thanks,

Regards,
Manish​ Talwar
________________________________
From: Michael Collins <msc at freeswitch.org<mailto:msc at freeswitch.org>>​
Sent: 16 September 2014 23:09
To: FreeSWITCH Users Help
Subject: Re: [Freeswitch-users] Problem in getting digits value in Playback application


On Tue, Sep 16, 2014 at 9:46 AM, Manish Talwar <manish.talwar at zaristo.com<mailto:manish.talwar at zaristo.com>> wrote:

​Hi,


Thanks for quick response, I have already try to use this "play_and_get_digits​" command.


Its working fine when I use this as a dialplan <extension> tag in FreeSwitch file but while using it in Web Application with "<execute>" httapi command its throwing error as "[ERR] mod_httapi.c:840 Permission Denied!"


I have tried to reset Permission of "execute-apps" in httapi-conf.xml file, but still got same error.

<http://www.freeswitchsolutions.com>
This is almost certainly a permissions issue with your HTTAPI config file. What do you have in your "execute-apps" section? The default is to deny and then explicitly allow only the items you specify. FYI, this is covered quite thoroughly in the FreeSWITCH 1.2 book on pages 277-280.

-MC




_________________________________________________________________________
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://confluence.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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20140918/5341fb0e/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: httapi.conf.xml
Type: text/xml
Size: 5235 bytes
Desc: httapi.conf.xml
Url : http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20140918/5341fb0e/attachment-0001.xml 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list