>From what I read, your libpri may be out of date.
From: [email protected] [mailto:[email protected]] On Behalf Of Rafael dos Santos Saraiva Sent: Friday, February 17, 2012 11:21 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Block Collect Calls on ISDN trunk The value is always -1. I must enable something in chan_dahdi to pass the correct value? ++++++ [PABX] exten=>_X.,1,Gotoif([${CHANNEL(reversecharge)} = -1] ?entrada,${EXTEN},1:hangup,${EXTEN},1) +++++++++++++++++++ rs0000sr305*CLI> -- Accepting call from '5132083300' to '1584' on channel 0/18, span 1 -- Accepting call from '5132083300' to '1584' on channel 0/18, span 1 rs0000sr305*CLI> -- Executing [1584@PABX:1] GotoIf("DAHDI/i1/5132083300-4", "[-1 = -1] ?entrada,1584,1:hangup,1584,1") in new stack -- Goto (entrada,1584,1) -- Executing [1584@PABX:1] GotoIf("DAHDI/i1/5132083300-4", "[-1 = -1] ?entrada,1584,1:hangup,1584,1") in new stack -- Executing [1584@entrada:1] Answer("DAHDI/i1/5132083300-4", "") in new stack -- Goto (entrada,1584,1) -- Executing [1584@entrada:1] Answer("DAHDI/i1/5132083300-4", "") in new stack rs0000sr305*CLI> -- Executing [1584@entrada:2] Dial("DAHDI/i1/5132083300-4", "SIP/1584,30,tT") in new stack -- Executing [1584@entrada:2] Dial("DAHDI/i1/5132083300-4", "SIP/1584,30,tT") in new stack rs0000sr305*CLI> == Using SIP RTP CoS mark 5 == Using SIP RTP CoS mark 5 rs0000sr305*CLI> -- Called SIP/1584 -- Called SIP/1584 rs0000sr305*CLI> -- SIP/1584-0000001e is ringing -- SIP/1584-0000001e is ringing rs0000sr305*CLI> -- SIP/1584-0000001e answered DAHDI/i1/5132083300-4 -- SIP/1584-0000001e answered DAHDI/i1/5132083300-4 rs0000sr305*CLI> -- Span 1: Channel 0/18 got hangup request, cause 0 -- Span 1: Channel 0/18 got hangup request, cause 0 rs0000sr305*CLI> == Spawn extension (entrada, 1584, 2) exited non-zero on 'DAHDI/i1/5132083300-4' == Spawn extension (entrada, 1584, 2) exited non-zero on 'DAHDI/i1/5132083300-4' rs0000sr305*CLI> -- Hungup 'DAHDI/i1/5132083300-4' -- Hungup 'DAHDI/i1/5132083300-4' rs0000sr305*CLI> Att, Rafael Saraiva 2012/2/17 Danny Nicholas <[email protected]> I would put a Verbose statement after Proceeding to verify the value returned from ISDN channel, like this: - Same => n,Verbose(RC value ${CHANNEL(reversecharge)}) From: [email protected] [mailto:[email protected]] On Behalf Of Rafael dos Santos Saraiva Sent: Friday, February 17, 2012 11:07 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Block Collect Calls on ISDN trunk This is a variable received from the isdn channel. Att, Rafael Saraiva 2012/2/17 Danny Nicholas <[email protected]> Did you set CHANNEL(reversecharge) somewhere? From: [email protected] [mailto:[email protected]] On Behalf Of Rafael dos Santos Saraiva Sent: Friday, February 17, 2012 10:26 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Block Collect Calls on ISDN trunk Richard I tried this, but it did not work. What can be the problem? [PABX] exten => _x.,1,Proceeding() same => n,GotoIf($["${CHANNEL(reversecharge)}" ="-1"]?allow:block) same => n(allow),Dial(SIP/1584,30,tT)) same => n(block),Hangup() Att, Rafael Saraiva 2012/2/15 Richard Mudgett <[email protected]> > > How to block collect calls on ISDN trunk? > > You need Asterisk v1.8 or later and check the value of > CHANNEL(reversecharge) in your dialplan. > > https://wiki.asterisk.org/wiki/display/AST/Function_CHANNEL > Can you give me an example of how to use this function? exten => 100,1,Proceeding() same => n,GotoIf($["${CHANNEL(reversecharge)}" = "-1"]?allow:block) same => n(allow),Dial() same => n(block),Hangup() Please note that CHANNEL(reversecharge) is only valid on ISDN channels. Richard -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
