Outbound calling giving error " number disconnected&quo

Hey thanks to Bwilks, I am now getting this when I call outbound. The below code is blurb from the asterisk console when I call from my softphone to a localnumber. Is this something to do with my provider or is this to do with my outbound plan which looks likes my below example.

Asterisk blurb:

-- Executing [3901550@default:1] Dial("SIP/4001-b7805ba0", "IAX2/FuguPhoneOUT/901550") in new stack
    -- Called FuguPhoneOUT/901550
    -- Call accepted by 216.187.103.188 (format ulaw)
    -- Format for call is ulaw
    -- IAX2/FuguPhoneOUT-7 answered SIP/4001-b7805ba0
    -- Hungup 'IAX2/FuguPhoneOUT-7'
  == Spawn extension (default, 3901550, 1) exited non-zero on 'SIP/4001-b7805ba0'

extensions.conf

[outbound]
exten => _NXXXXXX,1,Dial(${OUTBOUNDTRUNK}/${EXTEN:1})
exten => _NXXXXXX,n,Congestion()
exten => _NXXXXXX,n,Hangup()

exten => 1NXXNXXXXXX,1,Dial(${OUTBOUNDTRUNK}/${EXTEN:1})
exten => 1NXXNXXXXXX,n,Congestion()
exten => 1NXXNXXXXXX,n,Hangup()

exten => 911,1,Dial(${OUTBOUNDTRUNK}/911)
exten => 9911,1,Dial(${OUTBOUNDTRUNK}/911)
include => default

Is there a problem in my outbound extensions? When I call outbound, it tells me an error " number disconnected, please try again"

What number are you trying to call I think you are missing the first digit?

  1. 3901550
    or
  2. 901550

Strips off the first digit
${EXTEN:1}

Strips off 0 digits
${EXTEN:0}

Strips off 0 digits
${EXTEN}

The number i am trying to call is 3901550, what would hte outbound look like if i were to call 12503901550 which is how we call long distance to this area in Canada too?

Ok,

${EXTEN:1}) takes off the first digit 3 so you were dialing

“IAX2/FuguPhoneOUT/901550”

It should look like this;

[outbound]
exten => _NXXXXXX,1,Dial(${OUTBOUNDTRUNK}/${EXTEN:0})
exten => _NXXXXXX,n,Congestion()
exten => _NXXXXXX,n,Hangup()

;You need the _ to tell Asterisk you are pattern matching
exten => _1NXXNXXXXXX,1,Dial(${OUTBOUNDTRUNK}/${EXTEN:0})
exten => _1NXXNXXXXXX,n,Congestion()
exten => _1NXXNXXXXXX,n,Hangup()

Dowload this book from Digium on page 137 are the details on pattern matching.

digium.com/elqNow/elqRedir.h … 510480.pdf

Bwilks, you are a god among men. Thanks very much, both of these two small fixes and additional info have saved me from giant headaches. In the next few days I might have a couple questions for you regarding some of the incomign routing I am setting up.

Thanks again. :smile:

Thanks for the kind words; I am not a Asterisk God or Guru but I will share what I know.

Here is a quote don’t know where it came from.

“The more you share the more you know”

I too found Asterisk a steep learning curve; I have learned quite a lot by reading the forums and trying to solve the problems of others.