CALLERPRES()=prohib_passed_screen not honoured over ISDN

Hi,
I am currently setting up a AsterisNOW installation and trying to set “Presentation Restricted” over Q931 on outbound calls from SIP => Asterisk => ISDN (dandi)

I’ve figured out the Outbound CID needs to have “hidden” within the name field which is caught by:

[macro-outbound-callerid]
exten => s,n(hidecid),ExecIf($[“${CALLERID(name)}”=“hidden”]?Set(CALLERPRES()=prohib_passed_screen))

From the logs this is being caught and set, but the outbound call still sets : Presentation permitted, user number passed network screening when the ISDN passover is made.

I figure the important parts of the log below are:

Executing [s@macro-outbound-callerid:15] ExecIf(“SIP/100-000000a0”, “1?Set(CALLERPRES()=prohib_passed_screen)”) in new stack
Presentation: Presentation permitted, user number passed network screening (1) ‘0800’ ]

I have tried setting “hidden” within the trunk CID but can’t seem to block outbound CID - passing individual extension CID’s all works fine and presented correctly, so I have full control except on withholding the CID. My provider states they they will honour Presentation Restricted over Q931. So its appear that CALLERPRES()=prohib_passed_screen is getting cleared when passed through over Q931…

What am I missing?

[Nov 19 12:58:29] VERBOSE[20598] pbx.c: – Goto (macro-outbound-callerid,s,12)
[color=#FF0000][Nov 19 12:58:29] VERBOSE[20598] pbx.c: – Executing [s@macro-outbound-callerid:12] ExecIf(“SIP/100-000000a0”, “1?Set(CALLERID(all)=hidden <0800>)”) in new stack[/color]
[Nov 19 12:58:29] VERBOSE[20598] pbx.c: – Executing [s@macro-outbound-callerid:13] ExecIf(“SIP/100-000000a0”, “1?Set(CALLERID(all)=hidden <0800>)”) in new stack
[Nov 19 12:58:29] VERBOSE[20598] pbx.c: – Executing [s@macro-outbound-callerid:14] ExecIf(“SIP/100-000000a0”, “0?Set(CALLERID(all)=)”) in new stack
[color=#FF0000][Nov 19 12:58:29] VERBOSE[20598] pbx.c: – Executing [s@macro-outbound-callerid:15] ExecIf(“SIP/100-000000a0”, “1?Set(CALLERPRES()=prohib_passed_screen)”) in new stack[/color]
[Nov 19 12:58:29] VERBOSE[20598] pbx.c: – Executing [s@macro-dialout-trunk:12] ExecIf(“SIP/100-000000a0”, “0?AGI(fixlocalprefix)”) in new stack
[Nov 19 12:58:29] VERBOSE[20598] pbx.c: – Executing [s@macro-dialout-trunk:13] Set(“SIP/100-000000a0”, “OUTNUM=XXXXXX”) in new stack
[Nov 19 12:58:29] VERBOSE[20598] pbx.c: – Executing [s@macro-dialout-trunk:14] Set(“SIP/100-000000a0”, “custom=DAHDI/g0”) in new stack
[Nov 19 12:58:29] VERBOSE[20598] pbx.c: – Executing [s@macro-dialout-trunk:15] ExecIf(“SIP/100-000000a0”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^))”) in new stack
[Nov 19 12:58:29] VERBOSE[20598] pbx.c: – Executing [s@macro-dialout-trunk:16] Macro(“SIP/100-000000a0”, “dialout-trunk-predial-hook,”) in new stack
[Nov 19 12:58:29] VERBOSE[20598] pbx.c: – Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“SIP/100-000000a0”, “”) in new stack
[Nov 19 12:58:29] VERBOSE[20598] pbx.c: – Executing [s@macro-dialout-trunk:17] GotoIf(“SIP/100-000000a0”, “0?bypass,1”) in new stack
[Nov 19 12:58:29] VERBOSE[20598] pbx.c: – Executing [s@macro-dialout-trunk:18] GotoIf(“SIP/100-000000a0”, “0?customtrunk”) in new stack
[Nov 19 12:58:29] VERBOSE[20598] pbx.c: – Executing [s@macro-dialout-trunk:19] Dial(“SIP/100-000000a0”, “DAHDI/g0/XXXXXX,300,”) in new stack
[Nov 19 12:58:29] VERBOSE[20598] chan_dahdi.c: – Making new call for cref 32840
[Nov 19 12:58:29] VERBOSE[20598] chan_dahdi.c: – Requested transfer capability: 0x00 - SPEECH
[Nov 19 12:58:29] VERBOSE[20598] chan_dahdi.c:
[Nov 19 12:58:29] VERBOSE[20598] chan_dahdi.c: > DL-DATA request
[Nov 19 12:58:29] VERBOSE[20598] chan_dahdi.c: > Protocol Discriminator: Q.931 (8) len=50
[Nov 19 12:58:29] VERBOSE[20598] chan_dahdi.c: > TEI=0 Call Ref: len= 2 (reference 72/0x48) (Sent from originator)
[Nov 19 12:58:29] VERBOSE[20598] chan_dahdi.c: > Message Type: SETUP (5)
[Nov 19 12:58:29] VERBOSE[20598] chan_dahdi.c: TEI=0 Transmitting N(S)=71, window is open V(A)=71 K=7
[Nov 19 12:58:29] VERBOSE[20598] chan_dahdi.c:
[Nov 19 12:58:29] VERBOSE[20598] chan_dahdi.c: > Protocol Discriminator: Q.931 (8) len=50
[Nov 19 12:58:29] VERBOSE[20598] chan_dahdi.c: > TEI=0 Call Ref: len= 2 (reference 72/0x48) (Sent from originator)
[Nov 19 12:58:29] VERBOSE[20598] chan_dahdi.c: > Message Type: SETUP (5)
[Nov 19 12:58:29] VERBOSE[20598] chan_dahdi.c: > [04 03 80 90 a3]
[Nov 19 12:58:29] VERBOSE[20598] chan_dahdi.c: > Bearer Capability (len= 5) [ Ext: 1 Q.931 Std: 0 Info transfer capability: Speech (0)
[Nov 19 12:58:29] VERBOSE[20598] chan_dahdi.c: > Ext: 1 Trans mode/rate: 64kbps, circuit-mode (16)
[Nov 19 12:58:29] VERBOSE[20598] chan_dahdi.c: > User information layer 1: A-Law (35)
[Nov 19 12:58:29] VERBOSE[20598] chan_dahdi.c: > [18 03 a1 83 81]
[Nov 19 12:58:29] VERBOSE[20598] chan_dahdi.c: > Channel ID (len= 5) [ Ext: 1 IntID: Implicit Other(PRI) Spare: 0 Preferred Dchan: 0
[Nov 19 12:58:29] VERBOSE[20598] chan_dahdi.c: > ChanSel: As indicated in following octets
[Nov 19 12:58:29] VERBOSE[20598] chan_dahdi.c: > Ext: 1 Coding: 0 Number Specified Channel Type: 3
[Nov 19 12:58:29] VERBOSE[20598] chan_dahdi.c: > Ext: 1 Channel: 1 Type: CPE]
[Nov 19 12:58:29] VERBOSE[20598] chan_dahdi.c: > [1e 02 80 83]
[Nov 19 12:58:29] VERBOSE[20598] chan_dahdi.c: > Progress Indicator (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) 0: 0 Location: User (0)
[Nov 19 12:58:29] VERBOSE[20598] chan_dahdi.c: > Ext: 1 Progress Description: Calling equipment is non-ISDN. (3) ]
[Nov 19 12:58:29] VERBOSE[20598] chan_dahdi.c: > [28 07 b1 68 69 64 64 65 6e]
[Nov 19 12:58:29] VERBOSE[20598] chan_dahdi.c: > Display (len= 7) Charset: 31 [ hidden ]
[Nov 19 12:58:29] VERBOSE[20598] chan_dahdi.c: > [6c 06 00 81 30 38 30 30]
[color=#FF0000][Nov 19 12:58:29] VERBOSE[20598] chan_dahdi.c: > Calling Number (len= 8) [ Ext: 0 TON: Unknown Number Type (0) NPI: Unknown Number Plan (0)
[Nov 19 12:58:29] VERBOSE[20598] chan_dahdi.c: > Presentation: Presentation permitted, user number passed network screening (1) ‘0800’ ][/color]
[Nov 19 12:58:29] VERBOSE[20598] chan_dahdi.c: > [70 0c a1 30 32 30 37 30 37 30 30 39 37 35]
[Nov 19 12:58:29] VERBOSE[20598] chan_dahdi.c: > Called Number (len=14) [ Ext: 1 TON: National Number (2) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1) ‘XXXXXX’ ]
[Nov 19 12:58:29] VERBOSE[20598] chan_dahdi.c: q931.c:4959 q931_setup: Call 32840 enters state 1 (Call Initiated). Hold state: Idle
[Nov 19 12:58:29] VERBOSE[20598] app_dial.c: – Called g0/XXXXXX
[Nov 19 12:58:29] VERBOSE[3955] chan_dahdi.c:

Thanks guys.

Replying to myself here, but from further reading it would appear I need to set ‘usecallingpres=yes’ in zapata.conf.

As I’m using a TE121 single-span T1/E1/J1 card I presume this is instead needed within chan_dahdi.conf on a FreePBX box:

So will trying the following at earliest opportunity:

cat chan_dahdi.conf
; Copied from DAHDI Module of FreePBX

[general]

#include chan_dahdi_general.conf

[channels]
[color=#FF0000]usecallingpres=yes[/color]

; include dahdi groups defined by DAHDI module of FreePBX
#include chan_dahdi_groups.conf

; include dahdi extensions defined in FreePBX
#include chan_dahdi_additional.conf

Should this work on asterisk 1.6.2.14 ?

And for the benefit of anyone browsing the forums, this worked on Asterisk 1.6:

[color=#FF0000]> Calling Number (len= 8) [ Ext: 0 TON: Unknown Number Type (0) NPI: Unknown Number Plan (0)

                      Presentation: Presentation prohibited, user number passed network screening (33)  '0800' ][/color]

CLI is withheld.