Hi Shahid,<div><br><div>I am in favor of asterisk for what it is doing to your call. When you send an AMI event like the one you wrote it sends the A party invite right away w/o going into any context/extension. As soon as the A-party answers the call Asterisk manager connects/lands A-channel to the test context extension 210.</div>
<div><br></div><div>Your monitor command is recording I/O streams of b-party here. which is nothing except SendDTMF (silence I&#39;d say in terms of audio) - using MixMonitor, as Danny said, will record both A; and B-party channel audio. </div>
<div><br></div><div>Or the other possibility is that instead of directly making out call to A-party i.e SIP/447XXXXXXX@vpsprovider, SET some variables and originate call to Local channel i.e Local/447XXXXXXX@my-demo-context. And in that context use Monitor() before DIAL()</div>
<div><br></div><div>[my-demo-context]</div><div>exten =&gt; _447XXXXXXX,1,NOOP(--- I&#39;m going to Dial ${EXTEN} ---)</div><div>same =&gt; n,Monitor(blah-blah-blah filename)</div><div>same =&gt; n,DIAL(SIP/${EXTEN}@vpsprovider,,gFD(
wwww2w3w))</div><div>same =&gt; n,StopMonitor()</div><div>same =&gt; n,Hangup()</div><div><br></div><div>NOTE: You should not put and ANSWER() in this context/extension as that will lead to immediate connection to the B-party context^exten^prio (test,210,1 in your case)</div>
<div><br></div><div>The only difference this approach would make is that it&#39;ll record the ringing sounds/busy tones or any other carrier error messages played on your desired Outbound number.Whereas in your case only successful calls will be recorded.</div>
<div><br></div><div>Looking at your scripts I&#39;m having a feeling that you are trying to make an Auto-IVR-tester sort of thing - pressing DTMFs on an IVR and recording audio to see if your desired IVR has played or not !!<br>
<br>Regards,</div><div>Sammy.</div><div><br><div class="gmail_quote">On Wed, May 9, 2012 at 1:41 AM, Danny Nicholas <span dir="ltr">&lt;<a href="mailto:danny@debsinc.com" target="_blank">danny@debsinc.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Try MixMonitor instead of Monitor.  I think it is more robust.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> <a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank">asterisk-users-bounces@lists.digium.com</a> [mailto:<a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank">asterisk-users-bounces@lists.digium.com</a>] <b>On Behalf Of </b>Shahid H<br>
<b>Sent:</b> Tuesday, May 08, 2012 3:39 PM</span></p><div><div class="h5"><br><b>To:</b> Asterisk Users Mailing List - Non-Commercial Discussion<br><b>Subject:</b> Re: [asterisk-users] Why did it Hangup?<u></u><u></u></div>
</div><p></p><div><div class="h5"><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I have tried that and that did not fixed the problem,<u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div>
<p class="MsoNormal">However, I have added this in the dialplan:<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">exten =&gt; 210,n,Wait(60)<u></u><u></u></p></div><div><p class="MsoNormal">
<u></u> <u></u></p></div><div><p class="MsoNormal">That will hangup the call after 60 seconds...<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">That is fine by me but now Monitor() dont even work now... it does not record a call...?<u></u><u></u></p>
</div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p><div><p class="MsoNormal">On Tue, May 8, 2012 at 9:22 PM, Danny Nicholas &lt;<a href="mailto:danny@debsinc.com" target="_blank">danny@debsinc.com</a>&gt; wrote:<u></u><u></u></p>
<div><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Since you are Originating the call, the hangup command isn’t needed.  Remove and reload.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> <a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank">asterisk-users-bounces@lists.digium.com</a> [mailto:<a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank">asterisk-users-bounces@lists.digium.com</a>] <b>On Behalf Of </b>Shahid H<br>
<b>Sent:</b> Tuesday, May 08, 2012 3:20 PM<br><b>To:</b> Asterisk Users Mailing List - Non-Commercial Discussion<br><b>Subject:</b> Re: [asterisk-users] Why did it Hangup?</span><u></u><u></u></p><div><div><p class="MsoNormal">
 <u></u><u></u></p><p class="MsoNormal">No, that &#39;timeout&#39; option is when I don&#39;t answer the call.<u></u><u></u></p><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">My problem is when I DO answer the call, it get disconnected right away.<u></u><u></u></p>
