Dialing Out Problem DAHDI AEX410

Hi everyone,

I am new to this so please be patient. I have a VMWare ESXi 6.0 server with Ubuntu 14.04 LTS VM, PCI AEX410 Pass-through 4 port FXO, latest updates on all FreePBX modules, asterisk 12.8.1.

After spending a couple of days, I have been able to configure pjsip Polycom phones and dialing internal extensions. I am also able to receive calls from my provider but I am not able to make calls. I get “We are sorry your call cannot be completed at this time. Please hang up and try again later.” I have an outbound route with the dialing rules set up. I also tried the “w” option on the DAHDI trunk but nothing gets me past this message. Any suggestion or help will be greatly appreciated.

Here’s what I see when I try to make a call:

    -- Executing [out@sub-record-check:3] ExecIf("PJSIP/104-0000000b", "1?Goto(routewins)") in new stack
    -- Goto (sub-record-check,out,7)
    -- Executing [out@sub-record-check:7] Gosub("PJSIP/104-0000000b", "recordcheck,1(dontcare,out,XXXXXXXXXX)") in new stack
    -- Executing [recordcheck@sub-record-check:1] NoOp("PJSIP/104-0000000b", "Starting recording check against dontcare") in new stack
    -- Executing [recordcheck@sub-record-check:2] Goto("PJSIP/104-0000000b", "dontcare") in new stack
    -- Goto (sub-record-check,recordcheck,3)
    -- Executing [recordcheck@sub-record-check:3] Return("PJSIP/104-0000000b", "") in new stack
    -- Executing [out@sub-record-check:8] Return("PJSIP/104-0000000b", "") in new stack
    -- Executing [XXXXXXXXXX@from-internal:3] ExecIf("PJSIP/104-0000000b", "0 ?Set(CDR(accountcode)=)") in new stack
    -- Executing [XXXXXXXXXX@from-internal:4] GosubIf("PJSIP/104-0000000b", "0?sub-diversion-header,s,1()") in new stack
    -- Executing [XXXXXXXXXX@from-internal:5] Set("PJSIP/104-0000000b", "MOHCLASS=default") in new stack
    -- Executing [XXXXXXXXXX@from-internal:6] ExecIf("PJSIP/104-0000000b", "1?Set(TRUNKCIDOVERRIDE=NNNNNNNNNN)") in new stack
    -- Executing [XXXXXXXXXX@from-internal:7] Set("PJSIP/104-0000000b", "_NODEST=") in new stack
    -- Executing [XXXXXXXXXX@from-internal:8] Macro("PJSIP/104-0000000b", "dialout-trunk,2,1XXXXXXXXXX,,off") in new stack
    -- Executing [s@macro-dialout-trunk:1] Set("PJSIP/104-0000000b", "DIAL_TRUNK=2") in new stack
    -- Executing [s@macro-dialout-trunk:2] GosubIf("PJSIP/104-0000000b", "0?sub-pincheck,s,1()") in new stack
    -- Executing [s@macro-dialout-trunk:3] GotoIf("PJSIP/104-0000000b", "0?disabletrunk,1") in new stack
    -- Executing [s@macro-dialout-trunk:4] Set("PJSIP/104-0000000b", "DIAL_NUMBER=1XXXXXXXXXX") in new stack
    -- Executing [s@macro-dialout-trunk:5] Set("PJSIP/104-0000000b", "DIAL_TRUNK_OPTIONS=Ttr") in new stack
    -- Executing [s@macro-dialout-trunk:6] Set("PJSIP/104-0000000b", "OUTBOUND_GROUP=OUT_2") in new stack
    -- Executing [s@macro-dialout-trunk:7] GotoIf("PJSIP/104-0000000b", "1?nomax") in new stack
    -- Goto (macro-dialout-trunk,s,9)
    -- Executing [s@macro-dialout-trunk:9] GotoIf("PJSIP/104-0000000b", "0?skipoutcid") in new stack
    -- Executing [s@macro-dialout-trunk:10] Set("PJSIP/104-0000000b", "DIAL_TRUNK_OPTIONS=Tt") in new stack
    -- Executing [s@macro-dialout-trunk:11] Macro("PJSIP/104-0000000b", "outbound-callerid,2") in new stack
    -- Executing [s@macro-outbound-callerid:1] ExecIf("PJSIP/104-0000000b", "0?Set(CALLERPRES()=)") in new stack
    -- Executing [s@macro-outbound-callerid:2] ExecIf("PJSIP/104-0000000b", "0?Set(REALCALLERIDNUM=104)") in new stack
    -- Executing [s@macro-outbound-callerid:3] GotoIf("PJSIP/104-0000000b", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,6)
    -- Executing [s@macro-outbound-callerid:6] Set("PJSIP/104-0000000b", "USEROUTCID=") in new stack
    -- Executing [s@macro-outbound-callerid:7] Set("PJSIP/104-0000000b", "EMERGENCYCID=") in new stack
    -- Executing [s@macro-outbound-callerid:8] Set("PJSIP/104-0000000b", "TRUNKOUTCID=NNNNNNNNNN") in new stack
    -- Executing [s@macro-outbound-callerid:9] GotoIf("PJSIP/104-0000000b", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,14)
    -- Executing [s@macro-outbound-callerid:14] ExecIf("PJSIP/104-0000000b", "1?Set(CALLERID(all)=NNNNNNNNNN)") in new stack
    -- Executing [s@macro-outbound-callerid:15] ExecIf("PJSIP/104-0000000b", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:16] ExecIf("PJSIP/104-0000000b", "1?Set(CALLERID(all)=NNNNNNNNNN)") in new stack
    -- Executing [s@macro-outbound-callerid:17] ExecIf("PJSIP/104-0000000b", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:18] Set("PJSIP/104-0000000b", "CDR(outbound_cnum)=NNNNNNNNNN") in new stack
    -- Executing [s@macro-outbound-callerid:19] Set("PJSIP/104-0000000b", "CDR(outbound_cnam)=") in new stack
