TELCO trunks issues

Hi guys,

I’ve an Openvox A800 with 2 fxs and 5 fxo (with DAHDI instaled.

My idea is receive and call with two lines. They must be the same dial pattern.
I’ve configured one trunk where I got Zap Identifies = g0, and maximun channels = 2 and dial rules "0."
At outbound routes I’ve Trunk Sequence = ZAP/g0.
I need to do, and receive calls simultaneos.

The problem is: When I make a call, it does’t complete de call, just ring…

At dahdi_cannels I’ve:

;;; line="6 OPVXA1200/12/5 FXSKS (In use) (SWEC: MG2)"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 6
context=default

;;; line="7 OPVXA1200/12/6 FXSKS (In use) (SWEC: MG2)"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 7
context=default

And at chan_dahdi.conf
;
; DAHDI telephony
;
; Configuration file

[trunkgroups]

[channels]

;language=en
language=pt_BR
context=from-zaptel
signalling=fxs_ks
rxwink=300 ; Atlas seems to use long (250ms) winks
toneduration=100
relaxdtmf=yes
rxgain=4.0
txgain=2.0
hanguponpolarityswitch=yes
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=yes
echotraining=yes
echotraining=800
callgroup=1
pickupgroup=1
immediate=no
;busypattern=500,500
busydetect=yes
busycount=3
faxdetect=no

;Include setup-pstn configs
#include dahdi-channels.conf

;Include PBXconfig configs
#include chan_dahdi_additional.conf

Thanks a lot.

Any help will be appreciated a lot.

Best regards,

Leandro

The #include command tells asterisk to go look at the following file for more config info:

#include dahdi-channels.conf

;Include PBXconfig configs
#include chan_dahdi_additional.conf

Need to see the above two files to see what is going on. Also should see /etc/dahdi/system.conf. This shows the hardware configs. The asterisk configs and the hw configs should match.

Thanks a lot to reply.

At dahdi-channels.conf I’ve:

;;; line="5 OPVXA1200/12/4 FXOKS (In use) (SWEC: MG2)"
signalling=fxo_ks
callerid=“Channel 5” <4005>
mailbox=4005
group=5
context=from-internal
channel => 5
callerid=
mailbox=
group=
context=default

;;; line="6 OPVXA1200/12/5 FXSKS (In use) (SWEC: MG2)"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 6
context=default

;;; line="7 OPVXA1200/12/6 FXSKS (In use) (SWEC: MG2)"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 7
context=default

At chan_dahdi_additional.conf, I’ve

;;;;;;[25]
signalling=fxo_ks
pickupgroup=2
mailbox=25@default
immediate=no
echotraining=400
echocancelwhenbridged=yes
echocancel=yes
context=from-internal
callprogress=no
callgroup=2
callerid=device <25>
busydetect=no
busycount=7
accountcode=
channel=>5

At /etc/dahdi/system.conf I’ve:

fxoks=5
echocanceller=mg2,5
fxsks=6
echocanceller=mg2,6
fxsks=7
echocanceller=mg2,7

channel 8, OPVXA1200/12/7, no module.

Global data

loadzone = br
defaultzone = br

I think the files are correct, any suggest to solve my problem? please help. :slight_smile:

Thanks a lot guys.

Best regards,

Leandro.

I don’t know if it has some relationship, but the using the Asterisk at verbose method, I can find a dbdel error.
I’ve tried to connect to mysql using the parameters at amportal.conf and works great.

– DAHDI/1-1 answered DAHDI/7-1
– Executing [s@macro-auto-blkvm:1] Set(“DAHDI/1-1”, “__MACRO_RESULT=”) in new stack
– Executing [s@macro-auto-blkvm:2] DBdel(“DAHDI/1-1”, “BLKVM/600/DAHDI/7-1”) in new stack
– DBdel: family=BLKVM, key=600/DAHDI/7-1
– Executing [h@macro-dial:1] Macro(“DAHDI/7-1”, “hangupcall”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“DAHDI/7-1”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,4)
– Executing [s@macro-hangupcall:4] GotoIf(“DAHDI/7-1”, “0?skipblkvm”) in new stack
– Executing [s@macro-hangupcall:5] NoOp(“DAHDI/7-1”, “Cleaning Up Block VM Flag: BLKVM/600/DAHDI/7-1”) in new stack
– Executing [s@macro-hangupcall:6] DBdel(“DAHDI/7-1”, “BLKVM/600/DAHDI/7-1”) in new stack
– DBdel: family=BLKVM, key=600/DAHDI/7-1
– DBdel: Error deleting key from database.
– Executing [s@macro-hangupcall:7] GotoIf(“DAHDI/7-1”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [s@macro-hangupcall:9] Hangup(“DAHDI/7-1”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘DAHDI/7-1’ in macro ‘hangupcall’
== Spawn extension (macro-dial, h, 1) exited non-zero on ‘DAHDI/7-1’
– Hungup ‘DAHDI/1-1’
== Spawn extension (macro-dial, s, 7) exited non-zero on ‘DAHDI/7-1’ in macro ‘dial’
== Spawn extension (ext-group, 600, 21) exited non-zero on ‘DAHDI/7-1’
– Hungup ‘DAHDI/7-1’

Thanks again,

regards,

Leandro

You may want to change 'context=from-pstn" to “context=from-zaptel” to see if that helps.

You can follow this page on configuring the fxo trunk.

Thanks to reply.

I’ve saw this link already, I’m not using a DID an Associated DID to FXO trunk.
The inbound routes are working. I can receive the call normally.

I did the modifications you said at dahdi_channels.conf

regards,

Leandro

Changing the Zap Identifier from g0 to 6, the call is directed correctly. But using g0 it’s still not working.

regards,

Leandro

The problem is: When I make a call, it does't complete de call, just ring....

dial rules “0.”

Okay, caught the problem now. “Dial rules” are associated with trunks. They are used to add digits to the outgoing dialed number. For example, your area requires 10 digit dialing, you can use 7 digit dialing and add the area code using a “dial rule”.

“Dial patterns” are used on outbound routes. Based on the digits dialed, they will send the call out a selected trunk. In your case, dial 0 + number should go out g0 using an outbound route and the dial pattern: 0|.

Hi,

I just removed the “Dial Rules”, I don’t need to set this using my PSTN trunk. But it’s still not working… at logs the call is redirected to g0 trunks group, but it nos true.

This is the call trace when I call to my cell phone using PSTN trunk. The Asterisk send the ring signal but the call doesn’t out of my office (doesn’t go to PSTN).

srv002*CLI>
– Executing [086374456@from-internal:1] Macro(“DAHDI/1-1”, “user-callerid,SKIPTTL,”) in new stack
– Executing [s@macro-user-callerid:1] Set(“DAHDI/1-1”, “AMPUSER=20”) in new stack
– Executing [s@macro-user-callerid:2] GotoIf(“DAHDI/1-1”, “0?report”) in new stack
– Executing [s@macro-user-callerid:3] ExecIf(“DAHDI/1-1”, “1?Set(REALCALLERIDNUM=20)”) in new stack
– Executing [s@macro-user-callerid:4] Set(“DAHDI/1-1”, “AMPUSER=20”) in new stack
– Executing [s@macro-user-callerid:5] Set(“DAHDI/1-1”, “AMPUSERCIDNAME=Recepcao”) in new stack
– Executing [s@macro-user-callerid:6] GotoIf(“DAHDI/1-1”, “0?report”) in new stack
– Executing [s@macro-user-callerid:7] Set(“DAHDI/1-1”, “AMPUSERCID=20”) in new stack
– Executing [s@macro-user-callerid:8] Set(“DAHDI/1-1”, “CALLERID(all)=“Recepcao” <20>”) in new stack
– Executing [s@macro-user-callerid:9] ExecIf(“DAHDI/1-1”, “1?Set(CHANNEL(language)=pt_BR)”) in new stack
– Executing [s@macro-user-callerid:10] GotoIf(“DAHDI/1-1”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,19)
– Executing [s@macro-user-callerid:19] NoOp(“DAHDI/1-1”, “Using CallerID “Recepcao” <20>”) in new stack
– Executing [086374456@from-internal:2] Set(“DAHDI/1-1”, “_NODEST=”) in new stack
– Executing [086374456@from-internal:3] Macro(“DAHDI/1-1”, “record-enable,20,OUT,”) in new stack
– Executing [s@macro-record-enable:1] GotoIf(“DAHDI/1-1”, “1?check”) in new stack
– Goto (macro-record-enable,s,4)
– Executing [s@macro-record-enable:4] AGI(“DAHDI/1-1”, “recordingcheck,20100625-090309,1277467379.7”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck,20100625-090309,1277467379.7: Outbound recording not enabled
– <DAHDI/1-1>AGI Script recordingcheck completed, returning 0
– Executing [s@macro-record-enable:5] MacroExit(“DAHDI/1-1”, “”) in new stack
– Executing [086374456@from-internal:4] Macro(“DAHDI/1-1”, “dialout-trunk,2,86374456,”) in new stack
– Executing [s@macro-dialout-trunk:1] Set(“DAHDI/1-1”, “DIAL_TRUNK=2”) in new stack
– Executing [s@macro-dialout-trunk:2] GosubIf(“DAHDI/1-1”, “0?sub-pincheck,s,1”) in new stack
– Executing [s@macro-dialout-trunk:3] GotoIf(“DAHDI/1-1”, “0?disabletrunk,1”) in new stack
– Executing [s@macro-dialout-trunk:4] Set(“DAHDI/1-1”, “DIAL_NUMBER=86374456”) in new stack
– Executing [s@macro-dialout-trunk:5] Set(“DAHDI/1-1”, “DIAL_TRUNK_OPTIONS=trwW”) in new stack
– Executing [s@macro-dialout-trunk:6] Set(“DAHDI/1-1”, “OUTBOUND_GROUP=OUT_2”) in new stack
– Executing [s@macro-dialout-trunk:7] GotoIf(“DAHDI/1-1”, “0?nomax”) in new stack
– Executing [s@macro-dialout-trunk:8] GotoIf(“DAHDI/1-1”, “0?chanfull”) in new stack
– Executing [s@macro-dialout-trunk:9] GotoIf(“DAHDI/1-1”, “0?skipoutcid”) in new stack
– Executing [s@macro-dialout-trunk:10] Set(“DAHDI/1-1”, “DIAL_TRUNK_OPTIONS=twW”) in new stack
– Executing [s@macro-dialout-trunk:11] Macro(“DAHDI/1-1”, “outbound-callerid,2”) in new stack
– Executing [s@macro-outbound-callerid:1] ExecIf(“DAHDI/1-1”, “0?Set(CALLERPRES()=)”) in new stack
– Executing [s@macro-outbound-callerid:2] ExecIf(“DAHDI/1-1”, “0?Set(REALCALLERIDNUM=20)”) in new stack
– Executing [s@macro-outbound-callerid:3] GotoIf(“DAHDI/1-1”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,6)
– Executing [s@macro-outbound-callerid:6] Set(“DAHDI/1-1”, “USEROUTCID=”) in new stack
– Executing [s@macro-outbound-callerid:7] Set(“DAHDI/1-1”, “EMERGENCYCID=6133643801”) in new stack
– Executing [s@macro-outbound-callerid:8] Set(“DAHDI/1-1”, “TRUNKOUTCID=6135471850”) in new stack
– Executing [s@macro-outbound-callerid:9] GotoIf(“DAHDI/1-1”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,12)
– Executing [s@macro-outbound-callerid:12] ExecIf(“DAHDI/1-1”, “1?Set(CALLERID(all)=6135471850)”) in new stack
– Executing [s@macro-outbound-callerid:13] ExecIf(“DAHDI/1-1”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [s@macro-outbound-callerid:14] ExecIf(“DAHDI/1-1”, “0?Set(CALLERPRES()=prohib_passed_screen)”) in new stack
– Executing [s@macro-dialout-trunk:12] ExecIf(“DAHDI/1-1”, “1?AGI(fixlocalprefix)”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
– <DAHDI/1-1>AGI Script fixlocalprefix completed, returning 0
– Executing [s@macro-dialout-trunk:13] Set(“DAHDI/1-1”, “OUTNUM=86374456”) in new stack
– Executing [s@macro-dialout-trunk:14] Set(“DAHDI/1-1”, “custom=DAHDI/g0”) in new stack
– Executing [s@macro-dialout-trunk:15] ExecIf(“DAHDI/1-1”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^)twW)”) in new stack
– Executing [s@macro-dialout-trunk:16] Macro(“DAHDI/1-1”, “dialout-trunk-predial-hook,”) in new stack
– Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“DAHDI/1-1”, “”) in new stack
– Executing [s@macro-dialout-trunk:17] GotoIf(“DAHDI/1-1”, “0?bypass,1”) in new stack
– Executing [s@macro-dialout-trunk:18] GotoIf(“DAHDI/1-1”, “0?customtrunk”) in new stack
– Executing [s@macro-dialout-trunk:19] Dial(“DAHDI/1-1”, “DAHDI/g0/86374456,300,twW”) in new stack
– Called g0/86374456
– DAHDI/2-1 is ringing
– DAHDI/2-1 is ringing
– DAHDI/2-1 is ringing
– DAHDI/2-1 is ringing
– DAHDI/2-1 is ringing
– DAHDI/2-1 is ringing
– DAHDI/2-1 is ringing
– DAHDI/2-1 is ringing
– DAHDI/2-1 is ringing

Thanks a lot.

Any suggest will be appreciated.

Regards,

Leandro

At logs, the rings cannel is DAHDI/2-1, but the call should be redirected to g0, and g0 is configured using DAHDÏ/6 and DAHDI/7 as it group.

Am I right?

;;; line="6 OPVXA1200/12/5 FXSKS (In use) (SWEC: MG2)"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-zaptel
channel => 6
context=default

;;; line="7 OPVXA1200/12/6 FXSKS (In use) (SWEC: MG2)"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-zaptel
channel => 7
context=default

Thanks…

What do you have for an outbound route? What is the outbound route’s name and dial pattern?

Could group=g0 be already set for another channel 1-4?

Hi,

My outbound route has no peculiarity, I’ve only one trunk (PSTN).
I’ve only one route to outbound route (trunk) and it’s points to group g0.

The outbound description is (6135471850) with dial pattern “0|.”, because the users must digit 0 to call to outside numbers.

Hi,

Thanks a lot to reply…

I don’t have the group g0 set to others channels, in configuration files it’s used only at channels 6 and 7, ther others channels has from-internal context and all (channel 1,2,3,4 and 5) have the groups configurations as 5.

I’ve looked for g0 and it’s only used by channels 6 and 7.

Any suggest will be appreciated !

best regards,

Leandro

Do you have gO (g-oh) instead of g0 (g-zero)? Are you only showing snippets of your config files and not showing channels 1-4?

Have you checked your fxs extension configurations in FreePBX to make sure that they are not configured for g0?

From the Asterisk CLI> dahdi restart

This will reload the dahdi configs into Asterisk. Optionally is from the Linux command prompt: “amportal stop”, then “amportal start”.

At the beginning of the config files could be a global setting “group = g0” that is being picked up by channels 1-4. Check for that…

Please post the output of Asterisk CLI command ‘dahdi show channels’

Do you have gO (g-oh) instead of g0 (g-zero)? Are you only showing snippets of your config files and not showing channels 1-4?

  • No, I’ve g0 (g-zero). Yes, I’m showing only snippets of config files, because the channels 1-5 have basically the same configuration.

Have you checked your fxs extension configurations in FreePBX to make sure that they are not configured for g0?

  • Yes. I’ve g0 configured only at FXS channels (PSTN).

[srv002.rhcarquitetura asterisk]# cat dahdi-channels.conf | grep 0
; Autogenerated by /usr/sbin/dahdi_genconf on Thu Jun 24 00:15:45 2010
; Span 1: OPVXA1200/12 “OpenVox A1200P/A800P Board 13” (MASTER)
;;; line="1 OPVXA1200/12/0 FXOKS (In use) (SWEC: MG2)"
callerid=“Channel 1” <4001>
mailbox=4001
;;; line="2 OPVXA1200/12/1 FXOKS (In use) (SWEC: MG2)"
callerid=“Channel 2” <4002>
mailbox=4002
;;; line="3 OPVXA1200/12/2 FXOKS (In use) (SWEC: MG2)"
callerid=“Channel 3” <4003>
mailbox=4003
;;; line="4 OPVXA1200/12/3 FXOKS (In use) (SWEC: MG2)"
callerid=“Channel 4” <4004>
mailbox=4004
;;; line="5 OPVXA1200/12/4 FXOKS (In use) (SWEC: MG2)"
callerid=“Channel 5” <4005>
mailbox=4005
;;; line="6 OPVXA1200/12/5 FXSKS (In use) (SWEC: MG2)"
group=0
;;; line="7 OPVXA1200/12/6 FXSKS (In use) (SWEC: MG2)"
group=0

  • I’ve restarted the asterisk already.

At the beginning of the config files could be a global setting “group = g0” that is being picked up by channels 1-4. Check for that…

  • I don’t have, but I saw references for g0 at .templates archives. Some of this archives are used to FOP.