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 [[email protected]:3] ExecIf("PJSIP/104-0000000b", "1?Goto(routewins)") in new stack
    -- Goto (sub-record-check,out,7)
    -- Executing [[email protected]ck:7] Gosub("PJSIP/104-0000000b", "recordcheck,1(dontcare,out,XXXXXXXXXX)") in new stack
    -- Executing [[email protected]:1] NoOp("PJSIP/104-0000000b", "Starting recording check against dontcare") in new stack
    -- Executing [[email protected]:2] Goto("PJSIP/104-0000000b", "dontcare") in new stack
    -- Goto (sub-record-check,recordcheck,3)
    -- Executing [[email protected]:3] Return("PJSIP/104-0000000b", "") in new stack
    -- Executing [[email protected]:8] Return("PJSIP/104-0000000b", "") in new stack
    -- Executing [[email protected]:3] ExecIf("PJSIP/104-0000000b", "0 ?Set(CDR(accountcode)=)") in new stack
    -- Executing [[email protected]:4] GosubIf("PJSIP/104-0000000b", "0?sub-diversion-header,s,1()") in new stack
    -- Executing [[email protected]:5] Set("PJSIP/104-0000000b", "MOHCLASS=default") in new stack
    -- Executing [[email protected]:6] ExecIf("PJSIP/104-0000000b", "1?Set(TRUNKCIDOVERRIDE=NNNNNNNNNN)") in new stack
    -- Executing [[email protected]:7] Set("PJSIP/104-0000000b", "_NODEST=") in new stack
    -- Executing [[email protected]:8] Macro("PJSIP/104-0000000b", "dialout-trunk,2,1XXXXXXXXXX,,off") in new stack
    -- Executing [[email protected]:1] Set("PJSIP/104-0000000b", "DIAL_TRUNK=2") in new stack
    -- Executing [[email protected]:2] GosubIf("PJSIP/104-0000000b", "0?sub-pincheck,s,1()") in new stack
    -- Executing [[email protected]:3] GotoIf("PJSIP/104-0000000b", "0?disabletrunk,1") in new stack
    -- Executing [[email protected]:4] Set("PJSIP/104-0000000b", "DIAL_NUMBER=1XXXXXXXXXX") in new stack
    -- Executing [[email protected]:5] Set("PJSIP/104-0000000b", "DIAL_TRUNK_OPTIONS=Ttr") in new stack
    -- Executing [[email protected]:6] Set("PJSIP/104-0000000b", "OUTBOUND_GROUP=OUT_2") in new stack
    -- Executing [[email protected]:7] GotoIf("PJSIP/104-0000000b", "1?nomax") in new stack
    -- Goto (macro-dialout-trunk,s,9)
    -- Executing [[email protected]:9] GotoIf("PJSIP/104-0000000b", "0?skipoutcid") in new stack
    -- Executing [[email protected]:10] Set("PJSIP/104-0000000b", "DIAL_TRUNK_OPTIONS=Tt") in new stack
    -- Executing [[email protected]:11] Macro("PJSIP/104-0000000b", "outbound-callerid,2") in new stack
    -- Executing [[email protected]:1] ExecIf("PJSIP/104-0000000b", "0?Set(CALLERPRES()=)") in new stack
    -- Executing [[email protected]:2] ExecIf("PJSIP/104-0000000b", "0?Set(REALCALLERIDNUM=104)") in new stack
    -- Executing [[email protected]:3] GotoIf("PJSIP/104-0000000b", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,6)
    -- Executing [[email protected]:6] Set("PJSIP/104-0000000b", "USEROUTCID=") in new stack
    -- Executing [[email protected]:7] Set("PJSIP/104-0000000b", "EMERGENCYCID=") in new stack
    -- Executing [[email protected]:8] Set("PJSIP/104-0000000b", "TRUNKOUTCID=NNNNNNNNNN") in new stack
    -- Executing [[email protected]:9] GotoIf("PJSIP/104-0000000b", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,14)
    -- Executing [[email protected]:14] ExecIf("PJSIP/104-0000000b", "1?Set(CALLERID(all)=NNNNNNNNNN)") in new stack
    -- Executing [[email protected]:15] ExecIf("PJSIP/104-0000000b", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [[email protected]:16] ExecIf("PJSIP/104-0000000b", "1?Set(CALLERID(all)=NNNNNNNNNN)") in new stack
    -- Executing [[email protected]:17] ExecIf("PJSIP/104-0000000b", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
    -- Executing [[email protected]:18] Set("PJSIP/104-0000000b", "CDR(outbound_cnum)=NNNNNNNNNN") in new stack
    -- Executing [[email protected]: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 [[email protected]:12] GosubIf("PJSIP/104-0000000b", "0?sub-flp-2,s,1()") in new stack
    -- Executing [[email protected]:13] Set("PJSIP/104-0000000b", "OUTNUM=1XXXXXXXXXX") in new stack
    -- Executing [[email protected]:14] Set("PJSIP/104-0000000b", "custom=DAHDI/g0") in new stack
    -- Executing [[email protected]:15] ExecIf("PJSIP/104-0000000b", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)Tt)") in new stack
    -- Executing [[email protected]:16] ExecIf("PJSIP/104-0000000b", "0?Set(DIAL_TRUNK_OPTIONS=TtM(confirm))") in new stack
    -- Executing [[email protected]:17] Macro("PJSIP/104-0000000b", "dialout-trunk-predial-hook,") in new stack
    -- Executing [[email protected]:1] MacroExit("PJSIP/104-0000000b", "") in new stack
    -- Executing [[email protected]:18] GotoIf("PJSIP/104-0000000b", "0?bypass,1") in new stack
    -- Executing [[email protected]:19] ExecIf("PJSIP/104-0000000b", "1?Set(CONNECTEDLINE(num,i)=1XXXXXXXXXX)") in new stack
    -- Executing [[email protected]:20] ExecIf("PJSIP/104-0000000b", "1?Set(CONNECTEDLINE(name,i)=CID:NNNNNNNNNN)") in new stack
    -- Executing [[email protected]:21] GotoIf("PJSIP/104-0000000b", "0?customtrunk") in new stack
    -- Executing [[email protected]: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 [[email protected]: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