Block incoming collect calls over ISDN PRI

Hello Asterisk community!

I am trying to block ALL incoming collect calls over my E1/ISDN PRI connected to a TE122P/Zaptel - Asterisk.

Here in Brazil, we cant ask to TELCO do this block in the source (that should be reseonable!), so the block must be do that in the IPBX.

Anyone knows any hardware to block this? Or any patch to LIBPRI ?

Thanks,
Denilson

Hi

Is the callerID flagged as collect ? IE OPERATOR or similar ?

Ian

Hi,

No, unfortunattely. Checking another resourses, I saw that is a signalling in the PRI Channel that is REVERSE CHARGE INDICATION. It means that I will pay.

I tried to find out how can I deny this type of call… maybe in q931.c and recompiling the Libpri, but I didnt have successful.

My Telco cant send me any change in the Caller ID or block them.

Some people sent me suggestions:"

  • Flash: no way for digital channels
  • Unicall: It is an E1/ISDN… Unicall is only for MFCR2, no?

For R2, here in Brazil, there is an equipment that you put in the link before to connect in your Digium. It is an BlockerCollectCall for R2. Is not there for ISDN?

Anyone has any code to Extensions to check this REVERSE CHARGE?

Thanks alot,
Denilson

Hi

OK so pri debug should show this up, if it does I guess its then a case of patching libpri/zaptel to drop the calls.

Ian

Ok, Here we go (I tried to bring you just where the calls are coming, I am sorry if I brought garbages…):

NORMAL INCOMING CALL:

Match Found
Oct 13 14:45:21 VERBOSE[2646] logger.c: < Protocol Discriminator: Q.931 (8) len=37
Oct 13 14:45:21 VERBOSE[2646] logger.c: < Call Ref: len= 2 (reference 5228/0x146C) (Originator)
Oct 13 14:45:21 VERBOSE[2646] logger.c: < Message type: SETUP (5)
Oct 13 14:45:21 VERBOSE[2646] logger.c: < [a1]
Oct 13 14:45:21 VERBOSE[2646] logger.c: < Sending Complete (len= 1)
Oct 13 14:45:21 VERBOSE[2646] logger.c: < [04 03 80 90 a3]
Oct 13 14:45:21 VERBOSE[2646] logger.c: < Bearer Capability (len= 5) [ Ext: 1 Q.931 Std: 0 Info transfer capability: Speech (0)
Oct 13 14:45:21 VERBOSE[2646] logger.c: < Ext: 1 Trans mode/rate: 64kbps, circuit-mode (16)
Oct 13 14:45:21 VERBOSE[2646] logger.c: < Ext: 1 User information layer 1: A-Law (35)
Oct 13 14:45:21 VERBOSE[2646] logger.c: < [18 03 a1 83 92]
Oct 13 14:45:21 VERBOSE[2646] logger.c: < Channel ID (len= 5) [ Ext: 1 IntID: Implicit, PRI Spare: 0, Preferred Dchan: 0
Oct 13 14:45:21 VERBOSE[2646] logger.c: < ChanSel: Reserved
Oct 13 14:45:21 VERBOSE[2646] logger.c: < Ext: 1 Coding: 0 Number Specified Channel Type: 3
Oct 13 14:45:21 VERBOSE[2646] logger.c: < Ext: 1 Channel: 18 ]
Oct 13 14:45:21 VERBOSE[2646] logger.c: < [6c 0c 21 83 31 31 38 32 30 38 30 31 30 30]
Oct 13 14:45:21 VERBOSE[2646] logger.c: < Calling Number (len=14) [ Ext: 0 TON: National Number (2) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)
Oct 13 14:45:21 VERBOSE[2646] logger.c: < Presentation: Presentation allowed of network provided number (3) ‘1182080100’ ]
Oct 13 14:45:21 VERBOSE[2646] logger.c: < [70 05 c1 36 35 32 35]
Oct 13 14:45:21 VERBOSE[2646] logger.c: < Called Number (len= 7) [ Ext: 1 TON: Subscriber Number (4) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1) ‘6525’ ]
Oct 13 14:45:21 VERBOSE[2646] logger.c: – Making new call for cr 5228
Oct 13 14:45:21 VERBOSE[2646] logger.c: – Processing Q.931 Call Setup
Oct 13 14:45:21 VERBOSE[2646] logger.c: – Processing IE 161 (cs0, Sending Complete)
Oct 13 14:45:21 VERBOSE[2646] logger.c: – Processing IE 4 (cs0, Bearer Capability)
Oct 13 14:45:21 VERBOSE[2646] logger.c: – Processing IE 24 (cs0, Channel Identification)
Oct 13 14:45:21 VERBOSE[2646] logger.c: – Processing IE 108 (cs0, Calling Party Number)
Oct 13 14:45:21 VERBOSE[2646] logger.c: – Processing IE 112 (cs0, Called Party Number)
Oct 13 14:45:21 VERBOSE[2646] logger.c: > Protocol Discriminator: Q.931 (8) len=10
Oct 13 14:45:21 VERBOSE[2646] logger.c: > Call Ref: len= 2 (reference 5228/0x146C) (Terminator)
Oct 13 14:45:21 VERBOSE[2646] logger.c: > Message type: CALL PROCEEDING (2)
Oct 13 14:45:21 VERBOSE[2646] logger.c: > [18 03 a9 83 92]
Oct 13 14:45:21 VERBOSE[2646] logger.c: > Channel ID (len= 5) [ Ext: 1 IntID: Implicit, PRI Spare: 0, Exclusive Dchan: 0
Oct 13 14:45:21 VERBOSE[2646] logger.c: > ChanSel: Reserved

INCOMING COLLECT CALL (Reversed charge indication)

Oct 13 14:45:49 VERBOSE[2646] logger.c: < Protocol Discriminator: Q.931 (8) len=40
Oct 13 14:45:49 VERBOSE[2646] logger.c: < Call Ref: len= 2 (reference 5240/0x1478) (Originator)
Oct 13 14:45:49 VERBOSE[2646] logger.c: < Message type: SETUP (5)
Oct 13 14:45:49 VERBOSE[2646] logger.c: < [a1]
Oct 13 14:45:49 VERBOSE[2646] logger.c: < Sending Complete (len= 1)
Oct 13 14:45:49 VERBOSE[2646] logger.c: < [04 03 80 90 a3]
Oct 13 14:45:49 VERBOSE[2646] logger.c: < Bearer Capability (len= 5) [ Ext: 1 Q.931 Std: 0 Info transfer capability: Speech (0)
Oct 13 14:45:49 VERBOSE[2646] logger.c: < Ext: 1 Trans mode/rate: 64kbps, circuit-mode (16)
Oct 13 14:45:49 VERBOSE[2646] logger.c: < Ext: 1 User information layer 1: A-Law (35)
Oct 13 14:45:49 VERBOSE[2646] logger.c: < [18 03 a1 83 93]
Oct 13 14:45:49 VERBOSE[2646] logger.c: < Channel ID (len= 5) [ Ext: 1 IntID: Implicit, PRI Spare: 0, Preferred Dchan: 0
Oct 13 14:45:49 VERBOSE[2646] logger.c: < ChanSel: Reserved
Oct 13 14:45:49 VERBOSE[2646] logger.c: < Ext: 1 Coding: 0 Number Specified Channel Type: 3
Oct 13 14:45:49 VERBOSE[2646] logger.c: < Ext: 1 Channel: 19 ]
Oct 13 14:45:49 VERBOSE[2646] logger.c: < [4a 01 81]
Oct 13 14:45:49 VERBOSE[2646] logger.c: < IE: Reverse Charging Indication (len = 3)
Oct 13 14:45:49 VERBOSE[2646] logger.c: < [6c 0c 21 83 31 31 38 32 30 38 30 31 30 30]
Oct 13 14:45:49 VERBOSE[2646] logger.c: < Calling Number (len=14) [ Ext: 0 TON: National Number (2) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)
Oct 13 14:45:49 VERBOSE[2646] logger.c: < Presentation: Presentation allowed of network provided number (3) ‘1182080100’ ]
Oct 13 14:45:49 VERBOSE[2646] logger.c: < [70 05 c1 36 35 32 35]
Oct 13 14:45:49 VERBOSE[2646] logger.c: < Called Number (len= 7) [ Ext: 1 TON: Subscriber Number (4) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1) ‘6525’ ]
Oct 13 14:45:49 VERBOSE[2646] logger.c: – Making new call for cr 5240
Oct 13 14:45:49 VERBOSE[2646] logger.c: – Processing Q.931 Call Setup
Oct 13 14:45:49 VERBOSE[2646] logger.c: – Processing IE 161 (cs0, Sending Complete)
Oct 13 14:45:49 VERBOSE[2646] logger.c: – Processing IE 4 (cs0, Bearer Capability)
Oct 13 14:45:49 VERBOSE[2646] logger.c: – Processing IE 24 (cs0, Channel Identification)
Oct 13 14:45:49 VERBOSE[2646] logger.c: – Processing IE 74 (cs0, Reverse Charging Indication)
Oct 13 14:45:49 VERBOSE[2646] logger.c: – Processing IE 108 (cs0, Calling Party Number)
Oct 13 14:45:49 VERBOSE[2646] logger.c: – Processing IE 112 (cs0, Called Party Number)
Oct 13 14:45:49 VERBOSE[2646] logger.c: > Protocol Discriminator: Q.931 (8) len=10
Oct 13 14:45:49 VERBOSE[2646] logger.c: > Call Ref: len= 2 (reference 5240/0x1478) (Terminator)
Oct 13 14:45:49 VERBOSE[2646] logger.c: > Message type: CALL PROCEEDING (2)
Oct 13 14:45:49 VERBOSE[2646] logger.c: > [18 03 a9 83 93]
Oct 13 14:45:49 VERBOSE[2646] logger.c: > Channel ID (len= 5) [ Ext: 1 IntID: Implicit, PRI Spare: 0, Exclusive Dchan: 0
Oct 13 14:45:49 VERBOSE[2646] logger.c: > ChanSel: Reserved
Oct 13 14:45:49 VERBOSE[2646] logger.c: > Ext: 1 Coding: 0 Number Specified Channel Type: 3
Oct 13 14:45:49 VERBOSE[2646] logger.c: > Ext: 1 Channel: 19 ]
Oct 13 14:45:49 VERBOSE[2646] logger.c: – Accepting call from ‘1182080100’ to ‘6525’ on channel 0/19, span 1
Oct 13 14:45:49 DEBUG[2646] chan_zap.c: Enabled echo cancellation on channel 19
Oct 13 14:45:49 VERBOSE[16322] logger.c: – Executing Set(“Zap/19-1”, “__FROM_DID=6525”) in new stack
Oct 13 14:45:49 VERBOSE[16322] logger.c: – Executing Gosub(“Zap/19-1”, “app-blacklist-check|s|1”) in new stack
Oct 13 14:45:49 VERBOSE[16322] logger.c: – Executing LookupBlacklist(“Zap/19-1”, “”) in new stack

Thanks,
Denilson