some small lua and perl examples.. they look very similar...

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8202 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Brian West 2008-04-26 00:37:03 +00:00
parent 95437a05a9
commit a68c60c1f1
4 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,8 @@
-- This is an example of sending an event via luarun from the cli
-- Edit to your liking. luarun mwi_event.lua
freeswitch.console_log("info", "Sending MWI Event using Lua\n");
local event = freeswitch.Event("message_waiting");
event:add_header("MWI-Messages-Waiting", "no");
event:add_header("MWI-Message-Account", "sip:1002@10.0.1.100");
event:fire();

View File

@ -0,0 +1,6 @@
-- Example Lua script to originate. luarun
freeswitch.console_log("info", "Lua in da house!!!\n");
local session = freeswitch.Session("sofia/10.0.1.100/1002");
session:execute("playback", "/sr8k.wav");
session:hangup();

View File

@ -0,0 +1,8 @@
# This is an example of sending an event via perlrun from the cli
# Edit to your liking. perlrun mwi_event.pl
freeswitch::console_log("info", "Perl in da house!!!\n");
$event = new freeswitch::Event("message_waiting");
$event->add_header("MWI-Messages-Waiting", "yes");
$event->add_header("MWI-Message-Account", 'sip:1002@10.0.1.100');
$event->fire();

View File

@ -0,0 +1,6 @@
# Example Perl script to originate. perlrun
freeswitch::console_log("info", "Perl in da house!!!\n");
$session = new freeswitch::Session("sofia/10.0.1.100/1002") ;
$session->execute("playback", "/sr8k.wav");
$session->hangup();