Thanks to help from Jim Dickenson I managed to start a macro and get info
about the channel that picked up the call from my ruby script.
The only thing that I cant do so far, is capturing the ${CHANNEL} variable
in the ruby script that started the macro.
Is that variable accessible from the ruby script too or just from the macro?
Here's a snippet from my ruby script:
dial_params << "||M(testing)m(moh-0900...@moh_id})"
if moh_available?()
1.times do
r = $agi.exec('DIAL', dial_params)
r = $agi.get_variable('DIALSTATUS')
retry if r.message.include?('BUSY')
end
and further below:
$loc = "testing"
$my.query("UPDATE call_log SET
local='#{$loc}', endtime = NOW() WHERE id = #{call_log_id}")
Works fine, but as soon as I try:
$loc = ${CHANNEL} or something like that - it breaks. Any idea how to pass
that ${CHANNEL} to my ruby script and use it to update DB in that query?
Thanks a bunch !
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users