I have an app which handles a Mitel&#39;s command port to change the MWI lights.  It detects dial tone, plays some DTMF digits, listens for dialtone-or-busy, does a manager event on what it finds, and returns.<br><br>Since the Mitel command port does not give answer supervision (looks like it&#39;s ringing), and since I run this app via a AMI &quot;originate&quot; command, I set up an extension in extensions.conf thus:<br>
<br>exten =&gt; MWISend,1,Answer(1000)   ; does more-or-less the same thing without the delay<br>exten =&gt; MWISend,2,MWISend(${MWISEND_DIGITS})   ; the variable set in the AMI call - this is tested &amp; works.<br><br>The Originate goes like:<br>
<br>Channel:   Local/MWISend@default<br>Extension:  650nnnnnnn<br>Context:  direct_out   ; a context that dials SIP/${EXTEN}@metaswitch  which is known to work<br>Priority: 1<br><br>What happens is the local channel goes immediately into Hangup with many odd-looking messages about searching for the extension, when it has clearly already been found and goes into a hangup(see trace below).<br>
<br>Anybody have a hint what&#39;s happening here and how to make the application see the voice frames from the dial-out?<br>Thanks.<br><br><br><br>[Oct 30 23:44:45] DEBUG[16246] manager.c: Manager received command &#39;originate&#39;<br>
[Oct 30 23:44:45] DEBUG[16247] pbx.c: Launching &#39;Answer&#39;<br>[Oct 30 23:44:45] DEBUG[16247] devicestate.c: Notification of state change to be queued on device/channel Local/MWISend@default<br>[Oct 30 23:44:45] DEBUG[16150] devicestate.c: No provider found, checking channel drivers for Local - MWISend@default<br>
[Oct 30 23:44:45] DEBUG[16246] devicestate.c: Notification of state change to be queued on device/channel Local/MWISend@default<br>[Oct 30 23:44:45] DEBUG[16150] chan_local.c: Checking if extension MWISend@default exists (devicestate)<br>
[Oct 30 23:44:45] DEBUG[16150] devicestate.c: Changing state for Local/MWISend@default - state 2 (In use)<br>[Oct 30 23:44:45] DEBUG[16176] app_queue.c: Device &#39;Local/MWISend@default&#39; changed to state &#39;2&#39; (In use) but we don&#39;t care because they&#39;re not a member of any queue.<br>
[Oct 30 23:44:45] DEBUG[16150] devicestate.c: No provider found, checking channel drivers for Local - MWISend@default<br>[Oct 30 23:44:45] DEBUG[16150] chan_local.c: Checking if extension MWISend@default exists (devicestate)<br>
[Oct 30 23:44:45] DEBUG[16150] devicestate.c: Changing state for Local/MWISend@default - state 2 (In use)<br>[Oct 30 23:44:45] DEBUG[16176] app_queue.c: Device &#39;Local/MWISend@default&#39; changed to state &#39;2&#39; (In use) but we don&#39;t care because they&#39;re not a member of any queue.<br>
[Oct 30 23:44:45] DEBUG[16248] channel.c: Soft-Hanging up channel &#39;Local/MWISend@default-1b18,1&#39;<br>[Oct 30 23:44:45] DEBUG[16248] channel.c: Hanging up channel &#39;Local/MWISend@default-1b18,1&#39;<br>[Oct 30 23:44:45] DEBUG[16247] pbx.c: Spawn extension (default,MWISend,1) exited non-zero on &#39;Local/MWISend@default-1b18,2&#39;<br>
[Oct 30 23:44:45] DEBUG[16247] channel.c: Soft-Hanging up channel &#39;Local/MWISend@default-1b18,2&#39;<br>[Oct 30 23:44:45] DEBUG[16247] channel.c: Hanging up channel &#39;Local/MWISend@default-1b18,2&#39;<br>[Oct 30 23:44:45] DEBUG[16247] devicestate.c: Notification of state change to be queued on device/channel Local/MWISend@default<br>
[Oct 30 23:44:45] DEBUG[16150] devicestate.c: No provider found, checking channel drivers for Local - MWISend@default<br>[Oct 30 23:44:45] DEBUG[16150] chan_local.c: Checking if extension MWISend@default exists (devicestate)<br>
[Oct 30 23:44:45] DEBUG[16150] devicestate.c: Changing state for Local/MWISend@default - state 2 (In use)<br>[Oct 30 23:44:45] DEBUG[16176] app_queue.c: Device &#39;Local/MWISend@default&#39; changed to state &#39;2&#39; (In use) but we don&#39;t care because they&#39;re not a member of any queue.<br>
[Oct 30 23:44:45] DEBUG[16248] devicestate.c: Notification of state change to be queued on device/channel Local/MWISend@default<br>[Oct 30 23:44:45] DEBUG[16150] devicestate.c: No provider found, checking channel drivers for Local - MWISend@default<br>
[Oct 30 23:44:45] DEBUG[16150] chan_local.c: Checking if extension MWISend@default exists (devicestate)<br>[Oct 30 23:44:45] DEBUG[16150] devicestate.c: Changing state for Local/MWISend@default - state 1 (Not in use)<br>[Oct 30 23:44:45] DEBUG[16176] app_queue.c: Device &#39;Local/MWISend@default&#39; changed to state &#39;1&#39; (Not in use) but we don&#39;t care because they&#39;re not a member of any queue.<br>
--- at this point the AMI application sees the hangup event and terminates ---<br><br>