[Freeswitch-users] random DTMF after bridge attempt timeout in Javascript
Andy Ayers
andy at fabulous4.co.uk
Thu May 31 15:44:50 MSD 2012
Hi,
I have the following script snippet (simplified for the purposes of this
request):
if (session.ready()) {
// Play a welcome message, "please wait while we try to connect your
call"
session.sayPhrase('play', 'welcome.wav');
session.execute("set",
"ringback=%(400,200,400,450);%(400,2000,400,450)");
session.execute("bridge",
"{effective_caller_id_number=XXXX,origination_caller_id_number=XXXX,ignore_e
arly_media=true,continue_on_fail=true,hangup_after_bridge=false,originate_ti
meout=20}sofia/outbound/YYYY at sip.node4.co.uk");
if (session.getVariable("bridge_hangup_cause") != 'NORMAL_CLEARING')
{
// Play a sorry we could not connect your call message
session.sayPhrase('play', 'sorry.wav');
// Ask if they would like a callback, "press 1 if you would like a callback"
session.sayPhrase('play', 'callback.wav');
session.flushDigits();
var callback = session.getDigits(1, '', 5000);
if (callback=='1') {
//Do some more stuff
}
}
}
The problem I have is that if the bridge attempt times out, after playing
the callback.wav request message and whilst waiting for input the session
receives a random dtmf digit '6' without the caller pressing any keys on the
keypad.
Can anyone tell me where this digit comes from and how to prevent it from
coming in on the original session? Or else tell me that I've got it all
completely wrong and tell me how I can achieve the required call handling in
a different way?
Many thanks
Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120531/be1fa241/attachment.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list