Asterisk - Rejected because extension not found

I am new to Asterisk. I just did a new Asterisk installation (Fedora 10) and created a SIP trunk to my VOIP provider. I will only make use of a VOIP provider for calls made to the outside world - no telephone lines will be connected to this server - only broadband internet to create SIP trunk.

They assisted me in setting up the SIP trunk. I can make calls to other phones on my LAN as well as dialing out to outside numbers via the SIP trunk. The only problem I experience is that I cannot make calls to the Asterisk box from outside the network (landlines, mobile phones, etc.)

I am not sure how to route the assigned DID numbers to my extensions of the phones connected to my Asterisk server.

I get the following error:
 NOTICE[8346]: chan_sip.c:15228 handle_request_invite: Call from '1763589206' to extension '1763589206' rejected because extension not found.

At the end of the day I only want the following:
1. Phones must be able to call each other inside the network
2. Phones must be able to call the outside world via the SIP trunk
3.The outside world must be able to call the provided DID numbers and it must be routed via the SIP trunk to my asterisk box and from there to the corect internal extension (phone)
4. Mailboxes must be enabled for each phone

Can someone please assist me.

SIP.CONF:
[general]
disallow = all          ;do not allow any codecs
allow = alaw
allow = ulaw
allow=g729
register=1763589206:xxx-my.secret-xxx@sip.voip-sa.co.za/1763589206

[VoIPSA_Out]
username=1763589206
type=peer
secret= xxx-my.secret-xxx
qualify=400
insecure=port,invite
host=sip.voip-sa.co.za
nat=yes
disallow=all
context=office
canreinvite=no
authuser= 1763589206
allow=g729

[100]
type = peer            
secret = 100w3rn3r      
call-limit = 1
host = dynamic        
context = office

[101]
type = peer            
secret = 101w3rn3r      
call-limit = 1
host = dynamic        
context = office

EXTENSIONS.CONF:
[general]
autofallthrough = no

[globals]
office = _3XX
trunk2=00X
trunk1=0|0027+[1-9][1-9]XXXXXXX
joburg = _011XXXXXXX
national = _0[1-5]XXXXXXXX
mobile1 = _07[1-9]XXXXXXX
mobile2 = _08[1-4]XXXXXXX
international = _00.


[office]
include=features

exten => _0[1-9].,1,Dial(SIP/VoIPSA_Out/${EXTEN},120)
exten => _0[1-9].,n,Hangup()

exten => _00[1-9].,1,Dial(SIP/VoIPSA_Out/${EXTEN},120)
exten => _00[1-9].,n,Hangup()

exten => 100,1,Dial(SIP/100,10,tTj)              
exten => 100,2,VoiceMail(100)

;exten => 100,102,Busy()                                
exten => 100,102,Queue(reception,t,,,180)      
exten => 100,103,VoiceMail(100)

exten => 101,1,Dial(SIP/101)
exten => 101,2,VoiceMail(101)

exten => 102,1,Dial(SIP/102)
exten => 102,2,VoiceMail(102)


chosen-oneAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

naulivCommented:
Hello Chosen,

Welcome to the wonderful world of Asterisk!
The error message you are receiving indicates that it can't find the destination number:  1763589206

When looking at your [office] context, there is indeed no match for this number...

Assuming that you want calls to this number to ring the phone SIP/101, you will need to add the following lines to the [office] context:

exten => 1763589206,1,Dial(SIP/101)
exten => 1763589206,n,Voicemail(101)

If you have several consecutive DIDs (such as 1763589206, 1763589207, 1763589208, ...), a more elegant approach is to create SIP extensions that matches the last 3 digits (in this example, it would be SIP/206, SIP/207, SIP/208), and use a dialplan like this:

exten => _176358920X,1,Dial(SIP/${EXTEN:7})
exten => _176358920X,n,Voicemail(${EXTEN:7})


Let us know if you have any question!

Good Luck.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
chosen-oneAuthor Commented:
Hello nauliv,

Thanks for your quick response!

The number 1763589206 is not  actually the DID number - it is the account name from my VOIP provider in order to create the SIP trunk.
[VoIPSA_Out]
username=1763589206  <<<<<<<<<<<<<<<<<<<<
type=peer
secret= xxx-my.secret-xxx


The actual DID numbers look different : 087 XXX 950,  087 XXX 951, etc.

How do I route the 087 DID's to the internal extension numbers?

Looking forward to your reply :-)




0
chosen-oneAuthor Commented:
nauliv,

I added the following as suggested by you:
exten => 1763589206,1,Dial(SIP/101)
exten => 1763589206,n,Voicemail(101)

I can dial from the outside and it rings at extension 101 :-)  !!!!  Thanks you very much.

But the weird thing is that when I dial any of the DID's asigned to me (087 XXX 950,  087 XXX 951, etc.) then it rings on extension 101 - all ring on the same phone ?!

Do you know how to split it to ring on different extensions as required?

Thanks  so far for the help !

0
naulivCommented:
Hi There,

Well, Asterisk is pretty clear in its error message:
"to extension '1763589206' rejected"

This means that Asterisk is looking for an extension to match "1763589206"...
Add the lines below in your office context, reload the dialplan and it should ring your phone SIP/101 !

exten => 1763589206,1,Dial(SIP/101)
exten => 1763589206,n,Voicemail(101)

Have fun !
0
chosen-oneAuthor Commented:
Hi,


nauliv,

I added the following as suggested by you:
exten => 1763589206,1,Dial(SIP/101)
exten => 1763589206,n,Voicemail(101)

I can dial from the outside and it rings at extension 101 :-)  !!!!  Thanks you very much.

But the weird thing is that when I dial any of the DID's asigned to me (087 XXX 950,  087 XXX 951, etc.) then it rings on extension 101 - all ring on the same phone ?!

Do you know how to split it to ring on different extensions as required?

Thanks  so far for the help !
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
IP Telephony

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.