Failed to call the Registered Users in Asterisk

I am a newbie to Asterisk. In the Sip Configuration file, I had enabled the general setting [Autocreatepeer = yes]. And I had registered two peers with the Asterisk server. I got 200Ok response for each registration.

                  When I attempted to call the second user from first user or vice versa, I am getting 404 user not found from the Server.

Can anyone explain whats the problem would be?

Thanks,
Vinoth Kumar

What is the output of the command [color=blue]sip show peers[/color] in the CLI for those peers :question:

Hi rogergscuall,

         Thanks for your reply. I am still facing the problem. 

Output of the command sip show peers in the CLI :

Name/username              Host            Dyn Nat ACL Port     Status              Â
userB/userB                (Unspecified)    D          0        Unmonitored          Â
userA/userA                (Unspecified)    D          0        Unmonitored   Â

Thanks,
Vinoth Kumar.

Take a look to this case:
asterisk*CLI> sip show peers
Name/username Host Dyn Nat ACL Port Status

8299/8299 (Unspecified) D 0 UNKNOWN

8705/8705 172.22.8.20 D 39716 OK (102 ms)

In this case the first is is a peer who is not registered in the system, in the second case the peer is registered. More or less work like this, when a peer try to authenticate one important parameter for the server to know is the IP address of the peer, because if anybody call to the peer the server most know to where place most forward the call, so I think that your peer are not in the system yet.
Put in the general context of the sip.conf the statement qualify=yes, to check if the peer are reachable, in the column “Status” in the command “sip show peers”.
Excuse me for my bad English.
Best Regard.

Hi rogergscuall,

    Once again thanks for your reply. 

    As you specified, I had Put in the general context of the sip.conf the statement "qualify=yes".

    Now the output of the command sip show peers in the CLI is :

Name/username              Host            Dyn Nat ACL Port     Status           Â
UserA/UserA Â Â Â 200.201.202.56 Â Â D Â Â N Â Â Â Â Â 24012 Â Â Â OK (61 ms)
UserB/UserB Â Â Â 200.201.202.215 Â D Â Â N Â Â Â Â Â 32547 Â Â Â OK (52 ms)

   But when I tried to make a Call to UserA from UserB or Vice-Versa, I am getting the following output in CLI :

  [Jul 15 09:46:07] NOTICE[24211]: chan_sip.c:13952 handle_request_invite: Call from 'UserA' to extension 'UserB' rejected because extension not found.

  Is it posssible to update the extensions.conf file dynamically while registering the peers.

Thanks
Vinoth Kumar.

Hi Vijay,
I Think the problem is with your dialplan.
please check out the following example.

sip.conf file contents:

[1000]
type=friend
context=incoming
username=1000
host=dynamic
qualify=yes
nat=no
canreinvite=yes
dtmfmode=info
port=5080

[2000]
type=friend
context=incoming
username=2000
host=dynamic
qualify=yes
nat=no
canreinvite=yes
dtmfmode=info
port=5070

now check out the sample contents of the extension.conf file:

[globals]
CONSOLE=Console/dsp
1000=SIP/1000
2000=SIP/2000
[general]
static=yes
writeprotect=no
clearglobalvars=no
autofallthrough=no

[default]
include=>incoming

[local]
include=>default

[incoming]
exten => 1000,1,Dial(SIP/1000,30)
exten => 2000,1,Dial(SIP/2000,30)

So the context in the sip.conf file tag for each extension
must match with the tag in the extension.conf file.

e.g. in the above sample the tag is [incoming] in both the files and set it the default tag too.
This sample is working for me.

Regards,
Vishal.