In outbound routes, what is a "Dial sequence" and how can I create one?

I am trying to create an inbound route that sends everything from a specific area code somewhere, however in the “CallIerID number” section, it suggests I can use a “Dial Sequence.” but I can’t seem to find information on what a “Dial Sequence” is, how to create one.
Can someone give me an idea of how do do this, what “Dial Sequence” would work to send all calls from area code 201 to somewhere?

So if you want all calls from area code 201 to route somewhere, in the CallerID field you would put

201NXXXXXX

Thank you. And can you explain what exactly that means? 201 is obviously the area code, but what about N? And why are there 6 X’s, and not 7? Or does that N mean something AND a digit? Or is X a digit?

NXXXXXX is the 7 digits that follow the area code. N is any digit 1-9 and X is any digit 0-9. No office codes (the first 3 digits after the area code) start with 0 so it should be N.

So then if I understand correctly 201XXXXXXX would work, but 201NXXXXXX is the proper way because N could never be a 0?

Yeah either way would work.

So, for some reason 201NXXXXXX is not working. I seem to be unable to obtain the log correctly as the example shows a file name that isn’t provided.

root@freepbx ~]# grep  1738340617.7 /var/log/asterisk/full*
/var/log/asterisk/full:[2025-01-31 11:23:37] VERBOSE[8396][C-00000005] pbx.c: Executing [recordcheck@sub-record-check:19] Set("IAX2/voipms-9988", "__CALLFILENAME=in-<redacted>-2014585184-20250131-112337-1738340617.7") in new stack
/var/log/asterisk/full:[2025-01-31 11:23:37] VERBOSE[8396][C-00000005] pbx.c: Executing [recordcheck@sub-record-check:20] Set("IAX2/voipms-9988", "_LOCAL_MIXMON_ID=20250131-112337-1738340617.7") in new stack
/var/log/asterisk/full:[2025-01-31 11:23:37] VERBOSE[8396][C-00000005] pbx.c: Executing [recordcheck@sub-record-check:21] MixMonitor("IAX2/voipms-9988", "2025/01/31/in-<redacted>-2014585184-20250131-112337-1738340617.7.wav,ai(20250131-112337-1738340617.7),") in new stack
/var/log/asterisk/full:[2025-01-31 11:23:37] VERBOSE[8396][C-00000005] pbx.c: Executing [recordcheck@sub-record-check:22] Set("IAX2/voipms-9988", "__MIXMON_ID=20250131-112337-1738340617.7") in new stack
/var/log/asterisk/full:[2025-01-31 11:23:37] VERBOSE[8396][C-00000005] pbx.c: Executing [recordcheck@sub-record-check:25] Set("IAX2/voipms-9988", "CDR(recordingfile)=in-<redacted>-2014585184-20250131-112337-1738340617.7.wav") in new stack
/var/log/asterisk/full:[2025-01-31 11:23:37] VERBOSE[8396][C-00000005] pbx.c: Executing [<redacted>@from-trunk:22] Set("IAX2/voipms-9988", "__CRM_LINKEDID=1738340617.7") in new stack
/var/log/asterisk/full:[2025-01-31 11:23:47] VERBOSE[8396][C-00000005] pbx.c: Executing [s@macro-user-callerid:1] Set("IAX2/voipms-9988", "TOUCH_MONITOR=1738340617.7") in new stack
/var/log/asterisk/full:[2025-01-31 11:24:01] VERBOSE[8396][C-00000005] pbx.c: Executing [s@crm-hangup:4] NoOp("PJSIP/102-00000007", "MASTER CHANNEL: 1738340628.8 = 1738340617.7") in new stack
/var/log/asterisk/full:[2025-01-31 11:24:01] VERBOSE[8396][C-00000005] pbx.c: Executing [s@crm-hangup:4] NoOp("PJSIP/105-00000009", "MASTER CHANNEL: 1738340628.10 = 1738340617.7") in new stack
/var/log/asterisk/full:[2025-01-31 11:24:14] VERBOSE[8453][C-00000005] pbx.c: Executing [s@crm-hangup:4] NoOp("PJSIP/103-00000008", "MASTER CHANNEL: 1738340628.9 = 1738340617.7") in new stack
/var/log/asterisk/full:[2025-01-31 11:24:14] VERBOSE[8396][C-00000005] pbx.c: Executing [s@crm-hangup:4] NoOp("IAX2/voipms-9988", "MASTER CHANNEL: 1738340617.7 = 1738340617.7") in new stack


Incoming number is not redacted, as it is just spam anyways.
I thus tried with the example provided Asterisk logs part 2 section and tried full- and date to no avail.

[root@freepbx asterisk]# grep C-00000005 /var/log/asterisk/full-20250131
[root@freepbx asterisk]# grep C-00000005 /var/log/asterisk/full-20250130
[root@freepbx asterisk]#

Please advise.

Put an underscore before the CallerID Number field. So

_201NXXXXXX

I will try that. I will have to wait for a call to come in from that area code again. But again I have the same question, for future reference what does “_” mean?

This page covers all the dial rules
https://docs.asterisk.org/Configuration/Dialplan/Pattern-Matching/

In asterisk dialplan, the underscore is the instruction to Asterisk that the string is a dial pattern as opposed to the literal characters Z, N and X.