hi,<br>i realized something playing with automon.<br>for outbound calls, the soxmix is done before the exten h, like:<br><br>&nbsp;&nbsp;&nbsp; -- User(SIP/10-081ad618) hit &#39;*3&#39; to record call. filename: wav|1192682283.66|m<br>Oct 18 00:38:07 DEBUG[32203]: 
channel.c:3386 ast_generic_bridge: Didn&#39;t get a frame from channel: SIP/10-081ad618<br>Oct 18 00:38:07 DEBUG[32203]: channel.c:3675 ast_channel_bridge: Bridge stops bridging channels SIP/10-081ad618 and SIP/17-081b2b58
<br>Oct 18 00:38:07 DEBUG[32203]: chan_sip.c:2448 sip_hangup: update_call_counter(17) - decrement call limit counter<br>Oct 18 00:38:07 DEBUG[32203]: res_monitor.c:299 ast_monitor_stop: monitor executing ( nice -n 19 soxmix &quot;/var/spool/asterisk/monitor/1192682283.66-
in.wav&quot; &quot;/var/spool/asterisk/monitor/1192682283.66-out.wav&quot; &quot;/var/spool/asterisk/monitor/1192682283.66.wav&quot;&nbsp; &amp;&amp; rm -f &quot;/var/spool/asterisk/monitor/1192682283.66-&quot;* ) &amp;<br>Oct 18 00:38:07 DEBUG[32203]: app_dial.c:1644 dial_exec_full: Exiting with DIALSTATUS=ANSWER.
<br>&nbsp; == Spawn extension (from-sip, 17, 2) exited non-zero on &#39;SIP/10-081ad618&#39;<br>&nbsp;&nbsp;&nbsp; -- Executing DeadAGI(&quot;SIP/10-081ad618&quot;, &quot;manage_automon.agi&quot;) in new stack<br>&nbsp;&nbsp;&nbsp; -- Launched AGI Script /var/lib/asterisk/agi-bin/manage_automon.agi
<br><br>which is perfect, the soxmix is done before the deadagi.<br><br><br>but, for inbound calls, the soxmix is done after the exten h:<br>&nbsp;&nbsp;&nbsp; -- User(SIP/17-081b2b58) hit &#39;*3&#39; to record call. filename: wav|1192682242.64|m
<br>Oct 18 00:37:30 DEBUG[32167]: channel.c:3386 ast_generic_bridge: Didn&#39;t get a frame from channel: SIP/17-081b2b58<br>Oct 18 00:37:30 DEBUG[32167]: channel.c:3675 ast_channel_bridge: Bridge stops bridging channels SIP/10-081ad618 and SIP/17-081b2b58
<br>Oct 18 00:37:30 DEBUG[32167]: chan_sip.c:2448 sip_hangup: update_call_counter(17) - decrement call limit counter<br>Oct 18 00:37:30 DEBUG[32167]: app_dial.c:1644 dial_exec_full: Exiting with DIALSTATUS=ANSWER.<br>&nbsp; == Spawn extension (from-sip, 17, 2) exited non-zero on &#39;SIP/10-081ad618&#39;
<br>&nbsp;&nbsp;&nbsp; -- Executing DeadAGI(&quot;SIP/10-081ad618&quot;, &quot;manage_automon.agi&quot;) in new stack<br>&nbsp;&nbsp;&nbsp; -- Launched AGI Script /var/lib/asterisk/agi-bin/manage_automon.agi<br>&nbsp;&nbsp;&nbsp; -- AGI Script manage_automon.agi completed, returning 0
<br>Oct 18 00:37:45 DEBUG[32167]: chan_sip.c:2448 sip_hangup: update_call_counter(10) - decrement call limit counter<br>Oct 18 00:37:45 DEBUG[32167]: res_monitor.c:299 ast_monitor_stop: monitor executing ( nice -n 19 soxmix &quot;/var/spool/asterisk/monitor/1192682242.64-
in.wav&quot; &quot;/var/spool/asterisk/monitor/1192682242.64-out.wav&quot; &quot;/var/spool/asterisk/monitor/1192682242.64.wav&quot;&nbsp; &amp;&amp; rm -f &quot;/var/spool/asterisk/monitor/1192682242.64-&quot;* ) &amp;<br><br>
<br>cause the soxmix is done after the DeadAGI, even if i&#39;ve a sleep(15); in my AGI, to leave the time for the soxmix.<br><br>That would be great if all scenarios would do the soxmix before the exten h, since that DeadAGI needs to manipulates the soxmixed file.
<br><br>Why the ast_monitor_stop() occurs so latetly for the inbound call?<br><br>The only hack ive made is do the soxmix in the agi, so i can access the mixed file.<br><br>I can call directly res_monitor_c::ast_monitor_stop() from my agi, when calling StopMonitor() app, correct?
<br>All this sounds like hacks, no?<br><br><br>Comments? Suggestions?<br><br clear="all"><br>-- <br>Clod Patry