On 5/11/07, <b class="gmail_sendername">Morgan Gilroy</b> &lt;<a href="mailto:morgan@telappliant.com">morgan@telappliant.com</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
At the moment to find the codecs used I have to look though the sip<br>trace or show channels/show channel (annoying when you have 50+<br>channels).<br>Im just trying to find an easier and quicker way to keep track of the
<br>codecs used to help with debug etc.<br><br>The closest variable iv found is, &quot;${SIP_CODEC} Set the SIP codec for a<br>call&quot;<br>Ill see if NoOp (${SIP_CODEC}) shows the codec that was used without me<br>setting it though I don&#39;t think it will.
<br><br>Iv looked all over and I cant find anything so it looks like I may have<br>to hack a ast_set_var into app_dial or chan_sip</blockquote><div><br><br>1.4 has the CHANNEL function:<br><br>pbxlab-01*CLI&gt; show function CHANNEL
<br>pbxlab-01*CLI&gt;<br>&nbsp; -= Info about function &#39;CHANNEL&#39; =-<br><br>[Syntax]<br>CHANNEL(item)<br><br>[Synopsis]<br>Gets/sets various pieces of information about the channel.<br><br>[Description]<br>Gets/set various pieces of information about the channel.
<br>Standard items (provided by all channel technologies) are:<br>R/O&nbsp;&nbsp;&nbsp;&nbsp; audioreadformat&nbsp;&nbsp;&nbsp; format currently being read<br>R/O&nbsp;&nbsp;&nbsp;&nbsp; audionativeformat&nbsp; format used natively for audio<br>R/O&nbsp;&nbsp;&nbsp;&nbsp; audiowriteformat&nbsp;&nbsp; format currently being written
<br>R/W&nbsp;&nbsp;&nbsp;&nbsp; callgroup&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; call groups for call pickup<br>R/O&nbsp;&nbsp;&nbsp;&nbsp; channeltype&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; technology used for channel<br>R/W&nbsp;&nbsp;&nbsp;&nbsp; language&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; language for sounds played<br>R/W&nbsp;&nbsp;&nbsp;&nbsp; musicclass&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class (from musiconhold.conf
) for hold music<br>R/W&nbsp;&nbsp;&nbsp;&nbsp; rxgain&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set rxgain level on channel drivers that support it<br>R/O&nbsp;&nbsp;&nbsp;&nbsp; state&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; state for channel<br>R/W&nbsp;&nbsp;&nbsp;&nbsp; tonezone&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; zone for indications played<br>R/W&nbsp;&nbsp;&nbsp;&nbsp; txgain&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set txgain level on channel drivers that support it
<br>R/O&nbsp;&nbsp;&nbsp;&nbsp; videonativeformat&nbsp; format used natively for video<br><br>When I put this in a dialplan with NoOps and called channel macros, I can kind of get what you&#39;re describing:<br><br>[from-external-pbxtel]<br>exten&nbsp;&nbsp; =&gt; 491,1,NoOp(${CHANNEL(audioreadformat)})
<br>exten&nbsp;&nbsp; =&gt; 491,n,NoOp(${CHANNEL(audiowriteformat)})<br>exten&nbsp;&nbsp; =&gt; 491,n,NoOp(${CHANNEL(audionativeformat)})<br>exten&nbsp;&nbsp; =&gt; 491,n,Dial(SIP/491,20,M(logcodec))<br>exten&nbsp;&nbsp; =&gt; 491,n,Hangup<br><br>[macro-logcodec]
<br>exten =&gt; s,1,NoOp(${CHANNEL(audioreadformat)})<br>exten =&gt; s,n,NoOp(${CHANNEL(audiowriteformat)})<br>exten =&gt; s,n,NoOp(${CHANNEL(audionativeformat)})<br><br></div></div>Console output is:<br><br>&nbsp;&nbsp;&nbsp; -- Executing [
491@from-external-pbxtel:1] NoOp(&quot;IAX2/pbxtel-01-5&quot;, &quot;ulaw&quot;) in new stack<br>&nbsp;&nbsp;&nbsp; -- Executing [491@from-external-pbxtel:2] NoOp(&quot;IAX2/pbxtel-01-5&quot;, &quot;ulaw&quot;) in new stack<br>&nbsp;&nbsp;&nbsp; -- Executing [
491@from-external-pbxtel:3] NoOp(&quot;IAX2/pbxtel-01-5&quot;, &quot;ulaw&quot;) in new stack<br>&nbsp;&nbsp;&nbsp; -- Executing [491@from-external-pbxtel:4] Dial(&quot;IAX2/pbxtel-01-5&quot;, &quot;SIP/491|20|M(logcodec)&quot;) in new stack
<br>&nbsp;&nbsp;&nbsp; -- Called 491<br>&nbsp;&nbsp;&nbsp; -- SIP/491-0a16d1c0 is ringing<br>&nbsp;&nbsp;&nbsp; -- SIP/491-0a16d1c0 answered IAX2/pbxtel-01-5<br>&nbsp;&nbsp;&nbsp; -- Executing [s@macro-logcodec:1] NoOp(&quot;SIP/491-0a16d1c0&quot;, &quot;slin&quot;) in new stack<br>
&nbsp;&nbsp;&nbsp; -- Executing [s@macro-logcodec:2] NoOp(&quot;SIP/491-0a16d1c0&quot;, &quot;slin&quot;) in new stack<br>&nbsp;&nbsp;&nbsp; -- Executing [s@macro-logcodec:3] NoOp(&quot;SIP/491-0a16d1c0&quot;, &quot;gsm&quot;) in new stack<br>&nbsp; == Spawn extension (from-external-pbxtel, 491, 4) exited non-zero on &#39;IAX2/pbxtel-01-5&#39;
<br>&nbsp;&nbsp;&nbsp; -- Hungup &#39;IAX2/pbxtel-01-5&#39;<br><br>This is a call coming in as ulaw over IAX2, then going to a SIP softphone configured for only gsm.<br><br>Hope that helps.<br><br>-- <br>j.