[2015-03-27 09:27:03] WARNING[2857]: func_cdr.c:349 cdr_write_callback: CDR requires a value (CDR(variable)=value)
    -- Executing [s@macro-dialout-trunk:12] GosubIf("PJSIP/104-0000000b", "0?sub-flp-2,s,1()") in new stack
    -- Executing [s@macro-dialout-trunk:13] Set("PJSIP/104-0000000b", "OUTNUM=1XXXXXXXXXX") in new stack
    -- Executing [s@macro-dialout-trunk:14] Set("PJSIP/104-0000000b", "custom=DAHDI/g0") in new stack
    -- Executing [s@macro-dialout-trunk:15] ExecIf("PJSIP/104-0000000b", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)Tt)") in new stack
    -- Executing [s@macro-dialout-trunk:16] ExecIf("PJSIP/104-0000000b", "0?Set(DIAL_TRUNK_OPTIONS=TtM(confirm))") in new stack
    -- Executing [s@macro-dialout-trunk:17] Macro("PJSIP/104-0000000b", "dialout-trunk-predial-hook,") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("PJSIP/104-0000000b", "") in new stack
    -- Executing [s@macro-dialout-trunk:18] GotoIf("PJSIP/104-0000000b", "0?bypass,1") in new stack
    -- Executing [s@macro-dialout-trunk:19] ExecIf("PJSIP/104-0000000b", "1?Set(CONNECTEDLINE(num,i)=1XXXXXXXXXX)") in new stack
    -- Executing [s@macro-dialout-trunk:20] ExecIf("PJSIP/104-0000000b", "1?Set(CONNECTEDLINE(name,i)=CID:NNNNNNNNNN)") in new stack
    -- Executing [s@macro-dialout-trunk:21] GotoIf("PJSIP/104-0000000b", "0?customtrunk") in new stack
    -- Executing [s@macro-dialout-trunk:22] Dial("PJSIP/104-0000000b", "DAHDI/g0/1XXXXXXXXXX,300,Tt") in new stack
    -- Called DAHDI/g0/1XXXXXXXXXX
    -- DAHDI/1-1 answered PJSIP/104-0000000b
    -- Channel PJSIP/104-0000000b joined 'simple_bridge' basic-bridge <874b3ef0-931d-4e2d-bce1-c966004a5cf6>
    -- Channel DAHDI/1-1 joined 'simple_bridge' basic-bridge <874b3ef0-931d-4e2d-bce1-c966004a5cf6>
       > 0x7fbb20013e60 -- Probation passed - setting RTP source address to 10.200.0.139:2224
    -- Channel PJSIP/104-0000000b left 'simple_bridge' basic-bridge <874b3ef0-931d-4e2d-bce1-c966004a5cf6>
  == Spawn extension (macro-dialout-trunk, s, 22) exited non-zero on 'PJSIP/104-0000000b' in macro 'dialout-trunk'
  == Spawn extension (from-internal, XXXXXXXXXX, 8) exited non-zero on 'PJSIP/104-0000000b'
    -- Executing [h@from-internal:1] Hangup("PJSIP/104-0000000b", "") in new stack
    -- Channel DAHDI/1-1 left 'simple_bridge' basic-bridge <874b3ef0-931d-4e2d-bce1-c966004a5cf6>
  == Spawn extension (from-internal, h, 1) exited non-zero on 'PJSIP/104-0000000b'
    -- Hanging up on 'DAHDI/1-1'
    -- Hungup 'DAHDI/1-1'

