Summary:ASTERISK-22096: chan_pjsip - when dialing an endpoint that is misconfigured, debug could be more helpful in regards to whether Asterisk found a matching AOR or not
Reporter:Rusty Newton (rnewton)Labels:
Date Opened:2013-07-17 15:50:17Date Closed:2013-08-20 13:47:57
Versions:SVN 12 Frequency of
[Jul  5 14:34:54] DEBUG[9021][C-00000000]: pbx.c:4649 pbx_extension_helper: Launching 'Dial'
   -- Executing [6001@otherinternal:1] Dial("Gulp/6002-00000000", "GULP/6001") in new stack
[Jul  5 14:34:54] ERROR[9007]: chan_gulp.c:1536 request: Unable to create Gulp channel - endpoint '6001' was not found
[Jul  5 14:34:54] WARNING[9021][C-00000000]: app_dial.c:2420 dial_exec_full: Unable to create channel of type 'GULP' (cause 3 - No route to destination)

The above debug occurs when you have an endpoint and AOR configured correctly, *except* for the aors option on the endpoint. In this case I had "aor=" instead of "aors=".

We need debug to indicate that Asterisk is looking for an AOR associated with 6001 and that it wasn't found. Without knowledge of the source that is my understanding of what is happening from various conversations with devs.

It does currently point you to a problem with an endpoint and for someone like me that means I'll scrutinize the endpoint configuration letter by letter, but if there is a way we can have it point towards the issue with finer detail that is always better.
Comments:By: Mark Michelson (mmichelson) 2013-08-20 13:47:57.960-0500

I'm going to close this issue with no fix being made.

The problem in your scenario is that since you specified {{aor=}} instead of {{aors=}}, the config framework was unable to create the endpoint when res_pjsip.so loaded. Thus when you tried to dial the endpoint, you got the error message telling you the endpoint was not found. By the time that the dial occurs, it's too late to know why the endpoint did not get created; it's simply not there.

If you check warnings and errors on startup, you would find that the config framework threw out an error stating that it did not know how to handle the {{aor}} option for an endpoint and that it therefore could not create the endpoint. I suspect that this just got buried with the other myriad of messages that Asterisk throws out at startup, so you missed it.

As it stands, the messages that inform you what went wrong are there, and they're printed at the time the error occurs, so there's nothing further that can be done to improve the situation.