Please post this to the bug tracker at <a href="http://bugs.digium.com">bugs.digium.com</a> for further consideration. <br><br>
<div><span class="gmail_quote">On 11/2/05, <b class="gmail_sendername">Chih-Wei Huang</b> <<a href="mailto:cwhuang@citron.com.tw">cwhuang@citron.com.tw</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">I'm so SORRY that I forgot to change the subject of my previous email.<br><br>Chih-Wei Huang wrote:<br>> I'm trying the new application MixMonitor in
1.2-beta2.<br>> Unfortunately, it didn't work as I expected.<br>><br>> My dialplan is like this:<br>><br>> [macro-checkrec]<br>> ;<br>> ; ${ARG1} - Caller<br>> ; ${ARG2} - Callee<br>> ;<br>> exten => s,1,Set(RECFILE=${ARG1}-${ARG2}_${UNIQUEID})
<br>> exten => s,2,MixMonitor(${RECFILE},b)<br>><br>><br>> The console shown the following error messages:<br>><br>> Nov 2 16:26:36 WARNING[22223]: file.c:978 ast_writefile: No such format<br>> '1'
<br>> Nov 2 16:26:36 ERROR[22223]: app_mixmonitor.c:163 mixmonitor_thread:<br>> Cannot open /var/spool/asterisk/monitor/900-995_1130919996.1<br>><br>><br>> I traced app_mixmonitor.c and found the reason.<br>
> In mixmonitor_thread,<br>><br>> if ((ext = strchr(mixmonitor->filename, '.'))) {<br>> *(ext++) = '\0';<br>><br>> that is, it consider the string after . of filename<br>> to be an ext. In my above case, it is "1", which won't work surely.
<br>> However, it's not my intention to use "xxxx.1" as the filename.<br>> It comes from ${UNIQUEID}, which is generated from Asterisk.<br>> Sadly...<br>><br>> My suggestion:<br>><br>> * Find the last occurrence of '.' in filename instead of the first one.
<br>> That is, simply replace strchr by strrchr.<br>> Then I can workaround by MixMonitor(${RECFILE}.wav,b)<br>> This is the simplest solution, but it doesn't work if people<br>> use a filename containing '.' without specifying an ext explicitly
<br>> (like my original dialplan)<br>><br>> * (Better solution) Let people specify the ext by another argument,<br>> instead of part of the first argument(filename).<br>> That is, change the syntax to<br>>
<br>> MixMonitor(<file>[|<ext>[|<options>[|<command>]]])<br>><br>> Since MixMonitor is a very new application, it won't affect too many<br>> people. I hope.<br>><br>><br>> BTW, I'm curious why ${UNIQUEID} contains a dot.
<br>> It usually causes troubles. Doesn't it?<br>> How about change it to _ (underline)?<br>_______________________________________________<br>Asterisk-Dev mailing list<br><a href="mailto:Asterisk-Dev@lists.digium.com">
Asterisk-Dev@lists.digium.com</a><br><a href="http://lists.digium.com/mailman/listinfo/asterisk-dev">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br>To UNSUBSCRIBE or update options visit:<br> <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev">
http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br></blockquote></div><br>