SIP extension gives 404 error

General discussions about AsteriskNOW.

Moderators: Moderator, Support

SIP extension gives 404 error

Postby Ken4ward » Thu Feb 21, 2013 1:49 pm

Please, I just got asterisk and A2Billing installed on a Dedicated Virtual Server, and I try to create SIP extensions just to try out the functionality. When I configured the SIP extension thus:


-------------------sip.conf--------------------
musiconhold=default
port=5090 ; Port to bind to (SIP is 5090)
bindaddr=210.32.18.51 ; Address to bind to (all addresses on machine)
disallow=all ; First, disallow all codecs, then allow codecs one by one
allow=ulaw
allow=alaw
context = from-sip-external ; Send unknown SIP callers to this context
callerid = Home
nat=yes ; Important if your Asterisk server and extensions are behind NAT
qualify=yes
canreinvite=no
dtmfmode=rfc2833

--------------------first extension---------------
[101]
user=101
type=friend
secret=1234
host=dynamic
callerid = Ken4ward
context=home

----------------second extension-----------------------------
[102]
user=102
type=friend
secret=1234
host=dynamic
callerid = Taiwo
context=home
------------------------------------sip.conf-------------------

------------------------------extension.conf-----------------
[general]
[home]
exten => 101,1,Dial(SIP/101)
exten => 102,1,Dial(SIP/102)
-------------------------extension.conf--------------------

When I configure both extension on 2 SIP phones they connected, but when I try to dial one from another, it's always giving this error: "Not found (404)". I have tried searched for the solution but could not, please kindly help!!!!
Note, I am not using freePBx, i am working directly in Asterisk files. Thanks. God bless.
Ken4ward
Newsterisk
 
Posts: 7
Joined: Thu Jul 19, 2012 6:56 am

Re: SIP extension gives 404 error

Postby david55 » Thu Feb 21, 2013 4:23 pm

Set allowguest = no, and see if that changes the error.

Provide CLI output at at least verbosity 3.

(You may end up being asked for full logging with sip debugging and general debugging enabled.)

-----

SIP is not port 5090. and your comment on the IP address is also wrong.

You probably don't need nat, and yes is a deprecated value.

canreinvite is a deprecated name.

For most people, type should be peer (security and avoiding false matches from caller ID).

Making the device name the same as one of extensions that accesses it makes life easier for hackers and leads to a failure to realise that they are not the same thing.
david55
Moves Like Spencer
 
Posts: 12570
Joined: Fri Sep 26, 2008 5:03 am

Re: SIP extension gives 404 error

Postby Ken4ward » Fri Feb 22, 2013 3:09 am

Yes, the error changed to "forbidden bad auth (403)"

[general]

musiconhold=default

port=5060 ; Port to bind to (SIP is 5060)
bindaddr=210.32.18.51 ; Address to bind to.
disallow=all ; First, disallow all codecs, then allow codecs one by one
allow=ulaw
allow=alaw
context = from-sip-external ; Send unknown SIP callers to this context
callerid = Home
;nat=yes ; Important if your Asterisk server and extensions are behind NAT
qualify=yes
;canreinvite=yes
dtmfmode=rfc2833
allowguest=no

[101]
user=101
type=peer
secret=1234
host=dynamic
callerid = Ken4ward
context=resident

[102]
user=102
type=peer
secret=1234
host=dynamic
callerid = Taiwo
context=resident

I think this is because of my shallow knowledge in Asterisk. This is my second day of trying out Asterisk sip.conf file. I re-posted this so that you can see how I set things now. Maybe you noticed that in the global declaration the context I set is "from-sip-external", though I met it this way in the documentation I followed online, and the context when defining parameters for the extensions is "resident". could these be the problem? Thanks for your support.
Ken4ward
Newsterisk
 
Posts: 7
Joined: Thu Jul 19, 2012 6:56 am

Re: SIP extension gives 404 error

Postby david55 » Sun Feb 24, 2013 9:14 am

The section name, user name or password are wrong.
david55
Moves Like Spencer
 
Posts: 12570
Joined: Fri Sep 26, 2008 5:03 am


Return to AsteriskNOW General

Who is online

Users browsing this forum: No registered users and 1 guest