Cant dial out!

hello all,
first of all let me apologize for any “silly questions” i might have though im a newbie concerning asterisk so bear with me :smile:

ive setup asterisk a few days ago…
i have 4 Vonage lines who i have analog access on…
and 1 PSTN line…
i’ve successfully tested the SIP where i could call from 1 extension to another as soon as i add those extensions in both Sip.conf and Extensions.conf
though the thing is i cant call out! and thats obviously the main idea i got into this from the first place…
ill provide a list of configurations ive made so far… as well as the error am getting in CLI when i try to dial out…



static = yes
writeprotect = no
autofallthrough = no
clearglobalvars = no

exten => _X.,1,Dial(sip/${EXTEN},20,rt)
exten => _X.,1,Dial(zap/${EXTEN}@7,20,rt)


what might b the cause of that?
whts the mistake ive done!

Where is this in your configs @7?
What do you zaptel.conf and zapata.conf look like

sorry bout tht… heres my zaptel and zapata


channel => 1
channel => 7



Autogenerated by /usr/sbin/genzaptelconf – do not hand edit

Zaptel Configuration File

This file is parsed by the Zaptel Configurator, ztcfg

It must be in the module loading order

Span 1: WCTDM/0 “Wildcard TDM2400P Board 1” (MASTER)


channel 13, WCTDM, no module.

channel 14, WCTDM, no module.

channel 15, WCTDM, no module.

channel 16, WCTDM, no module.

channel 17, WCTDM, no module.

channel 18, WCTDM, no module.

channel 19, WCTDM, no module.

channel 20, WCTDM, no module.

channel 21, WCTDM, no module.

channel 22, WCTDM, no module.

channel 23, WCTDM, no module.

channel 24, WCTDM, no module.

Global data

loadzone = us
defaultzone = us

The following in Extensions.conf is incorrect:

exten => _X.,1,Dial(sip/${EXTEN},20,rt)
exten => _X.,1,Dial(zap/${EXTEN}@7,20,rt) 
  1. The reason is because you have the same extension twice. How does asterisk know if it should go out through SIP or zap.
  2. Your coding is wrong. For the SIP if it is going to an external provider you would need to set which peer it is using. For the zap calls you would need to set group or zap channel that you want to use. You may want to use something like

Exten => _1XX,1,Dial(SIP/${EXTEN}) ; This will dial locally any to sip any 3 digit number dialed that starts with a 1.
Exten => _X.,1,Dial(Zap/g1/${EXTEN}) will dial out through Zap group 1

oh ur right! i didnt pay attention to that…
though could u point me to the right direction of creating a zap group!

in Zapata.conf set group=1 and then you can use Dial(ZAP/g1/${EXTEN})

k i went into zapata.conf and did this:

channel => 1
channel => 7

then i went to extensions.conf and set

Exten => _X.,1,Dial(Zap/g2/${EXTEN})

ps: channel7 if the one tht has the vonage analog line

And what happens when you tried to make a call ? Can you post the output of the CLI ?

[Mar 25 15:32:08] NOTICE[7697]: manager.c:1015 authenticate: tried to authenticate with nonexistent user ‘admin’
== Connect attempt from ‘’ unable to authenticate
– Executing [7142804204@users:1] Dial(“SIP/179-b6101ad0”, “Zap/g2/7142804204”) in new stack
[Mar 25 15:32:09] DEBUG[7698]: chan_zap.c:1947 zt_call: Dialing ‘7142804204’
[Mar 25 15:32:09] DEBUG[7698]: chan_zap.c:2023 zt_call: Deferring dialing…
– Called g2/7142804204
– Zap/7-1 answered SIP/179-b6101ad0

I am not sure what GUI you are using but it seems that the AMI is not set up correct. As far as the actual call the CLI is showing that the call went through.

am using FreePBX as a gui…

ps: whats an “AMI” ?

though i prefer doing it manually to know whts going on…
cos ive used lots of guis and its not working…

You can then not set it manually because FreePBX will over write your settings. The AMI is the API that asterisk has so that you can connect to it with your own custom code and run different things.

oh ok…
well how can i fix it then!

this is my Manager.conf

File Edit Options Buffers Tools Help
; Asterisk Call Management support

; By default asterisk will listen on localhost only.
enabled = yes
port = 5038
bindaddr =

; No access is allowed by default.
; To set a password, create a file in /etc/asterisk/manager.d
; use creative permission games to allow other serivces to create their own
; files
#include “manager.d/*.conf”

When you edit manager.d/*.conf what do you get ? It seems to be connecting with user admin how ever I could not tell you what to change manager.conf since I don’t know what password they are using.

well i never edited manager.conf nor manager.d
this is the first time i hear about them honestly…

anyway this is the content of manager.d

File Edit Options Buffers Tools Operate Mark Regexp Immediate Subdir Help
used 20 available 15400812
drwxrwx— 2 asterisk asterisk 4096 2008-03-20 10:13 .
drwxrwx— 3 asterisk asterisk 12288 2008-03-25 16:13 …
-rw-rw---- 1 asterisk asterisk 249 2007-05-01 17:14 op-panel.conf

as for manager.conf its still the same as the previous post… didnt change anything