Help with zap trunk

Hi, I recently installed asterisk@home 2.8 and I have some issues with the zap trunk. I follow the guide and I have almost everything running, I can recive call from the PSTN but i cann’t make calls to the PSTN I only make calls to another extension. I’m already define a trunk in the freepbx with these parameters
outbound caller ID: 5838080
maximun channels: 1
outbound dial prefix: 9
zap identifier(trunk name): 1

I have a Wildcard TDM400P

;Zapata.conf
; Zapata telephony interface
;
; Configuration file

[trunkgroups]

[channels]

language=en
context=from-pstn
signalling=fxs_ks ; Use FXS signalng for an FXO Channel (extension)
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 genzaptelconf configs
#include zapata-auto.conf

group=1

;Include AMP configs
#include zapata_additional.conf


; Zapata-auto.conf
; Autogenerated by /usr/local/sbin/genzaptelconf – do not hand edit
; Zaptel Channels Configurations (zapata.conf)
;
; This is not intended to be a complete zapata.conf. Rather, it is intended
; to be #include-d by /etc/zapata.conf that will include the global settings
;
callerid=asreceived

; Span 1: WCTDM/0 "Wildcard TDM400P REV I Board 1"
signalling=fxo_ks
; Note: this is an extension. Create a ZAP extension in AMP for Channel 1
context=from-internal
group=1
channel => 1

; channel 2, WCTDM, inactive.
; channel 3, WCTDM, inactive.
signalling=fxs_ks
; Note: this is a trunk. Create a ZAP trunk in AMP for Channel 4
context=from-pstn
group=0
channel => 4

; Span 2: ZTDUMMY/1 “ZTDUMMY/1 1”

So if anyone knows what i did wrong or what step i missed i will apriciate your help.

I have exactly this same issue. Inbound calls are fine, outbound not working (doesn’t matter whether or not I have callwaiting disabled).

Symptom we get is remote party on PSTN actually rings and answers, and there is two-way audio, but there is also ringing tone audible to either asterisk-side calling party, and when the timeout parameter of Dial command is reached, call is ended without either party disconnecting.

Seems like Asterisk never gets the signal that call is answered, even though there is 2-way audio in the call!

In another scenario, when the call fails on PSTN for some reason, there is reorder tone and the “We’re sorry, your call did not go through as dialed” at the same time as ringing tone still heard.

We are not using the ‘r’ option with the dial command, so don’t know where the extra ringing is coming from