<br><br><div class="gmail_quote">On Jan 15, 2008 12:32 PM, Naveen Palani <<a href="mailto:naveenp@quinnox.com">naveenp@quinnox.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff">
<div><font face="Arial" size="2">Hi,</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">I am using Asterisk-1.4.11 version to make outbound calls and deliver the swift text to audio.
</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">My functionality is as for example i make this text to audio deliver the person called.</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Eg. swift -o /tmp/test.wav -p audio/channels=1,audio/sampling-rate=8000 "Press 1 to confirm. Press 3 to cancel."</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">extension.conf dialplan:</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font color="#800000" face="Arial" size="2">[dialout]</font></div>
<div><font face="Arial" size="2"><font color="#800000">exten => outbound-handler,1,Dial(</font><a href="mailto:SIP/$%7BCallInitiate_phonenumber%7D@proxy2.bandtel.com,60,gM%28outbound-connect%5Eagi://10.1.1.68/ivr/speak%5E$%7BCallInitiate_hashdata%7D%5E$%7BMACHINE_STATUS_UNKNOWN" target="_blank">
<font color="#800000">SIP/102,60,gM(outbound-connect^agi://10.1.1.68/ivr/speak^${CallInitiate_hashdata</font></a><font color="#800000">}))</font></font></div>
<div><font color="#800000" face="Arial" size="2"></font> </div>
<div><font color="#800000" face="Arial" size="2">[macro-outbound-connect]<br>
exten => s,1,Answer()</font></div>
<div><font color="#800000" face="Arial" size="2">exten => s,2,System(swift -o /tmp/test.wav -p audio/channels=1,audio/sampling-rate=8000 "Press 1 to confirm. Press 3 to cancel.")</font></div>
<div><font color="#800000" face="Arial" size="2">exten => s,3,Background(/tmp/test)</font></div>
<div><font color="#800000" face="Arial" size="2">exten => s,4,Hangup</font></div>
<div><font color="#800000" face="Arial" size="2"></font> </div>
<div><font color="#800000" face="Arial" size="2">exten => 1,1,Playback(thanks)</font></div>
<div><font color="#800000" face="Arial" size="2">exten => 2,1,Playback(bye)</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Here in this, the call is connected and answered the control transfer to macro context. One way i can interrupt the text before it completes the text is by using 'Background (/tmp/test)' to play the audio.
</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">When iam in the middle of the audio if i press 1 before it completes the entire text, the control should go to 'exten => 1,1,Playback(thanks)'. But in macro the 'Background' doesnt seem to work. It works fine outside macro context.
</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">When i use the Asterisk cmd GoTo(new_context,extn,priority) inside macro, I get a message 'channel jumping out of macro "outbound-connect"' waits for a minute and hungs up, the control doesnt go to new_context.
</font></div>
<div> </div>
<div><font face="Arial" size="2">Does anyone have any ideas i can work it out. How can i have the Asterisk cmd Background inside macro? or how to execute the GoTo command?</font> </div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Thanks and appreciate your response.</font></div>
<div>
<p><font size="2"><font face="Arial">Regards,</font></font><br>
<b><b><font size="2"><font face="Arial">Naveen.Palani</font></font></b></b>
<br>
<br></p></div></div></blockquote><div>This may or may not help. It was a solution to what seems a similar problem in another recent post.<br><br>"Use Read to get the extension at the end with GotoIf on the
variable checks and Background with the context parameter set to the <span class="nfakPe">macro</span> context."<br><br>Thanks,<br>Steve Totaro<br></div></div><br>