Displaying 3 results from an estimated 3 matches for "call_log_id".
2010 Jul 26
0
URGENT - who picked up the call??
...What I need is the way to capture (and write to DB) the information on who
'picked' or 'received' the incoming call.
Here is the example of .rb file that is called from extensions.conf:
private
def lokal
call_log_id = nil
begin
call_log_id = call_log()
$agi.answer
$agi.exec('WAIT', '2'...
2010 Jul 26
1
URgent - capturing 'answered'
...-- Zap/34-1 is ringing
-- Zap/35-1 is ringing
-- SIP/operator1-e77f answered Zap/23-1
So how can I capture this value and write it to mysql?
I already have this:
$my.query("UPDATE call_log
SET endtime = NOW() WHERE id = #{call_log_id}")
And i needed to do something like:
$my.query("UPDATE call_log
SET endtime = NOW(),answeredby= #{$agi.WHOANSWEREDTHEPHONE} WHERE id =
#{call_log_id}")
And in above example it would write SIP/operator1-e77f into answe...
2010 Jul 28
1
Passing Variables From Dial Macro To Parent Ruby
...etry 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 !
-------------- next part --------------
An HTML attachment was scrubbed.....