The value is always -1. I must enable something in chan_dahdi to pass the correct value?<div><br></div><div>++++++</div><div><div>[PABX]</div><div>exten=&gt;_X.,1,Gotoif([${CHANNEL(reversecharge)} = -1] ?entrada,${EXTEN},1:hangup,${EXTEN},1)</div>
<div>+++++++++++++++++++</div><div><br></div><div><div>rs0000sr305*CLI&gt;     -- Accepting call from &#39;5132083300&#39; to &#39;1584&#39; on channel 0/18, span 1</div><div>    -- Accepting call from &#39;5132083300&#39; to &#39;1584&#39; on channel 0/18, span 1</div>
<div>rs0000sr305*CLI&gt;     -- Executing [1584@PABX:1] GotoIf(&quot;DAHDI/i1/5132083300-4&quot;, &quot;[-1 = -1] ?entrada,1584,1:hangup,1584,1&quot;) in new stack</div><div>    -- Goto (entrada,1584,1)</div><div>    -- Executing [1584@PABX:1] <b>GotoIf(&quot;DAHDI/i1/5132083300-4&quot;, &quot;[-1 = -1] ?entrada,1584,1:hangup,1584,1&quot;</b>) in new stack</div>
<div>    -- Executing [1584@entrada:1] Answer(&quot;DAHDI/i1/5132083300-4&quot;, &quot;&quot;) in new stack</div><div>    -- Goto (entrada,1584,1)</div><div>    -- Executing [1584@entrada:1] Answer(&quot;DAHDI/i1/5132083300-4&quot;, &quot;&quot;) in new stack</div>
<div>rs0000sr305*CLI&gt;     -- Executing [1584@entrada:2] Dial(&quot;DAHDI/i1/5132083300-4&quot;, &quot;SIP/1584,30,tT&quot;) in new stack</div><div>    -- Executing [1584@entrada:2] Dial(&quot;DAHDI/i1/5132083300-4&quot;, &quot;SIP/1584,30,tT&quot;) in new stack</div>
<div>rs0000sr305*CLI&gt;   == Using SIP RTP CoS mark 5</div><div>  == Using SIP RTP CoS mark 5</div><div>rs0000sr305*CLI&gt;     -- Called SIP/1584</div><div>    -- Called SIP/1584</div><div>rs0000sr305*CLI&gt;     -- SIP/1584-0000001e is ringing</div>
<div>    -- SIP/1584-0000001e is ringing</div><div>rs0000sr305*CLI&gt;     -- SIP/1584-0000001e answered DAHDI/i1/5132083300-4</div><div>    -- SIP/1584-0000001e answered DAHDI/i1/5132083300-4</div><div>rs0000sr305*CLI&gt;     -- Span 1: Channel 0/18 got hangup request, cause 0</div>
<div>    -- Span 1: Channel 0/18 got hangup request, cause 0</div><div>rs0000sr305*CLI&gt;   == Spawn extension (entrada, 1584, 2) exited non-zero on &#39;DAHDI/i1/5132083300-4&#39;</div><div>  == Spawn extension (entrada, 1584, 2) exited non-zero on &#39;DAHDI/i1/5132083300-4&#39;</div>
<div>rs0000sr305*CLI&gt;     -- Hungup &#39;DAHDI/i1/5132083300-4&#39;</div><div>    -- Hungup &#39;DAHDI/i1/5132083300-4&#39;</div><div>rs0000sr305*CLI&gt; </div><div><br></div>Att,<br>Rafael Saraiva<br><br><br>
<br><br><div class="gmail_quote">2012/2/17 Danny Nicholas <span dir="ltr">&lt;<a href="mailto:danny@debsinc.com">danny@debsinc.com</a>&gt;</span><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">I would put a Verbose statement after Proceeding to verify the value returned from ISDN channel, like this:<u></u><u></u></span></p>
<p><u></u><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><span>-<span style="font:7.0pt &quot;Times New Roman&quot;">          </span></span></span><u></u><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Same =&gt; n,Verbose(RC value ${CHANNEL(reversecharge)})<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>Rafael dos Santos Saraiva<br>
<b>Sent:</b> Friday, February 17, 2012 11:07 AM<br><b>To:</b> Asterisk Users Mailing List - Non-Commercial Discussion<br><b>Subject:</b> Re: [asterisk-users] Block Collect Calls on ISDN trunk<u></u><u></u></span></p><p class="MsoNormal">
<u></u> <u></u></p><p class="MsoNormal">This is a variable received from the isdn channel. <u></u><u></u></p><div><p class="MsoNormal" style="margin-bottom:12.0pt"><br clear="all">Att,<br>Rafael Saraiva<br><br><br><br><u></u><u></u></p>
<div><p class="MsoNormal">2012/2/17 Danny Nicholas &lt;<a href="mailto:danny@debsinc.com" target="_blank">danny@debsinc.com</a>&gt;<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">Did you set CHANNEL(reversecharge) somewhere?</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>Rafael dos Santos Saraiva<br>
<b>Sent:</b> Friday, February 17, 2012 10:26 AM<br><b>To:</b> Asterisk Users Mailing List - Non-Commercial Discussion<br><b>Subject:</b> Re: [asterisk-users] Block Collect Calls on ISDN trunk</span><u></u><u></u></p><p class="MsoNormal">
 <u></u><u></u></p><p class="MsoNormal">Richard<u></u><u></u></p><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal"><span style="font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;background:white">I tried this, but it did not work. What can be the problem?</span><span style="background:white"> </span><br clear="all">
<u></u><u></u></p><div><p class="MsoNormal">[PABX]<u></u><u></u></p></div><div><p class="MsoNormal">exten =&gt; _x.,1,Proceeding()<u></u><u></u></p></div><div><p class="MsoNormal">same =&gt; n,GotoIf($[&quot;${CHANNEL(reversecharge)}&quot; =&quot;-1&quot;]?allow:block)<u></u><u></u></p>
</div><div><p class="MsoNormal">same =&gt; n(allow),Dial(SIP/1584,30,tT))<u></u><u></u></p></div><div><p class="MsoNormal">same =&gt; n(block),Hangup()<u></u><u></u></p></div></div><div><p class="MsoNormal"> <u></u><u></u></p>
</div><div><p class="MsoNormal" style="margin-bottom:12.0pt">Att,<br>Rafael Saraiva<br><br><br><u></u><u></u></p><div><p class="MsoNormal">2012/2/15 Richard Mudgett &lt;<a href="mailto:rmudgett@digium.com" target="_blank">rmudgett@digium.com</a>&gt;<u></u><u></u></p>
<p class="MsoNormal">&gt; &gt; How to block collect calls on ISDN trunk?<br>&gt;<br>&gt; You need Asterisk v1.8 or later and check the value of<br>&gt; CHANNEL(reversecharge) in your dialplan.<br>&gt;<br>&gt; <a href="https://wiki.asterisk.org/wiki/display/AST/Function_CHANNEL" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Function_CHANNEL</a><br>
<br>&gt; Can you give me an example of how to use this function?<br><br>exten =&gt; 100,1,Proceeding()<br>same =&gt; n,GotoIf($[&quot;${CHANNEL(reversecharge)}&quot; = &quot;-1&quot;]?allow:block)<br>same =&gt; n(allow),Dial()<br>
same =&gt; n(block),Hangup()<br><br>Please note that CHANNEL(reversecharge) is only valid on ISDN channels.<br><br>Richard<br><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>
<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>
<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>