|
From: | Martin Borer |
Subject: | [Bayonne-devel] Cut a call without quit the Script?!?! |
Date: | Mon, 17 Jan 2005 23:09:02 +0100 |
Hi all, I have a ccScript
question. How can I use the "dial" function more than one time in a
Script? The following Script gets the phone numbers by a php
Interface (get_next_alarm.php). The PHP Script
returns an alarm ID (%dbID) a phone number (%dbNumber) and an alarm number (%dbAlarm).
If there is no more alarm in the MySQL Database, the PHP
script sets the alarm ID to (-1), only when %dbID is
set to -1, the script terminates. When the callee
manually hangup, then myscript.scr
is running fine. It gets the next Number and call it. But when the callee doesn't hang up, the Script is playing all alarms to
the same Number. How can I cut a call, without quit the script? Thanks for your answers… Grüezi from Switzerland ;) Martin Script example: # myscript.scr options
dtmf=script cleardigits #
clear digit buffer set
%session.voice VOICE set
%state 3 set
%cmd "get" libexec 10 get_next_alarm.php %cmd #
Exit, if there are no more alarms to do. if
%dbID -lt 0 then exit dial
%dbNumber sleep
2 label
playAlarm play
myaudio:intro case
%dbAlarm -eq 1 play myaudio:alarm1 case
%dbAlarm -eq 2 play myaudio:alarm2 case
%dbAlarm -eq 3 play myaudio:alarm3 endcase play
myaudio:end sleep
60 hangup ^1 set
%cmd "set" set
%id %dbID set
%state 1 libexec 10 get_next_alarm.php %cmd %id %state play
myaudio:confirmation hangup ^2 cleardigits skip
playAlarm ^hangup if
%state -ne 1 then set %cmd
"set" set %id %dbID set %state 3 libexec 10 get_next_alarm.php %cmd %id
%state endif goto myscript |
[Prev in Thread] | Current Thread | [Next in Thread] |