FreePBX 2.5.1 and Asterisk 1.6.0.6

Hello. I was wondering if anyone could shed some light on my situation. I have FreePBX 2.5.1 and Asterisk 1.6.0.6 installed and sort of working. All internal stuff works good, but I cannot get incoming or ougoing calls to and from my T1 working. I have a Wildcard TE210P dual-span T1/E1/J1 card 3.3V T1 card installed. Here’s the return of dahdi_cfg -vv

DAHDI Tools Version - 2.1.0.2

DAHDI Version: 2.1.0.2
Echo Canceller(s): MG2
Configuration

SPAN 1: ESF/B8ZS Build-out: 0 db (CSU)/0-133 feet (DSX-1)
SPAN 2: ESF/B8ZS Build-out: 0 db (CSU)/0-133 feet (DSX-1)

Channel map:

Channel 01: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 01)
Channel 02: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 02)
Channel 03: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 03)
Channel 04: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 04)
Channel 05: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 05)
Channel 06: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 06)
Channel 07: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 07)
Channel 08: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 08)
Channel 09: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 09)
Channel 10: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 10)
Channel 11: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 11)
Channel 12: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 12)
Channel 13: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 13)
Channel 14: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 14)
Channel 15: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 15)
Channel 16: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 16)
Channel 17: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 17)
Channel 18: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 18)
Channel 19: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 19)
Channel 20: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 20)
Channel 21: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 21)
Channel 22: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 22)
Channel 23: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 23)
Channel 24: D-channel (Default) (Slaves: 24)
Channel 25: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 25)
Channel 26: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 26)
Channel 27: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 27)
Channel 28: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 28)
Channel 29: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 29)
Channel 30: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 30)
Channel 31: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 31)
Channel 32: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 32)
Channel 33: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 33)
Channel 34: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 34)
Channel 35: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 35)
Channel 36: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 36)
Channel 37: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 37)
Channel 38: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 38)
Channel 39: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 39)
Channel 40: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 40)
Channel 41: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 41)
Channel 42: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 42)
Channel 43: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 43)
Channel 44: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 44)
Channel 45: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 45)
Channel 46: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 46)
Channel 47: Clear channel (Default) (Echo Canceler: mg2) (Slaves: 47)
Channel 48: D-channel (Default) (Slaves: 48)

48 channels to configure.

Setting echocan for channel 1 to mg2
Setting echocan for channel 2 to mg2
Setting echocan for channel 3 to mg2
Setting echocan for channel 4 to mg2
Setting echocan for channel 5 to mg2
Setting echocan for channel 6 to mg2
Setting echocan for channel 7 to mg2
Setting echocan for channel 8 to mg2
Setting echocan for channel 9 to mg2
Setting echocan for channel 10 to mg2
Setting echocan for channel 11 to mg2
Setting echocan for channel 12 to mg2
Setting echocan for channel 13 to mg2
Setting echocan for channel 14 to mg2
Setting echocan for channel 15 to mg2
Setting echocan for channel 16 to mg2
Setting echocan for channel 17 to mg2
Setting echocan for channel 18 to mg2
Setting echocan for channel 19 to mg2
Setting echocan for channel 20 to mg2
Setting echocan for channel 21 to mg2
Setting echocan for channel 22 to mg2
Setting echocan for channel 23 to mg2
Setting echocan for channel 25 to mg2
Setting echocan for channel 26 to mg2
Setting echocan for channel 27 to mg2
Setting echocan for channel 28 to mg2
Setting echocan for channel 29 to mg2
Setting echocan for channel 30 to mg2
Setting echocan for channel 31 to mg2
Setting echocan for channel 32 to mg2
Setting echocan for channel 33 to mg2
Setting echocan for channel 34 to mg2
Setting echocan for channel 35 to mg2
Setting echocan for channel 36 to mg2
Setting echocan for channel 37 to mg2
Setting echocan for channel 38 to mg2
Setting echocan for channel 39 to mg2
Setting echocan for channel 40 to mg2
Setting echocan for channel 41 to mg2
Setting echocan for channel 42 to mg2
Setting echocan for channel 43 to mg2
Setting echocan for channel 44 to mg2
Setting echocan for channel 45 to mg2
Setting echocan for channel 46 to mg2
Setting echocan for channel 47 to mg2

