Outbound call

hello is that I am new to this PBX and my calls outbound no found, below do go all the data so that they can help me

-Buy and install a a1200p OpenVox card and install the program me well (it seems)
-I have 12 lines analog with the company astel and connect and all LEDs are green
-Configure my SIP extensions with the program x-lite works fine if I enter extensions framework between the call without any problem

I want to do is 12 extensions with the program x lite an call out for any analog line, but I do not know how

These are my doubts and I can not make it work

-I read several manuals and they say I believe in the extensions in zap
-And create the extensions zap but I do not connect to the program x lite, there’s my first problem, but I do not know how
-Second problem, as I create the trunks to operate
-Finally as the outbound routes set up so work that only the call national

chan_dahdi.conf is bellow:

;
; DAHDI telephony
;
; Configuration file

[trunkgroups]

[channels]

language=en
context=from-zaptel
signalling=fxs_ks
rxwink=300 ; Atlas seems to use long (250ms) winks
;
; Whether or not to do distinctive ring detection on FXO lines
;
;usedistinctiveringdetection=yes

usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
;echotraining=800
rxgain=0.0
txgain=0.0
group=0
callgroup=1
pickupgroup=1
immediate=no

;faxdetect=both
faxdetect=incoming
;faxdetect=outgoing
;faxdetect=no

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

group=1

;Include PBXconfig configs
#include chan_dahdi_additional.conf


dahdi-channels.conf is bellow:

; Span 1: OPVXA1200/12 “OpenVox A1200P/A800P Board 13” (MASTER)
;;; line="1 OPVXA1200/12/0 FXSKS"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 1
callerid=
group=
context=default

;;; line="2 OPVXA1200/12/1 FXSKS"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 2
callerid=
group=
context=default

;;; line="3 OPVXA1200/12/2 FXSKS"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 3
callerid=
group=
context=default

;;; line="4 OPVXA1200/12/3 FXSKS"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 4
callerid=
group=
context=default

—so until 12


chan_dahdi_additional.conf is bellow:

;;;;;;[101]
signalling=fxo_ks
pickupgroup=
mailbox=101@device
immediate=no
echotraining=800
echocancelwhenbridged=no
echocancel=yes
context=from-internal
callprogress=no
callgroup=
callerid=device <101>
busydetect=no
busycount=7
accountcode=
channel=>1

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


I need help I need to do that and try everything, and sorry my English is bad

If you are using DAHDI you need to configure the system.conf like :

fxsks=1-12 ;all channels are fxo echocanceller=mg2,1-4 loadzone = mx ;your zone here defaultzone = mx

Then the chan_dahdi.conf something like:

language=es context=from-pstn usecallerid=yes hidecallerid=no callwaiting=no canpark=no usecallingpres=yes callwaitingcallerid=no threewaycalling=yes transfer=yes cancallforward=no callreturn=yes echocancel=yes echocancelwhenbridged=no echotraining=yes rxgain=0.0 txgain=0.0 busydetect=yes busycount=4 callprogress=no accountcode=Telmex amaflags=default signalling=fxs_ks group=1 callerid=asreceived mohinterpret=default mohsuggest=default channel => 1-12

Then in your dialplan create outgoings rules, a generic rule maybe be:

exten=>9XXXXX.,1,dial(Dahdi/r1/${EXTEN:1}) exten=>9XXXXX.,2,hangup()

The line Dahdi/r1/${EXTEN:1} means that the asterisk will use a channel dahdi, r1 means round robin for all lines the firs call will call trough channel 1 the next for channel 2 and so on. the ${EXTEN:1} means: catch the number dialed and strip the first digit, so if you dial 91234567 asterisk will dial 1234567.

And finally the inbound route in your dialplan something like:

[from-pstn] ;the context that you define exten=> s, 1, answer() exten=>s,n,background(yourivr) exten=>s,n,dial(your extensions)

The above code is for all lines if you prefer you can set your DIDs individually. And don’t forget include the extensions context to inbound and outbound context