This is chan_dahdi.conf contents:

;--------------------------------------------------------------------------------;
;          Do NOT edit this file as it is auto-generated by FreePBX.             ;
;--------------------------------------------------------------------------------;
; For information on adding additional paramaters to this file, please visit the ;
; FreePBX.org wiki page, or ask on IRC. This file was created by the new FreePBX ;
; BMO - Big Module Object. Any similarity in naming with BMO from Adventure Time ;
; is totally deliberate.                                                         ;
;--------------------------------------------------------------------------------;
[general]

; generated by module
#include chan_dahdi_general.conf

; for user additions not provided by module
#include chan_dahdi_general_custom.conf

[channels]
language=en
busydetect=yes
busycount=10
usecallerid=yes
callwaiting=yes
usecallingpres=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
echotraining=no
immediate=no
faxdetect=no
rxgain=0.0
txgain=0.0

; for user additions not provided by module
#include chan_dahdi_channels_custom.conf

; 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

service dahdi status

    ### Span  1: WCTDM/0 "Wildcard AEX410" (MASTER) 
  1 FXO        FXSKS       (In use) (EC: MG2 - INACTIVE)  
  2 FXO        FXSKS       (In use) (EC: MG2 - INACTIVE)  
  3 FXO        FXSKS       (In use) (EC: MG2 - INACTIVE)  
  4 FXO        FXSKS       (In use) (EC: MG2 - INACTIVE) 

dahdi_hardware

pci:0000:03:00.0     wctdm24xxp+  d161:8006 Wildcard AEX410P

dahdi_scan

[1]
active=yes
alarms=OK
description=Wildcard AEX410
name=WCTDM/0
manufacturer=Digium
devicetype=Wildcard AEX410
location=PCI Express Bus 03 Slot 01
basechan=1
totchans=4
irq=0
type=analog
port=1,FXO
port=2,FXO
port=3,FXO
port=4,FXO

dahdi_cfg -vvvvv

DAHDI Tools Version - 2.10.0.1

DAHDI Version: 2.10.0.1
Echo Canceller(s): MG2
Configuration
======================


Channel map:

Channel 01: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 01)
Channel 02: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 02)
Channel 03: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 03)
Channel 04: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 04)

4 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

/etc/dahdi/system.conf

fxsks=1-4
echocanceller=oslec,1-4
loadzone=us
defaultzone=us
echocanceller=mg2,1-4