I have dahdi-channels.conf include in chan_dahdi.conf

here’s my chan_dahdi.conf
; Span 1: TE2/0/1 “T2XXP (PCI) Card 0 Span 1” (MASTER) B8ZS/ESF RED
group=0
context=from-pstn
switchtype = national
signalling = pri_cpe
channel => 1-23
context = default
group = 63

; Span 2: TE2/0/2 “T2XXP (PCI) Card 0 Span 2”
;group=0,12
;context=from-pstn
;switchtype = national
;signalling = pri_cpe
;channel => 25-47
;context = default
;group = 63

I get a busy when I try to dial in. At first I was getting “All circuits busy” trying to dial out, then it occured to me that ZAP/g0 doesn’t exist in 1.6 so I guessed and created a “Custom Trunk” under the trunks page like so:

Custom Dial String: DAHDI/g0/$OUTNUM$

This is pointed to
outbound route: 9_outside

With dialing rules:
9|1NXXNXXXXXX
9|NXXNXXXXXX
9|NXXXXXX

After I changed it from ZAP/g0 to DAHDI/g0/$OUTNUM$ I no longer get the “All circuits busy” now I just get dead air for a while and the it hangs up on me. Below is a call from the CLI…any help much appreciated I’m pretty much stuck at this point.

– Executing [[email protected]:1] Macro(“SIP/4825-b6f3eee0”, “user-callerid,SKIPTTL,”) in new stack
– Executing [[email protected]:1] Set(“SIP/4825-b6f3eee0”, “AMPUSER=4825”) in new stack
– Executing [[email protected]:2] GotoIf(“SIP/4825-b6f3eee0”, “0?report”) in new stack
– Executing [[email protected]:3] ExecIf(“SIP/4825-b6f3eee0”, “1?Set(REALCALLERIDNUM=4825)”) in new stac k
– Executing [[email protected]:4] Set(“SIP/4825-b6f3eee0”, “AMPUSER=4825”) in new stack
– Executing [[email protected]:5] Set(“SIP/4825-b6f3eee0”, “AMPUSERCIDNAME=Matt Beaty”) in new stack
– Executing [[email protected]:6] GotoIf(“SIP/4825-b6f3eee0”, “0?report”) in new stack
– Executing [[email protected]:7] Set(“SIP/4825-b6f3eee0”, “AMPUSERCID=4825”) in new stack
– Executing [[email protected]:8] Set(“SIP/4825-b6f3eee0”, “CALLERID(all)=“Matt Beaty” <4825>”) in new s tack
– Executing [[email protected]:9] Set(“SIP/4825-b6f3eee0”, “REALCALLERIDNUM=4825”) in new stack
– Executing [[email protected]:10] ExecIf(“SIP/4825-b6f3eee0”, “0?Set(CHANNEL(language)=)”) in new stack
– Executing [[email protected]:11] GotoIf(“SIP/4825-b6f3eee0”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,20)
– Executing [[email protected]:20] NoOp(“SIP/4825-b6f3eee0”, “Using CallerID “Matt Beaty” <4825>”) in ne w stack
– Executing [[email protected]:2] Set(“SIP/4825-b6f3eee0”, “_NODEST=”) in new stack
– Executing [[email protected]:3] Macro(“SIP/4825-b6f3eee0”, “record-enable,4825,OUT,”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/4825-b6f3eee0”, “1?check”) in new stack
– Goto (macro-record-enable,s,4)
– Executing [[email protected]:4] AGI(“SIP/4825-b6f3eee0”, “recordingcheck,20090415-023113,1239780673.16 7”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck,20090415-023113,1239780673.167: Outbound recording not enabled
– <SIP/4825-b6f3eee0>AGI Script recordingcheck completed, returning 0
– Executing [[email protected]:5] MacroExit(“SIP/4825-b6f3eee0”, “”) in new stack
– Executing [[email protected]:4] Macro(“SIP/4825-b6f3eee0”, “dialout-trunk,3,7482771,”) in new stac k
– Executing [[email protected]:1] Set(“SIP/4825-b6f3eee0”, “DIAL_TRUNK=3”) in new stack
– Executing [[email protected]:2] GosubIf(“SIP/4825-b6f3eee0”, “0?sub-pincheck,s,1”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/4825-b6f3eee0”, “0?disabletrunk,1”) in new stack
– Executing [[email protected]:4] Set(“SIP/4825-b6f3eee0”, “DIAL_NUMBER=7482771”) in new stack
– Executing [[email protected]:5] Set(“SIP/4825-b6f3eee0”, “DIAL_TRUNK_OPTIONS=tr”) in new stack
– Executing [[email protected]:6] Set(“SIP/4825-b6f3eee0”, “OUTBOUND_GROUP=OUT_3”) in new stack
– Executing [[email protected]:7] GotoIf(“SIP/4825-b6f3eee0”, “1?nomax”) in new stack
– Goto (macro-dialout-trunk,s,9)
– Executing [[email protected]:9] GotoIf(“SIP/4825-b6f3eee0”, “0?skipoutcid”) in new stack
– Executing [[email protected]:10] Set(“SIP/4825-b6f3eee0”, “DIAL_TRUNK_OPTIONS=”) in new stack
– Executing [[email protected]:11] Macro(“SIP/4825-b6f3eee0”, “outbound-callerid,3”) in new stack
– Executing [[email protected]:1] ExecIf(“SIP/4825-b6f3eee0”, “0?Set(CALLERPRES()=)”) in new stack
– Executing [[email protected]:2] ExecIf(“SIP/4825-b6f3eee0”, “0?Set(REALCALLERIDNUM=4825)”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/4825-b6f3eee0”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,6)
– Executing [[email protected]:6] Set(“SIP/4825-b6f3eee0”, “USEROUTCID=”) in new stack
– Executing [[email protected]:7] Set(“SIP/4825-b6f3eee0”, “EMERGENCYCID=”) in new stack
– Executing [[email protected]:8] Set(“SIP/4825-b6f3eee0”, “TRUNKOUTCID=”) in new stack
– Executing [[email protected]:9] GotoIf(“SIP/4825-b6f3eee0”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,12)
– Executing [[email protected]:12] ExecIf(“SIP/4825-b6f3eee0”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [[email protected]:13] ExecIf(“SIP/4825-b6f3eee0”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [[email protected]:14] ExecIf(“SIP/4825-b6f3eee0”, “0?Set(CALLERPRES()=prohib_passed_scr een)”) in new stack
– Executing [[email protected]:12] ExecIf(“SIP/4825-b6f3eee0”, “1?AGI(fixlocalprefix)”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
> fixlocalprefix: Using pattern .
== fixlocalprefix: Dialpattern . matched. 7482771 -> 7482771
– <SIP/4825-b6f3eee0>AGI Script fixlocalprefix completed, returning 0
– Executing [[email protected]:13] Set(“SIP/4825-b6f3eee0”, “OUTNUM=7482771”) in new stack
– Executing [[email protected]:14] Set(“SIP/4825-b6f3eee0”, “custom=AMP”) in new stack
– Executing [[email protected]:15] ExecIf(“SIP/4825-b6f3eee0”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^))”) in new stack
– Executing [[email protected]:16] Macro(“SIP/4825-b6f3eee0”, “dialout-trunk-predial-hook,”) in new stac k
– Executing [[email protected]:1] MacroExit(“SIP/4825-b6f3eee0”, “”) in new stack
– Executing [[email protected]:17] GotoIf(“SIP/4825-b6f3eee0”, “0?bypass,1”) in new stack
– Executing [[email protected]:18] GotoIf(“SIP/4825-b6f3eee0”, “1?customtrunk”) in new stack
– Goto (macro-dialout-trunk,s,21)
– Executing [[email protected]:21] Set(“SIP/4825-b6f3eee0”, “pre_num=AMP:DAHDI/g0/”) in new stack
– Executing [[email protected]:22] Set(“SIP/4825-b6f3eee0”, “the_num=OUTNUM”) in new stack
– Executing [[email protected]:23] Set(“SIP/4825-b6f3eee0”, “post_num=”) in new stack
– Executing [[email protected]:24] GotoIf(“SIP/4825-b6f3eee0”, “1?outnum:skipoutnum”) in new stack
– Goto (macro-dialout-trunk,s,25)
– Executing [[email protected]:25] Set(“SIP/4825-b6f3eee0”, “the_num=7482771”) in new stack
– Executing [[email protected]:26] Dial(“SIP/4825-b6f3eee0”, “DAHDI/g0/7482771,300,”) in new stack
– Called g0/7482771
– Registered SIP ‘4885’ at 10.101.202.137 port 5060
– Hungup ‘DAHDI/1-1’

Thanks in Advance…

Anyone???

drumman,

Step one. Please verify that asterisk see’s the channels. The drivers see the card but the next step is to verify that asterisk see’s them.

To do that do ‘dadhi show channels’ at the asterisk cli unless you have enabled the “zaptel emulation” then it would be ‘zap show channels’.

FYI: if you configured and got the card working while asterisk was running you need to reload asterisk so that it see’s the channels when it attempts to load the Dadhi and/or zaptel asterisk driver interface. If when it attempts to load those interfaces it can’t find the drivers it will not load those modules into asterisk for use and that could be your first problem.

Sorry about the formatting

Connected to Asterisk 1.6.0.6 currently running on Vdnpbxnew (pid = 6880)
Verbosity is at least 5
Vdnpbxnew*CLI> dahdi show channels
Chan Extension Context Language MOH Interpret Blocked State
1 from-pstn default In Service
2 from-pstn default In Service
3 from-pstn default In Service
4 from-pstn default In Service
5 from-pstn default In Service
6 from-pstn default In Service
7 from-pstn default In Service
8 from-pstn default In Service
9 from-pstn default In Service
10 from-pstn default In Service
11 from-pstn default In Service
12 from-pstn default In Service
13 from-pstn default In Service
14 from-pstn default In Service
15 from-pstn default In Service
16 from-pstn default In Service
17 from-pstn default In Service
18 from-pstn default In Service
19 from-pstn default In Service
20 from-pstn default In Service
21 from-pstn default In Service
22 from-pstn default In Service
23 from-pstn default In Service

anyone have any input??

ok so asterisk see’s one T1 worth of channels. Are you using both T1’s or just one? If both then you need to adjust the configuration files to report to asterisk that there are 46 channels instead of just 23. IF you are using only one you need to carefully review the config files to be sure that it is reporting the right group of 23 to use. If it is reporting span1 as the one to use but you have span2 cabled up that would be the issue.

Assuming all of the above is correct the next trick is to create a “zap” trunk group (not a custom trunk). I don’t have a setup using asterisk > 1.4.21.x which is where dadhi is used. But you can tell FreePBX to treat Dadhi as zap by changing a setting the amportal.conf to tell it to use dadhi as zap.

This is from the default amportal.conf file for FreePBX:[code]

ZAP2DAHDICOMPAT=true|false

DEFAULT VALUE: false

If set to true, FreePBX will check if you have chan_dadhi installed. If so, it will

automatically use all your ZAP configuration settings (devices and trunks) and

silently convert them, under the covers, to DAHDI so no changes are needed. The

GUI will continue to refer to these as ZAP but it will use the proper DAHDI channels.

This will also keep Zap Channel DIDs working.[/code]

So create a line
ZAP2DAHDICOMPAT=true
save the config and issue the following linux command: amportal restart

So I created ZAP2DAHDICOMPAT=true in my amportal.conf and now in trunks I see that it’s in DAHDI compatibility mode. But I’m having the same issue, when I make an incoming call I get a busy and when I call out the call is just silent for about thirty seconds, doesn’t actually call out, and then hangs up on me.What config’s can I provide so someone can tell me if I have things setup properly??? I really need to get this resolved. Asterisk 1.6 does work with freepbx 2.5 right??? Just on a side note, I have an existing 1.4 setup without freepbx that works fine. When I watch the CLI for an outbound call and I compare it to a outbound call from the new box it looks similar, other than all the macros with freepbx. I don’t get it, Please someone help!!!

Though no expert, it would seem that you are missing any referance to the D-Channel- channel 24.

Good question, but there is any answer anywhere.
IMHO, it’s not compatible at all. It’s necessary to modify to much things, and you can’t update freepbx anymore.

What does pri show span 1 say?