Hi,
I'm following the instructions here to create a script the can intercept chat messages:
http://wiki.freeswitch.org/wiki/Mod_sms#sendwhen i send a chat message i get the error bellow, why is that? and why the chat method isn't invoked?
2014-09-07 13:29:53.397788 [INFO] mod_sms.c:336 Processing text message 1111->2222 in context public
Chatplan: 2222 parsing [public->public] continue=false
Chatplan: 2222@x.x.x.1 Regex (PASS) [public] to(2222@x.x.x.1) =~ /^(.*)$/ break=on-false
Chatplan: 2222@x.x.x.1 Action lua(handle_chat.lua)
Chatplan: 2222@x.x.x.1 Action reply(Hello, you said: ${_body})
Chatplan: 2222@x.x.x.1 Action send()
2014-09-07 13:29:53.397788 [ERR] mod_lua.cpp:203 /usr/local/freeswitch/scripts/handle_chat.lua:6: '=' expected near 'body'
Public.xml:<?xml version="1.0" encoding="utf-8"?>
<include>
<context name="public">
<extension name="public">
<condition field="to" expression="^(.*)$">
<action application="lua" data="handle_chat.lua"/>
<action application="reply" data="Hello, you said: ${_body}"/>
<action application="send"/>
</condition>
</extension>
</context>
</include>
logInfo("chatplan body is=" .. body);
--message:chat_execute("reply", "you said: " .. message:getBody());