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