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=>_X.,1,Gotoif([${CHANNEL(reversecharge)} = -1] ?entrada,${EXTEN},1:hangup,${EXTEN},1)</div>
<div>+++++++++++++++++++</div><div><br></div><div><div>rs0000sr305*CLI> -- Accepting call from '5132083300' to '1584' on channel 0/18, span 1</div><div> -- Accepting call from '5132083300' to '1584' on channel 0/18, span 1</div>
<div>rs0000sr305*CLI> -- Executing [1584@PABX:1] GotoIf("DAHDI/i1/5132083300-4", "[-1 = -1] ?entrada,1584,1:hangup,1584,1") in new stack</div><div> -- Goto (entrada,1584,1)</div><div> -- Executing [1584@PABX:1] <b>GotoIf("DAHDI/i1/5132083300-4", "[-1 = -1] ?entrada,1584,1:hangup,1584,1"</b>) in new stack</div>
<div> -- Executing [1584@entrada:1] Answer("DAHDI/i1/5132083300-4", "") in new stack</div><div> -- Goto (entrada,1584,1)</div><div> -- Executing [1584@entrada:1] Answer("DAHDI/i1/5132083300-4", "") in new stack</div>
<div>rs0000sr305*CLI> -- Executing [1584@entrada:2] Dial("DAHDI/i1/5132083300-4", "SIP/1584,30,tT") in new stack</div><div> -- Executing [1584@entrada:2] Dial("DAHDI/i1/5132083300-4", "SIP/1584,30,tT") in new stack</div>
<div>rs0000sr305*CLI> == Using SIP RTP CoS mark 5</div><div> == Using SIP RTP CoS mark 5</div><div>rs0000sr305*CLI> -- Called SIP/1584</div><div> -- Called SIP/1584</div><div>rs0000sr305*CLI> -- SIP/1584-0000001e is ringing</div>
<div> -- SIP/1584-0000001e is ringing</div><div>rs0000sr305*CLI> -- SIP/1584-0000001e answered DAHDI/i1/5132083300-4</div><div> -- SIP/1584-0000001e answered DAHDI/i1/5132083300-4</div><div>rs0000sr305*CLI> -- 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> == Spawn extension (entrada, 1584, 2) exited non-zero on 'DAHDI/i1/5132083300-4'</div><div> == Spawn extension (entrada, 1584, 2) exited non-zero on 'DAHDI/i1/5132083300-4'</div>
<div>rs0000sr305*CLI> -- Hungup 'DAHDI/i1/5132083300-4'</div><div> -- Hungup 'DAHDI/i1/5132083300-4'</div><div>rs0000sr305*CLI> </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"><<a href="mailto:danny@debsinc.com">danny@debsinc.com</a>></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:"Calibri","sans-serif";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:"Calibri","sans-serif";color:#1f497d"><span>-<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Same => n,Verbose(RC value ${CHANNEL(reversecharge)})<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <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 <<a href="mailto:danny@debsinc.com" target="_blank">danny@debsinc.com</a>><u></u><u></u></p><div><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";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:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <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:"Arial","sans-serif";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 => _x.,1,Proceeding()<u></u><u></u></p></div><div><p class="MsoNormal">same => n,GotoIf($["${CHANNEL(reversecharge)}" ="-1"]?allow:block)<u></u><u></u></p>
</div><div><p class="MsoNormal">same => n(allow),Dial(SIP/1584,30,tT))<u></u><u></u></p></div><div><p class="MsoNormal">same => 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 <<a href="mailto:rmudgett@digium.com" target="_blank">rmudgett@digium.com</a>><u></u><u></u></p>
<p class="MsoNormal">> > How to block collect calls on ISDN trunk?<br>><br>> You need Asterisk v1.8 or later and check the value of<br>> CHANNEL(reversecharge) in your dialplan.<br>><br>> <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>> Can you give me an example of how to use this function?<br><br>exten => 100,1,Proceeding()<br>same => n,GotoIf($["${CHANNEL(reversecharge)}" = "-1"]?allow:block)<br>same => n(allow),Dial()<br>
same => 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>