[Freeswitch-users] Using chat command in a dialplan

Kurtis Heimerl kheimerl at cs.berkeley.edu
Fri Jul 22 13:20:28 MSD 2011


That's a good plan. I'll try that out this weekend.

On Fri, Jul 22, 2011 at 1:05 AM, Steven Ayre <steveayre at gmail.com> wrote:
> Never tried it from a dialplan although I'm sure it should work. But you
> should be able to do it through Lua etc.
>
> Maybe you could apply a quick patch to originate in mod_commands to log the
> arguments it's being passed - perhaps it's being mangled somehow.
>
> -Steve
>
>
> On 21 July 2011 23:47, Kurtis Heimerl <kheimerl at cs.berkeley.edu> wrote:
>>
>> Unfortunately, I am not. I'm working on a system that causes dialplan
>> actions when a chat is received by FS. That's what's going on here,
>> basically. I want someone to text 9199 and have FS immediately call
>> them back. I think "originate" is the right way to do that, as I need
>> to create a brand new session, not bridge to an existing one.
>>
>> Anyhow, any other ideas on why this isn't working?
>>
>> On Thu, Jul 21, 2011 at 1:23 AM, Steven Ayre <steveayre at gmail.com> wrote:
>> > Are you trying to join the 2 calls together? If so, use bridge:
>> > http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_bridge
>> >
>> > -Steve
>> >
>> >
>> > On 21 July 2011 07:37, Kurtis Heimerl <kheimerl at cs.berkeley.edu> wrote:
>> >>
>> >> I'm now having a similar problem with using "originate" to create a
>> >> new call inside a dialplan. This one is particularly perplexing (and
>> >> small enough not to warrant pastebin)
>> >>
>> >> Here's the important bits of the dialplan:
>> >>        <action application="log" data="(user/${username}
>> >> ${destination_number})"/>
>> >>        <action application="set"
>> >> data="api_result=${originate(user/${username}
>> >> ${destination_number})}"/>
>> >>
>> >> and the log output
>> >> EXECUTE 9199 log((user/1304 at 192.168.1.144 9199))
>> >> 2011-07-20 23:17:12.955419 [DEBUG] mod_dptools.c:1202 9199)
>> >> EXECUTE 9199 set(api_result=-USAGE <call url>
>> >> <exten>|&<application_name>(<app_args>) [<dialplan>] [<context>]
>> >> [<cid_name>] [<cid_num>] [<timeout_sec>]
>> >> )
>> >>
>> >> So it's somehow mangling the originate commands. If I run the
>> >> originate command directly (with the arguments logged!) it works just
>> >> fine.
>> >> originate user/1304 at 192.168.1.144 9199
>> >>
>> >> What am I missing here? This seems so simple...  but I'm at my wit's
>> >> end.
>> >>
>> >> Thanks for any direction in advance!
>> >>
>> >>
>> >> On Wed, Jul 20, 2011 at 7:11 PM, Kurtis Heimerl
>> >> <kheimerl at cs.berkeley.edu> wrote:
>> >> > Exactly what I was looking for. Thanks!
>> >> >
>> >> > On Wed, Jul 20, 2011 at 1:21 AM, Steven Ayre <steveayre at gmail.com>
>> >> > wrote:
>> >> >> Kurtis,
>> >> >>
>> >> >> *Any* api can be run from the dialplan. It's just a slightly
>> >> >> different
>> >> >> syntax - the link Francois gave you will show you how.
>> >> >>
>> >> >> Steve on iPhone
>> >> >>
>> >> >> On 20 Jul 2011, at 09:14, François Delawarde
>> >> >> <fdelawarde at wirelessmundi.com> wrote:
>> >> >>
>> >> >>> Hi,
>> >> >>>
>> >> >>> Take a look at:
>> >> >>> http://wiki.freeswitch.org/wiki/Mod_commands#From_the_Dialplan
>> >> >>>
>> >> >>>
>> >> >>> François.
>> >> >>>
>> >> >>> On Tue, 2011-07-19 at 23:00 -0700, Kurtis Heimerl wrote:
>> >> >>>> I feel somewhat embarrassed, but I can't figure out how to cause a
>> >> >>>> chat event to go off from the dialplan. I've tried:
>> >> >>>>
>> >> >>>> <action application="chat"
>> >> >>>>
>> >> >>>>
>> >> >>>> data="sip|${username}|${destination_number}@${domain_name}|${msg_body}"/>
>> >> >>>>
>> >> >>>> and
>> >> >>>>
>> >> >>>> <action application="eval" data="chat
>> >> >>>>
>> >> >>>> sip|${username}|${destination_number}@${domain_name}|${msg_body}"/>
>> >> >>>>
>> >> >>>> and neither worked. The wiki says it's part of the API
>> >> >>>> (http://wiki.freeswitch.org/wiki/Mod_dptools) but I'm pretty sure
>> >> >>>> that's just a command-line API. Is there a way to run a
>> >> >>>> command-line
>> >> >>>> call from the dialplan?
>> >> >>>>
>> >> >>>> Any direction would be appreciated.
>> >> >>>>
>> >> >>>> _______________________________________________
>> >> >>>> Join us at ClueCon 2011, Aug 9-11, Chicago
>> >> >>>> http://www.cluecon.com 877-7-4ACLUE
>> >> >>>>
>> >> >>>> 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
>> >> >>>
>> >> >>>
>> >> >>>
>> >> >>> _______________________________________________
>> >> >>> Join us at ClueCon 2011, Aug 9-11, Chicago
>> >> >>> http://www.cluecon.com 877-7-4ACLUE
>> >> >>>
>> >> >>> 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
>> >> >>
>> >> >> _______________________________________________
>> >> >> Join us at ClueCon 2011, Aug 9-11, Chicago
>> >> >> http://www.cluecon.com 877-7-4ACLUE
>> >> >>
>> >> >> 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
>> >> >>
>> >> >
>> >>
>> >> _______________________________________________
>> >> Join us at ClueCon 2011, Aug 9-11, Chicago
>> >> http://www.cluecon.com 877-7-4ACLUE
>> >>
>> >> 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
>> >
>> >
>> > _______________________________________________
>> > Join us at ClueCon 2011, Aug 9-11, Chicago
>> > http://www.cluecon.com 877-7-4ACLUE
>> >
>> > 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
>> >
>> >
>>
>> _______________________________________________
>> Join us at ClueCon 2011, Aug 9-11, Chicago
>> http://www.cluecon.com 877-7-4ACLUE
>>
>> 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
>
>
> _______________________________________________
> Join us at ClueCon 2011, Aug 9-11, Chicago
> http://www.cluecon.com 877-7-4ACLUE
>
> 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
>
>



More information about the FreeSWITCH-users mailing list