<html><head><base href="x-msg://135/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><font class="Apple-style-span" face="'Courier New'" size="3"><span class="Apple-style-span" style="font-size: 13px;">I have never used&nbsp;1.2.9.1 or anything in the 1.2.x range so I can not give you an exact solution but I can tell you that the script that you are using will not work. In the dial command you need to add the M option which will call a macro when the call is connected. In that macro you can then find the channel that answered the call and do what you want from there. You can call another AGI or set variables or whatever. If agi.exec works like a dialplan step then the dial step will hang if the call is answered and the agi.get_variable statement will not execute unless the call was not answered.</span></font><div><font class="Apple-style-span" face="'Courier New'" size="3"><span class="Apple-style-span" style="font-size: 13px;"><br></span></font></div><div><font class="Apple-style-span" face="'Courier New'" size="3"><span class="Apple-style-span" style="font-size: 13px;"><br></span></font></div><div><font class="Apple-style-span" face="'Courier New'" size="3"><span class="Apple-style-span" style="font-size: 13px;">Try</span></font></div><div><font class="Apple-style-span" face="'Courier New'" size="3"><span class="Apple-style-span" style="font-size: 13px;"><br></span></font></div><div><font class="Apple-style-span" face="'Courier New'" size="3"><span class="Apple-style-span" style="font-size: 13px;"><blockquote type="cite" style="font-family: 'Hoefler Text'; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; font-family: 'Hoefler Text'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div lang="EN-US" link="blue" vlink="purple"><div class="WordSection1" style="page: WordSection1; "><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; ">r = $agi.exec('DIAL', SIP/voipuser&amp;Zap/32&amp;Zap/33&amp;Zap/34&amp;Zap/35,,M(testing))</div></div></div></span></blockquote></span></font><div><br class="webkit-block-placeholder"></div><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; ">And then have something like this in extensions.conf</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; ">[macro-testing]</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; ">exten =&gt; s,1,DumpChan()</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; ">You will see that this macro runs when the call is answered and you will see on the CLI all the variables that are available to you. ${CHANNEL} will have&nbsp;<span class="Apple-style-span" style="font-family: Calibri, sans-serif; font-size: 15px; ">SIP/ voipuser-e989&nbsp;</span>in your example below.</div></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; ">--&nbsp;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; ">Jim Dickenson</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "><a href="mailto:dickenson@cfmc.com">mailto:dickenson@cfmc.com</a></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; ">CfMC</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "><a href="http://www.cfmc.com/">http://www.cfmc.com/</a></div><div><font class="Apple-style-span" face="Monaco" size="2"><span class="Apple-style-span" style="font-size: 10px; "><br></span></font></div></div></span><br class="Apple-interchange-newline">
</div>
<br><div><div>On Jul 27, 2010, at 7:21 AM, Zarko Zivanovic wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: 'Hoefler Text'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div lang="EN-US" link="blue" vlink="purple"><div class="WordSection1" style="page: WordSection1; "><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; ">Here’s something that should be easy for RUBY pro’s.<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; ">Here is a script:<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.times do<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; r = $agi.exec('DIAL', SIP/voipuser&amp;Zap/32&amp;Zap/33&amp;Zap/34&amp;Zap/35)<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; r = $agi.get_variable('DIALSTATUS')<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$agi.set_variable(' WHOANSWERED ',...)<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; retry if r.message.include?('BUSY')<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end&nbsp;<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; ">when it’s executed it shows this in the console:<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 1in; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 1in; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 1in; font-size: 11pt; font-family: Calibri, sans-serif; ">AGI Rx &lt;&lt; ANSWER<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 1in; font-size: 11pt; font-family: Calibri, sans-serif; ">AGI Tx &gt;&gt; 200 result=0<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 1in; font-size: 11pt; font-family: Calibri, sans-serif; ">AGI Rx &lt;&lt; EXEC DIAL SIP/voipuser&amp;Zap/32&amp;Zap/33&amp;Zap/34&amp;Zap/35<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 1in; font-size: 11pt; font-family: Calibri, sans-serif; ">&nbsp;&nbsp;&nbsp; -- AGI Script Executing Application: (DIAL) Options: (SIP/voipuser&amp;Zap/32&amp;Zap/33&amp;Zap/34&amp;Zap/35)<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 1in; font-size: 11pt; font-family: Calibri, sans-serif; ">&nbsp;&nbsp;&nbsp; -- Called voipuser<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 1in; font-size: 11pt; font-family: Calibri, sans-serif; ">&nbsp;&nbsp;&nbsp; -- Called 32<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 1in; font-size: 11pt; font-family: Calibri, sans-serif; ">&nbsp;&nbsp;&nbsp; -- Called 33<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 1in; font-size: 11pt; font-family: Calibri, sans-serif; ">&nbsp;&nbsp;&nbsp; -- Called 34<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 1in; font-size: 11pt; font-family: Calibri, sans-serif; ">&nbsp;&nbsp;&nbsp; -- Called 35<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 1in; font-size: 11pt; font-family: Calibri, sans-serif; ">&nbsp;&nbsp;&nbsp; -- Zap/32-1 is ringing<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 1in; font-size: 11pt; font-family: Calibri, sans-serif; ">&nbsp;&nbsp;&nbsp; -- Zap/33-1 is ringing<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 1in; font-size: 11pt; font-family: Calibri, sans-serif; ">&nbsp;&nbsp;&nbsp; -- Zap/34-1 is ringing<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 1in; font-size: 11pt; font-family: Calibri, sans-serif; ">&nbsp;&nbsp;&nbsp; -- Zap/35-1 is ringing<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 1in; font-size: 11pt; font-family: Calibri, sans-serif; ">&nbsp;&nbsp;&nbsp; -- SIP/voipuser-e989 is ringing<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 1in; font-size: 11pt; font-family: Calibri, sans-serif; ">&nbsp;&nbsp;&nbsp; -- SIP/ voipuser-e989 answered Zap/1-1&nbsp;&nbsp;&nbsp;<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 1in; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 1in; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; ">What we need is to be able to populate the variable WHOANSWERED with info<span class="Apple-converted-space">&nbsp;</span><b>SIP/ voipuser</b><o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; ">In this case, or whoever answers next time.<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; ">Thanks in advance!<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div></div><br><br>__________ Information from ESET NOD32 Antivirus, version of virus signature database 5317 (20100727) __________<br><br>The message was checked by ESET NOD32 Antivirus.<br><br><a href="http://www.eset.com" style="color: blue; text-decoration: underline; ">http://www.eset.com</a><br>--<span class="Apple-converted-space">&nbsp;</span><br>_____________________________________________________________________<br>-- Bandwidth and Colocation Provided by<span class="Apple-converted-space">&nbsp;</span><a href="http://www.api-digital.com" style="color: blue; text-decoration: underline; ">http://www.api-digital.com</a><span class="Apple-converted-space">&nbsp;</span>--<br>New to Asterisk? Join us for a live introductory webinar every Thurs:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.asterisk.org/hello" style="color: blue; text-decoration: underline; ">http://www.asterisk.org/hello</a><br><br>asterisk-users mailing list<br>To UNSUBSCRIBE or update options visit:<br>&nbsp;&nbsp;<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" style="color: blue; text-decoration: underline; ">http://lists.digium.com/mailman/listinfo/asterisk-users</a></div></span></blockquote></div><br></div></body></html>