<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Hi,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I have the following script snippet (simplified for the purposes of this request):<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Courier New";color:blue'>if</span><span style='font-size:9.0pt;font-family:"Courier New"'> (session.ready()) {<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Courier New"'> // Play a welcome message, “please wait while we try to connect your call”<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Courier New"'> session.sayPhrase(<span style='color:#A31515'>'play'</span>, <span style='color:#A31515'>'welcome.wav'</span>);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Courier New"'> session.execute(<span style='color:#A31515'>"set"</span>, <span style='color:#A31515'>"ringback=%(400,200,400,450);%(400,2000,400,450)"</span>); <o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Courier New"'>session.execute(<span style='color:#A31515'>"bridge"</span>, <span style='color:#A31515'>"{effective_caller_id_number=XXXX,origination_caller_id_number=XXXX,ignore_early_media=true,continue_on_fail=true,hangup_after_bridge=false,originate_timeout=20}sofia/outbound/YYYY@sip.node4.co.uk"</span>);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Courier New"'> <span style='color:blue'>if</span> (session.getVariable(<span style='color:#A31515'>"bridge_hangup_cause"</span>) != <span style='color:#A31515'>'NORMAL_CLEARING'</span>) {<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Courier New"'> // Play a sorry we could not connect your call message<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Courier New"'> session.sayPhrase(<span style='color:#A31515'>'play'</span>, <span style='color:#A31515'>'sorry.wav'</span>);<o:p></o:p></span></p><p class=MsoNormal style='margin-left:36.0pt;text-indent:36.0pt;text-autospace:none'><span style='font-size:9.0pt;font-family:"Courier New"'>// Ask if they would like a callback, “press 1 if you would like a callback”<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Courier New"'> session.sayPhrase(<span style='color:#A31515'>'play'</span>, <span style='color:#A31515'>'callback.wav'</span>);<o:p></o:p></span></p><p class=MsoNormal style='margin-left:36.0pt;text-indent:36.0pt;text-autospace:none'><span style='font-size:9.0pt;font-family:"Courier New"'>session.flushDigits();<o:p></o:p></span></p><p class=MsoNormal style='margin-left:36.0pt;text-indent:36.0pt;text-autospace:none'><span style='font-size:9.0pt;font-family:"Courier New"'>var callback = session.getDigits(1, <span style='color:#A31515'>''</span>, 5000);<o:p></o:p></span></p><p class=MsoNormal style='margin-left:36.0pt;text-indent:36.0pt;text-autospace:none'><span style='font-size:9.0pt;font-family:"Courier New"'>if (callback==<span style='color:#A31515'>'</span>1<span style='color:#A31515'>'</span>) {<o:p></o:p></span></p><p class=MsoNormal style='margin-left:36.0pt;text-indent:36.0pt;text-autospace:none'><span style='font-size:9.0pt;font-family:"Courier New"'> //Do some more stuff<o:p></o:p></span></p><p class=MsoNormal style='margin-left:36.0pt;text-indent:36.0pt;text-autospace:none'><span style='font-size:9.0pt;font-family:"Courier New"'>} <o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.0pt;font-family:"Courier New"'> }<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Courier New"'>}<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal>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.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>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?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Many thanks<o:p></o:p></p><p class=MsoNormal>Andy<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>