Paging FXS Ports - DAHDI not ZAP Help!

I’m looking for some customization to the paging portion of FreePBX that will allow FXS(DAHDI) extensions to be included in the page groups and actually paged.
I have analog emergency phones that auto-answer on incoming calls. I can set up paging to an extension with Page(DAHDI/1&DAHDI/2) etc. and it works.

It would appear that the Page(Local/PAGE301@ext-page) does not dial DAHDI/2 it dials ZAP/2 which is not recognized. This is an AsteriskNOW distro FreePBX 2.5.1.5 and Asterisk 1.4.24.1.

– Starting simple switch on ‘DAHDI/3-1’
– Executing [88@from-internal:1] Answer(“DAHDI/3-1”, “”) in new stack
– Executing [88@from-internal:2] Set(“DAHDI/3-1”, “_FORCE_PAGE=1”) in new stack
– Executing [88@from-internal:3] Macro(“DAHDI/3-1”, “user-callerid|”) in new stack
– Executing [s@macro-user-callerid:1] Set(“DAHDI/3-1”, “AMPUSER=”) in new stack
– Executing [s@macro-user-callerid:2] GotoIf(“DAHDI/3-1”, “0?report”) in new stack
– Executing [s@macro-user-callerid:3] ExecIf(“DAHDI/3-1”, “1|Set|REALCALLERIDNUM=”) in new stack
– Executing [s@macro-user-callerid:4] Set(“DAHDI/3-1”, “AMPUSER=”) in new stack
– Executing [s@macro-user-callerid:5] Set(“DAHDI/3-1”, “AMPUSERCIDNAME=”) in new stack
– Executing [s@macro-user-callerid:6] GotoIf(“DAHDI/3-1”, “1?report”) in new stack
– Goto (macro-user-callerid,s,11)
– Executing [s@macro-user-callerid:11] GotoIf(“DAHDI/3-1”, “0?continue”) in new stack
– Executing [s@macro-user-callerid:12] Set(“DAHDI/3-1”, “__TTL=64”) in new stack
– Executing [s@macro-user-callerid:13] GotoIf(“DAHDI/3-1”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,20)
– Executing [s@macro-user-callerid:20] NoOp(“DAHDI/3-1”, “Using CallerID “” <>”) in new stack
– Executing [88@from-internal:4] Set(“DAHDI/3-1”, “_AMPUSER=”) in new stack
– Executing [88@from-internal:5] Page(“DAHDI/3-1”, “LOCAL/PAGE301@ext-paging|d”) in new stack
– Called PAGE301@ext-paging
– <DAHDI/3-1> Playing ‘beep’ (language ‘en’)
– Executing [PAGE301@ext-paging:1] GotoIf(“Local/PAGE301@ext-paging-ce64,2”, “?skipself”) in new stack
– Executing [PAGE301@ext-paging:2] GotoIf(“Local/PAGE301@ext-paging-ce64,2”, “0?AVAIL”) in new stack
– Executing [PAGE301@ext-paging:3] Set(“Local/PAGE301@ext-paging-ce64,2”, “AVAILSTATUS=not checked”) in new stack
– Executing [PAGE301@ext-paging:4] Goto(“Local/PAGE301@ext-paging-ce64,2”, “SKIPCHECK”) in new stack
– Goto (ext-paging,PAGE301,6)
– Executing [PAGE301@ext-paging:6] NoOp(“Local/PAGE301@ext-paging-ce64,2”, “Seems to be available (state = not checked”) in new stack
– Executing [PAGE301@ext-paging:7] GotoIf(“Local/PAGE301@ext-paging-ce64,2”, “0?skipself”) in new stack
– Executing [PAGE301@ext-paging:8] Macro(“Local/PAGE301@ext-paging-ce64,2”, “autoanswer|301”) in new stack
– Executing [s@macro-autoanswer:1] Set(“Local/PAGE301@ext-paging-ce64,2”, “DIAL=ZAP/2”) in new stack
– Executing [s@macro-autoanswer:2] GotoIf(“Local/PAGE301@ext-paging-ce64,2”, “0?macro”) in new stack
– Executing [s@macro-autoanswer:3] Set(“Local/PAGE301@ext-paging-ce64,2”, “phone=”) in new stack
– Executing [s@macro-autoanswer:4] Set(“Local/PAGE301@ext-paging-ce64,2”, “SIPURI=”) in new stack
– Executing [s@macro-autoanswer:5] Set(“Local/PAGE301@ext-paging-ce64,2”, “ALERTINFO=Alert-Info: Ring Answer”) in new stack
– Executing [s@macro-autoanswer:6] Set(“Local/PAGE301@ext-paging-ce64,2”, “CALLINFO=Call-Info: ;answer-after=0”) in new stack
– Executing [s@macro-autoanswer:7] Set(“Local/PAGE301@ext-paging-ce64,2”, “SIPURI=intercom=true”) in new stack
– Executing [s@macro-autoanswer:8] Set(“Local/PAGE301@ext-paging-ce64,2”, “DOPTIONS=A(beep)”) in new stack
– Executing [s@macro-autoanswer:9] Set(“Local/PAGE301@ext-paging-ce64,2”, “DTIME=5”) in new stack
– Executing [s@macro-autoanswer:10] Set(“Local/PAGE301@ext-paging-ce64,2”, “ANSWERMACRO=”) in new stack
– Executing [s@macro-autoanswer:11] ExecIf(“Local/PAGE301@ext-paging-ce64,2”, “0|Set|CALLINFO=Call-Info: sip:broadworks.net;answer-after=0”) in new stack
– Executing [s@macro-autoanswer:12] GotoIf(“Local/PAGE301@ext-paging-ce64,2”, “0?macro2”) in new stack
– Executing [s@macro-autoanswer:13] ExecIf(“Local/PAGE301@ext-paging-ce64,2”, “1|SipAddHeader|Alert-Info: Ring Answer”) in new stack
– Executing [s@macro-autoanswer:14] ExecIf(“Local/PAGE301@ext-paging-ce64,2”, “1|SipAddHeader|Call-Info: ;answer-after=0”) in new stack
– Executing [s@macro-autoanswer:15] ExecIf(“Local/PAGE301@ext-paging-ce64,2”, “1|Set|__SIP_URI_OPTIONS=intercom=true”) in new stack
– Executing [PAGE301@ext-paging:9] Dial(“Local/PAGE301@ext-paging-ce64,2”, “ZAP/2|5|A(beep)”) in new stack
== Everyone is busy/congested at this time (1:0/0/1)
– Executing [PAGE301@ext-paging:10] NoOp(“Local/PAGE301@ext-paging-ce64,2”, “Not paging originator”) in new stack
– Executing [PAGE301@ext-paging:11] Hangup(“Local/PAGE301@ext-paging-ce64,2”, “”) in new stack
== Spawn extension (ext-paging, PAGE301, 11) exited non-zero on ‘Local/PAGE301@ext-paging-ce64,2’
– Created MeetMe conference 1023 for conference ‘507603759d’
– Hungup ‘DAHDI/pseudo-892562524’
== Spawn extension (from-internal, 88, 5) exited non-zero on ‘DAHDI/3-1’
– Executing [h@from-internal:1] Macro(“DAHDI/3-1”, “hangupcall”) in new stack
– Executing [s@macro-hangupcall:1] ResetCDR(“DAHDI/3-1”, “vw”) in new stack
– Executing [s@macro-hangupcall:2] NoCDR(“DAHDI/3-1”, “”) in new stack
– Executing [s@macro-hangupcall:3] GotoIf(“DAHDI/3-1”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,6)
– Executing [s@macro-hangupcall:6] GotoIf(“DAHDI/3-1”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [s@macro-hangupcall:9] GotoIf(“DAHDI/3-1”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,11)
– Executing [s@macro-hangupcall:11] Hangup(“DAHDI/3-1”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 11) exited non-zero on ‘DAHDI/3-1’ in macro ‘hangupcall’
== Spawn extension (from-internal, h, 1) exited non-zero on ‘DAHDI/3-1’
– Hungup ‘DAHDI/3-1’

in amportal.conf, set:

ZAP2DAHDICOMPAT=true

Then press the “Apply Configuration Changes” red bar that comes up (you may have to make it come up by doing a change elsewhere).

Hmm - I may have spoken too soon, I think you are saying you have that and paging is broken…

ZAP2DAHDICOMPAT=true

It was set to this. I verified and did an amportal restart, reload at the cli and deleted and added the extensions back in. I’m looking at the database and all were saved as ZAP/…

/DEVICE/100/default_user : 100
/DEVICE/100/dial : SIP/100
/DEVICE/100/type : fixed
/DEVICE/100/user : 100
/DEVICE/101/default_user : 101
/DEVICE/101/dial : ZAP/3
/DEVICE/101/type : fixed
/DEVICE/101/user : 101
/DEVICE/300/default_user : 300
/DEVICE/300/dial : ZAP/1
/DEVICE/300/type : fixed
/DEVICE/300/user : 300
/DEVICE/301/default_user : 301
/DEVICE/301/dial : ZAP/2
/DEVICE/301/type : fixed
/DEVICE/301/user : 301
/DEVICE/350/default_user : 350
/DEVICE/350/dial : Page(DAHDI/2)
/DEVICE/350/type : fixed
/DEVICE/350/user : 350
/DEVICE/375/default_user : 375
/DEVICE/375/dial : ZAP/4
/DEVICE/375/type : fixed
/DEVICE/375/user : 37

yup - broke, can you please file a bug report on this issue and we can dig into addressing it. Thanks.

The paging is broken because in the databas the extensions are being saved as ZAP and Asterisk is looking for DAHDI.

Should I just change this line:

			$value = $global['value'];
			if ($chan_dahdi && substr($value, 0, 4) === 'ZAP/') {
				$value = 'DAHDI/' . substr($value, 4);

in functions.inc.php?

mdoran - no, that line is what converts ZAP trunks to DAHDI trunks in compat mode. See some comments I made in the ticket that will get you going for now.

Philippe,

He is also running asterisk 1.4.24.1 which has some bugs in the Dadhi handling… Remember we talked the other night about 1.4.24.1 having a issue with the need for the word signalling instead of signaling.

I posted this on Digium as an issue as well.