There is no existence of 123@testing extension

The key point questions and replies should and could contribute to understand and helpful.
Good luck.

I’ve added another endpoint with a new context (phones) and the same issue is at the table:

PBX2*CLI> odbc show

ODBC DSN Settings

Name: asterisk
DSN: asterisk
Number of active connections: 1 (out of 1)
Logging: Disabled

PBX2*CLI> dialplan show
[ Context ‘phones’ created by ‘pbx_config’ ]
Alt. Switch => ‘Realtime/@’ [pbx_config]

-= 0 extensions (0 priorities) in 1 contexts. =-

When trying to dial 395:

[Jan 19 20:01:55] NOTICE[891]: res_pjsip_session.c:3960 new_invite: < REDACTED USERNAME >: Call (UDP:< REDACTED IP >:5061) to extension ‘395’ rejected because extension not found in context ‘phones’.

I’ve reloaded the dialplan, restarted the PBX, even rebooted the whole machine as a last resort but every time I’m getting the same result - extension not found in context ‘phones’. The context is there, switched to Realtime, the odbc connection is on-line, the records are there in the DB, but it doesn’t get recognized for some reason…

It can be quite useful, as long as you don’t think of the patterns being extensions, but only the concrete strings matched against them.

Especially when combined with the s priority, to repeat the last priority, you can opt out of a more general pattern for just specific extensions, or just specific caller IDs. You can also have the general pattern as a catchall.

If you want that _X.-extension line to be a common line to be executed after any of the prior lines, then give it a priority of “n”. There’s an example of this here. Quote:

Consider the dialplan below.
exten => 1234,1,Verbose("Valid Number")
exten => 4567,1,Verbose("Another Valid Number")
exten => _.!,1,Verbose("Catch all for invalid numbers")
exten => _.!,n,Verbose("Surprise - executed for all numbers!")

It may not be immediately intuitive, but the "_.!" extension with the "n" priority will be executed after any of the preceding lines are executed.

In my view, doing it like this makes it clearer that you are doubling up a priority, and also works for starting priorities other than 1:

exten => 1234,1,Verbose("Valid Number")
exten => 4567,s,Verbose("Another Valid Number")
exten => _.!,s,Verbose("Catch all for invalid numbers")
exten => _.!,n,Verbose("Surprise - executed for all numbers!")

I’d look for non-printable characters (e.g. byte order marks) and spaces), where not expected. I certainly seem to remember someone being caught out by byte order marks in the past.

Doesn’t seems to have such in the table. For simplicity I’ve added a new extension in context phones with only 1 priority. Same error from the CLI:

[Jan 20 07:12:58] NOTICE[5960]: res_pjsip_session.c:3960 new_invite: < USERNAME >: Call (UDP:< IP >:5061) to extension ‘1234’ rejected because extension not found in context ‘phones’.

What does s as priority mean? I can’t seem to find it in the documentation?

The same as n-1

It’s documented where most option were traditionally documented:

Ah… I were just looking in the wrong place then. I looked in the wiki. Guess I better make a mental note of always checking the sample configs in the future. :slight_smile:

What is the CLI output of dialplan show command “phones” ?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.