</div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">Yes hangup() get executed right away when I answer the call.<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p><div><div>
<p class="MsoNormal"> <u></u><u></u></p><div><p class="MsoNormal">On Tue, May 8, 2012 at 9:17 PM, Danny Nicholas &lt;<a href="mailto:danny@debsinc.com" target="_blank">danny@debsinc.com</a>&gt; wrote:<u></u><u></u></p><div>
<div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">It is likely the 60 second timeout you are providing.  Or it could be the hangup() command in the 210 context.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> <a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank">asterisk-users-bounces@lists.digium.com</a> [mailto:<a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank">asterisk-users-bounces@lists.digium.com</a>] <b>On Behalf Of </b>Shahid H<br>
<b>Sent:</b> Tuesday, May 08, 2012 3:11 PM<br><b>To:</b> <a href="mailto:asterisk-users@lists.digium.com" target="_blank">asterisk-users@lists.digium.com</a><br><b>Subject:</b> [asterisk-users] Why did it Hangup?</span><u></u><u></u></p>
<div><div><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">I am learning how to use AMI and I am having 1 problem.. When I make a call to my mobile phone and when I answer it - it get disconnected/hangup right away. <u></u><u></u></p>
<div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">Why is that? What is the solution to stop that?<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">
For example:<u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><div><p class="MsoNormal">ACTION: Originate<u></u><u></u></p></div><div><p class="MsoNormal">Channel: SIP/447XXXXXXX@vpsprovider<u></u><u></u></p>
</div><div><p class="MsoNormal">Exten: 210<u></u><u></u></p></div><div><p class="MsoNormal">Priority: 1<u></u><u></u></p></div><div><p class="MsoNormal">CallerID: 0044123456789<u></u><u></u></p></div><div><p class="MsoNormal">
Timeout: 60000<u></u><u></u></p></div><div><p class="MsoNormal">Context: test<u></u><u></u></p></div></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><div><p class="MsoNormal">
exten =&gt; 210,1,Answer <u></u><u></u></p></div><div><p class="MsoNormal">exten =&gt; 210,n,Set(MONITOR_FILENAME=Record-${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)})<u></u><u></u></p></div><div><p class="MsoNormal">exten =&gt; 210,n,SendDTMF(wwww2w3w)<u></u><u></u></p>
</div><div><p class="MsoNormal">exten =&gt; 210,n,Monitor(wav,${MONITOR_FILENAME},ib)<u></u><u></u></p></div><div><p class="MsoNormal">exten =&gt; 210,n,Hangup()<u></u><u></u></p></div></div><div><p class="MsoNormal"> <u></u><u></u></p>
</div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">Before I had Dial() in the dialplan and it work great and no hangup.  Now I am using AMI method.<u></u><u></u></p></div><div><p class="MsoNormal">
 <u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">Thanks<u></u><u></u></p></div></div></div></div></div><p class="MsoNormal"><br>--<br>_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>New to Asterisk? Join us for a live introductory webinar every Thurs:<br>              <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>asterisk-users mailing list<br>To UNSUBSCRIBE or update options visit:<br>  <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><u></u><u></u></p>
</div><p class="MsoNormal"> <u></u><u></u></p></div></div></div></div></div></div></div><p class="MsoNormal"><br>--<br>_____________________________________________________________________<br>-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>              <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br><br>asterisk-users mailing list<br>To UNSUBSCRIBE or update options visit:<br>
  <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><u></u><u></u></p></div><p class="MsoNormal"><u></u> <u></u></p></div></div></div>
</div></div><br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
               <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br></div></div>