Asterisk responds with 404 Not Found

Asterisk PBXWhile configuring SIP/PJSIP in Asterisk you may notice that Asterisk responds with 404 Not Found to the OPTIONS request. To demonstrate the behavior let’s have a look at this PJSIP debug log example:

pjsip.conf looks like this:

extensions.conf looks like this:

The explanation can be found in RFC: an OPTIONS is supposed to be treated as if it were an INVITE, just without actually creating a call. For normal endpoints they have no concept of an extension so the phone would just ring and thus they return 200 OK pretty much always. In the case of Asterisk we are aware of extensions and as a result it would be looking for an extension named “username” in the context of the matched endpoint. So if we add a dummy extension there (such as one that just does a NoOp) it should change to returning 200 OK.

I hope this post clarifies the situation with Asterisk 404 Not Found!

Good luck!

 

Be sociable 🙂 Share!

Comments/Коментарі/Комментарии