Can call without local area code from siptrunk context & can't from from-internal

My problem that I can call without local area code from trunk context (context=from-trunk-sip-outgoing-Trunk) and can’t call without local area code from outbound route context (“from-internal”).

I install FreePBX w/*1.8 and can’t call to any my city phonenumber. I add in Outbound Route template full area code (prepend) of my city and after that I can call. The strange is next.
I install Elastix (*1.8 too) and all calls to my city phonenumbers go without any area codes. WOW, thats very good told I. And in Elastix Outbound Route I has only dot in match pattern.
Today I connect to Elastix’у Custom Contexts FreePBX module. I create 2 new customcontext, add one more outbound route, applied changes AND calls no works again!
Again they begin to work only after adding area code to outbound template. I delete CustomContext module, but calls without local area code no works, no more.
“Very strange” I think, and I tried find diff’s between old and new logs.
The old Elastix calls without any area code:
[Jul 6 11:32:10] VERBOSE[8526] pbx.c: – Executing [[email protected]:3] ExecIf(“SIP/outgoing-Trunk-00000209”, “1?Set(REALCALLERIDNUM=566401)”) in new stack
(“outgoing-Trunk” is name of my trunk in Trunk Outgoing Settings, 566401 is number of citizen of my city to whom I tried to call).

The new logs after enable and disable CustomContext module with area code dial:
Executing [[email protected]:2] ExecIf(“SIP/170-00000001”, “0?Set(REALCALLERIDNUM=170)”) in new stack

(170 is my extension, usual ATA-phone from which I always made calls).

So? - Earlier Elastix calls as SIP/outgoing-Trunk, but now as SIP/170
In config files I found in sip_additional.conf - 170th extension placed in context=from-internal, but trunk Outgoing settings in context=from-trunk-sip-outgoing-Trunk

If manual move 170th extension to context from-trunk-sip-outgoing-Trunk then I again make calls to city without any local area code.
Tell me please, how I should setup extensions to give calls without local area code.
If outgoing-Trunk can call without any local area code where I am mistaken?
Thank you.

Most SIP providers require you to call a fully qualified number, because they don’t know from which “area code” you are calling from.

Elastix questions should be taken to the Elastix Forums as they don’t use a legitimate FreePBX, just a years old hacked up version, so no one here can reasonably help you.

Good Luck.