[Freeswitch-dev] Calling Python Application from Chatplan (mod_sms help)

Anthony Minessale anthony.minessale at gmail.com
Fri Oct 21 01:37:23 MSD 2011


from the code:

SWITCH_ADD_CHAT_APP(chat_app_interface, "python", "execute a python
script", "execute a python script", python_chat_function, "<script>",
SCAF_NONE);

you must not have the version loaded that implemented it.


On Thu, Oct 20, 2011 at 3:40 PM, Kurtis Heimerl
<kheimerl at cs.berkeley.edu> wrote:
> Still not working:
>
>    <extension name="openbts">
>      <condition field="to_user" expression="^smsc$">
>        <action application="set" data="api_result=${log(${to})}"/>
>        <action application="python" data="OpenBTS_Parse_SMS"/>
>      </condition>
>    </extension>
>
> 2011-10-20 13:39:49.534714 [INFO] mod_sms.c:300 Processing text
> message IMSI641104278340879->smsc in context default
> 2011-10-20 13:39:49.534714 [ERR] switch_loadable_module.c:705 Invalid
> chat application interface [python]!
>
> On Wed, Oct 19, 2011 at 9:57 AM, Kurtis Heimerl
> <kheimerl at cs.berkeley.edu> wrote:
>> Great, will do!
>>
>> On Wed, Oct 19, 2011 at 8:23 AM, Anthony Minessale
>> <anthony.minessale at gmail.com> wrote:
>>> try latest
>>>
>>> On Tue, Oct 18, 2011 at 7:00 PM, Kurtis Heimerl
>>> <kheimerl at cs.berkeley.edu> wrote:
>>>> Oh, and I can confirm that only Lua works from the chatplan.
>>>>
>>>> On Tue, Oct 18, 2011 at 4:12 PM, Kurtis Heimerl
>>>> <kheimerl at cs.berkeley.edu> wrote:
>>>>> I'm pushing this to FreeSwitch-dev as mod_sms is still under active
>>>>> development.
>>>>>
>>>>> Any way to call a Python Application from the chatplan?
>>>>>
>>>>> This works:
>>>>>
>>>>> <action application="set" data="test=${python(OpenBTS_Parse_SMS)}"/>
>>>>>
>>>>> But I can't monkey with the session variables with the fs_api call.
>>>>>
>>>>> Instead, I want to do this:
>>>>>
>>>>> <action application="python" data="OpenBTS_Parse_SMS"/>
>>>>>
>>>>> and this fails in the following way:
>>>>>
>>>>> 2011-10-18 16:12:02.776298 [ERR] switch_loadable_module.c:705 Invalid
>>>>> chat application interface [python]!
>>>>>
>>>>> The mod_sms page seems to indicate that lua works just fine from the
>>>>> chatplan... is this just not implemented yet? Can I do that?
>>>>>
>>>>> Thanks!
>>>>>
>>>>
>>>> _______________________________________________
>>>> Join us at ClueCon 2011, Aug 9-11, Chicago
>>>> http://www.cluecon.com 877-7-4ACLUE
>>>>
>>>> FreeSWITCH-dev mailing list
>>>> FreeSWITCH-dev at lists.freeswitch.org
>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
>>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
>>>> http://www.freeswitch.org
>>>>
>>>
>>>
>>>
>>> --
>>> Anthony Minessale II
>>>
>>> FreeSWITCH http://www.freeswitch.org/
>>> ClueCon http://www.cluecon.com/
>>> Twitter: http://twitter.com/FreeSWITCH_wire
>>>
>>> AIM: anthm
>>> MSN:anthony_minessale at hotmail.com
>>> GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
>>> IRC: irc.freenode.net #freeswitch
>>>
>>> FreeSWITCH Developer Conference
>>> sip:888 at conference.freeswitch.org
>>> googletalk:conf+888 at conference.freeswitch.org
>>> pstn:+19193869900
>>>
>>> _______________________________________________
>>> Join us at ClueCon 2011, Aug 9-11, Chicago
>>> http://www.cluecon.com 877-7-4ACLUE
>>>
>>> FreeSWITCH-dev mailing list
>>> FreeSWITCH-dev at lists.freeswitch.org
>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
>>> http://www.freeswitch.org
>>>
>>
>
> _______________________________________________
> Join us at ClueCon 2011, Aug 9-11, Chicago
> http://www.cluecon.com 877-7-4ACLUE
>
> FreeSWITCH-dev mailing list
> FreeSWITCH-dev at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
>



-- 
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:anthony_minessale at hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org
googletalk:conf+888 at conference.freeswitch.org
pstn:+19193869900



Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-dev mailing list