Matching on Caller ID not work

Sorry for my english.
OS FreeBSD 10.3-RELEASE amd64, Asterisk 13.9.1
Not work matching on caller ID in diaplan.
Config file extensions.conf:

[general]
autofallthrough=yes

[uz-out]
exten => 56012/_799,1,NoOp()
 same => n,Set(CALLERID(all)=380000055576)
 same => n,Dial(PJSIP/${EXTEN}@uz_endpoint,60,TKr)
 same => n,Hangup()

[internal]
exten => _[7-8]XX,1,NoOp()
 same => n,GotoIf($["${DEVICE_STATE(PJSIP/${EXTEN})}" = "INVALID"]?number_invalid)
 same => n,GotoIf($["${DEVICE_STATE(PJSIP/${EXTEN})}" = "UNAVAILABLE"]?number_exists)
 same => n,Dial(PJSIP/${EXTEN},60,tk)
 same => n,Hangup()
 same => n(number_invalid),Playback(privacy-incorrect)
 same => n,Hangup()
 same => n(number_exists),Playback(ss-noservice)
 same => n,Hangup()

[phones]
include => parkedcalls
include => internal
include => uz-out

When i call from 799 on 56012, get error:
NOTICE[101013] res_pjsip_session.c: Call from ‘799’ (UDP:192.168.9.41:5060) to extension ‘56012’ rejected because extension not found in context ‘phones’.

If chenged in diaplan row exten => 56012/_799,1,NoOp() on exten => 56012,1,NoOp(), call worked without error.

Any idea?

I believe you need a priority 1 for your extension, not just for the extension with the ex-girlfriend logic.

An example:

exten => 7106/5205551212,1,Dial(LOCAL/7106@fwd,60)
exten => 7106,1,Gosub(sub-stdexten2,${EXTEN},1(SIP/${EXTEN}))

Thanks for the answer.
I tried to set up similar to your example but I could not. Then I tested on FreeBSD 10.3-RELEASE i386. It worked on the first try. I think the problem is in the OS FreeBSD 10.3-RELEASE x64.

Topic is closed.