Asterisk does not dial out, but allows calls in

I’m using Asterisk @ Home 2.8 with a Digium TDM11B in the UK. The fxo card is in port 4, the fxs card is in port 1. I have the phone-line connected to port 4 and the phone unit to port 1.

My /etc/zaptel.conf is:
fxoks=1
fxsks=4
loadzone=uk
loadzone=uk

My /etc/asterisk/zapata.conf includes:
echocancel=yes
echocancelwhenbridged=yes
echotraining=400
callerid=
signalling=fxo_ks
group=1
context=default
channel => 1

signalling=fxs_ks
callerid=asreceived
group=2
context=incoming
channel => 4

My /etc/asterisk/extensions.conf is:
[globals]
OUTBOUNDTRUNK=Zap/4

[incoming]
exten => s,1,Wait(1)
exten => s,2,Answer()
exten => s,3,Playback(hello-world)
exten => s,4,Hangup()

[outbound]
exten => _9XXXXXXXXXXX,1,Dial($(OUTBOUNDTRUNK)/${EXTEN:1})
exten => _9XXXXXXXXXXX,2,Congestion()
exten => _9XXXXXXXXXXX,102,Congestion()

The _9XXXXXXXXXX should allow me to call number like
07770 123456
using a 9 prefix from the phone, if I understand the documentation correctly.

Some of this information was from the supplier of the card and others were from Asterisk O’Reilly book.

Incoming calls work as expected, but as soon as I attempt to use my phone to dial a number, it hangs up. I hear a dial-tone to begin with, but pressing a single button makes it hang up. The log from Asterisk is:
–Starting simple switch on ‘Zap/1-1’
–Hungup ‘Zap/1-1’

What is wrong? This is really confusing. I’m a newbie to Asterisk so if there is something I have missed above, please point it out.

Need your sip.conf, however it sounds like you have immediate=yes

Thanks for your reply. I’ve made a little more progress since my posting. I set the context on channel 1 in /etc/asterisk/zapata.conf to outbound to match the entry in /etc/asterisk/extensions.conf.

I can now dial the number, but once the number is entered, Asterisk issues the following error:
–Executing Dial (“Zap/1-1”, “$(OUTBOUNDTRUNK)/${EXTEN:1}”) in new stack
==Everyone is busy/congested at this time (1:0/0/1)

So, I’ve got a little further :smile:

In reference to your other questions, I’m not using SIP, so the config file is unchanged from Asterisk @ Home default. Here it is:

[general]
bindport=5060
bindaddr=0.0.0.0
disallow=all
allow=ulaw
allow=alaw
context = from-sip-external
callerid = Unknown

#include sip_nat.conf
#include sip_custom.conf
#include sip_additional.conf
#include additional_a2billing_sip.conf

With regards to your other point re: immediate=yes, it is actually set to no. The previous /etc/asterisk/zapata.conf listing was not 100% complete. Here is all of it:

[trunkgroups]

[channels]

language=en
context=from-pstn
signalling=fxs_ks
rxwink=300

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=incoming

#include zapata-auto.conf

group=1

echocancel=yes
echocancelwhenbridged=yes
echotraining=400
callerid=

signalling=fxo_ks
group=1
context=outbound
channel => 1

signalling=fxs_ks
callerid=asreceived
group=2
context=incoming
channel => 4

The instructions from the supplier told me to just paste the lines I previously supplied at the bottom, so that is what I done as shown above.

Hi

From what I can see you have two contexts , incoming and outgoing. the zap channels are incoming for the fxo and default for the fxs, have you included the outgoing context in the default context ? if not thats why you cant dial out.

Thanks for your reply. My last posting addressed this. You are correct, I made a mistake in the original config I supplied. Now

/etc/asterisk/zapata.conf makes reference to
context=outbound
channel => 1

context=incoming
channel => 4

and /etc/asterisk/extensions.conf now has two sections:
[incoming]
[outbound]
to match the zapata.conf file.

I now have a new error, once the number is actually entered.
–Executing Dial (“Zap/1-1”, “$(OUTBOUNDTRUNK)/${EXTEN:1}”) in new stack
==Everyone is busy/congested at this time (1:0/0/1)

Opps sorry even I missed this typo

should be

Ian

Wonderful. It now works :smile:

Thank-you very much to both of you for your help.

I am having a similar problem, However I am using the default context of from-pstn that Asterisk@Home comes set up with. I have a thread started here:http://forums.digium.com/viewtopic.php?p=21175#21175

Can you help me see how the solution from this thread might help me, or maybe if there is something else I need to do?

Thank you!