CALLERPRES()=prohib_passed_screen not honoured on outbound ISDN

Hi,

I am currently setting up a vanilla AsterisNOW installation with freepbx-2.7.0-6_centos5 and trying to set presentation Restricted Q931 on outbound calls from SIP => Asterisk => ISDN (dandi).

I’ve read 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 set:

Executing [[email protected]: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 extensions all works fine so I have full control except on withholding the CID.

Does anyone have any idea where I’m going wrong or what settings I’m missing?

[Nov 19 12:58:29] VERBOSE[20598] pbx.c: – Goto (macro-outbound-callerid,s,12)
[Nov 19 12:58:29] VERBOSE[20598] pbx.c: – Executing [[email protected]:12] ExecIf(“SIP/100-000000a0”, “1?Set(CALLERID(all)=hidden <0800>)”) in new stack
[Nov 19 12:58:29] VERBOSE[20598] pbx.c: – Executing [[email protected]:13] ExecIf(“SIP/100-000000a0”, “1?Set(CALLERID(all)=hidden <0800>)”) in new stack
[Nov 19 12:58:29] VERBOSE[20598] pbx.c: – Executing [[email protected]:14] ExecIf(“SIP/100-000000a0”, “0?Set(CALLERID(all)=)”) in new stack
[Nov 19 12:58:29] VERBOSE[20598] pbx.c: – Executing [[email protected]:15] ExecIf(“SIP/100-000000a0”, “1?Set(CALLERPRES()=prohib_passed_screen)”) in new stack
[Nov 19 12:58:29] VERBOSE[20598] pbx.c: – Executing [[email protected]:12] ExecIf(“SIP/100-000000a0”, “0?AGI(fixlocalprefix)”) in new stack
[Nov 19 12:58:29] VERBOSE[20598] pbx.c: – Executing [[email protected]:13] Set(“SIP/100-000000a0”, “OUTNUM=XXXXXX”) in new stack
[Nov 19 12:58:29] VERBOSE[20598] pbx.c: – Executing [[email protected]:14] Set(“SIP/100-000000a0”, “custom=DAHDI/g0”) in new stack
[Nov 19 12:58:29] VERBOSE[20598] pbx.c: – Executing [[email protected]: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 [[email protected]:16] Macro(“SIP/100-000000a0”, “dialout-trunk-predial-hook,”) in new stack
[Nov 19 12:58:29] VERBOSE[20598] pbx.c: – Executing [[email protected]:1] MacroExit(“SIP/100-000000a0”, “”) in new stack
[Nov 19 12:58:29] VERBOSE[20598] pbx.c: – Executing [[email protected]:17] GotoIf(“SIP/100-000000a0”, “0?bypass,1”) in new stack
[Nov 19 12:58:29] VERBOSE[20598] pbx.c: – Executing [[email protected]:18] GotoIf(“SIP/100-000000a0”, “0?customtrunk”) in new stack
[Nov 19 12:58:29] VERBOSE[20598] pbx.c: – Executing [[email protected]: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]
[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’ ]
[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:

Edit:
For anyone browsing the forum the fix was adding ‘usecallingpres=yes’ into chan_dahdi.conf thus:

; Copied from DAHDI Module of FreePBX

[general]

#include chan_dahdi_general.conf

[channels]
usecallingpres=yes

; 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

This was using a TE121 single-span T1/E1/J1 card and asterisk 1.6.2.14