Dial Patterns Blues ..How to Input 9|. inside Dial Patterns

This is my first post so first and foremost thank you to every community member out there that have created/manged this great project and valuable tool. I Have had a blast/nightmare putting together RasPbx system as a way to bring order to our phones.

I think im near the “goal line” but im stuck on making outbound calls.
Our SIP provider is in Thailand and the instructions are for Elastix which is similar but dressed differently.

The instruction call for " 9|." as the dial pattern.

the 9 is to dial out and . must be for all numbers or something but i cant figure out how to represent that in Raspbx/asterisk input areas of prepend,prefix,match pattern.

9|. looks like it doesnt have any patterns so that is out.

I assumes this was “prefix” was 9 and “match pattern” of ‘.’ but that gives off an error message of "the number is not answering"
The error message is in Thai first then english which carries some significance as my other error messages are only in English which i assume is worse than error in Thai + English.

Im stuck. Does anyone have any suggestions of what im doing wrong?

You should start with the wiki here, that way you will understand the difference between inbound calling redirection and outbound calling patterns, 9|. means if you dial 9XXXXXXX. (. means any number of digits) then the first 9 is discarded and you will dial XXXXXXX. on the trunk you route it to, this is all well covered in the WIKI.

Hi Dicko Thanks for your help. I understand the difference between inbound redirection and outbound call patterns now. i also did check the Wiki area before i posted and was unable to use the documentation for my case.
I believe this is the section correct?
http://wiki.freepbx.org/display/F2/Outbound+Routes
The Thai numbers are 10 digits so NXXNXXXXXX and i was told by the sip provider that 9 was required to dial out.
I tried 9XXXXXXX. in match pattern
I tried 9 as the prefix and NXXNXXXXXX. as the dial pattern
I tried 9. as the prefix and NXXNXXXXXX as the dial pattern
None worked. Feels like im just shooting arrows in the dark now.

I just cant figure out what pattern to represent 9|. in asterisk.
The instructions provided for elastix were pretty simple as i can just input 9|. into the dial pattern box

For Asterisk it seems i have to use a prefix and match pattern.
ive tried 9 as prefix then “.” as match pattern but thats not working.
I can dial in fine,setup IVR etc fine just stuck on outbound now.
How would i represent 9|. in asterisk using prefix and match pattern?

here is how it works in the dial pattern

N = 2-9
Z = 1-9
X = 0-9

If the carrier requires a prepended 9 then your dialstring to match would be

9XXXXXXXXXX (no . at the end, that means expect more digits after matching 9XXXXXXXXXX ) and you would dial

9XXXXXXXXXX

to send it out that route, you can watch progress at the asterisk cli.

Put 9 in the prepend and X. In the pattern match. When the user dials, just dial the 10 digit number without the 9.

Thanks Bill for kicking in :slight_smile: , if you use X. then you will need to wait for the digit timeout (5 seconds by default) so just as Bill says but if your numbers are in a “closed dialplan”, i.e. they are always ten digits, then use the fully qualifies XXXXXXXXXX in the pattern match, or remember to dial # when done dialing.

Hi Bill/Dicko Thanks for chiming in

I tried 9 in the prepend and X. in the pattern match but no luck
(see logs below)

@dicko… i see how the ring tone would play into this but im using the yates softphone for testing. not sure if we can have ring tone on a softphone can we?

Im tracking the logs in CLI and these are the responses i get using the parameters suggested. (sorry its long)

Prepend 9 – Prefix = empty --Match Pattern = X. (capital X i assume and not lowercase x)

Using SIP RTP CoS mark 5 -- Called SIP/021070471_out/908920181655 -- SIP/021070471_out-000000a0 is making progress passing it to SIP/702-0000009f > 0xb6119a00 -- Probation passed - setting RTP source address to 192.168.1.37:20530 > 0x2492b70 -- Probation passed - setting RTP source address to 202.129.61.102:18246 -- No one is available to answer at this time (1:0/0/0) -- Executing [s@macro-dialout-trunk:23] NoOp("SIP/702-0000009f", "Dial failed for some reason with DIALSTATUS = NOANSWER and HANGUPCAUSE = 16") in new stack -- Executing [s@macro-dialout-trunk:24] GotoIf("SIP/702-0000009f", "0?continue,1:s-NOANSWER,1") in new stack -- Goto (macro-dialout-trunk,s-NOANSWER,1) -- Executing [s-NOANSWER@macro-dialout-trunk:1] NoOp("SIP/702-0000009f", "Dial failed due to trunk reporting NOANSWER - giving up") in new stack -- Executing [s-NOANSWER@macro-dialout-trunk:2] Progress("SIP/702-0000009f", "") in new stack -- Executing [s-NOANSWER@macro-dialout-trunk:3] Playback("SIP/702-0000009f", "number-not-answering,noanswer") in new stack -- Playing 'number-not-answering.ulaw' (language 'en') -- Executing [s-NOANSWER@macro-dialout-trunk:4] Congestion("SIP/702-0000009f", "20") in new stack == Spawn extension (macro-dialout-trunk, s-NOANSWER, 4) exited non-zero on 'SIP/702-0000009f' in macro 'dialout-trunk' == Spawn extension (from-internal, 08920181655, 5) exited non-zero on 'SIP/702-0000009f' -- Executing [h@from-internal:1] Hangup("SIP/702-0000009f", "") in new stack == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/702-0000009f'

prepend 9 — prefix = . —match pattern = XXXXXXXXXX

Called SIP/021070471_out/9892081650
– SIP/021070471_out-000000a3 is making progress passing it to SIP/702-000000a2
> 0xb2f60fe8 – Probation passed - setting RTP source address to 192.168.1.37:26458
> 0x25e9d30 – Probation passed - setting RTP source address to 202.129.61.102:11590
– No one is available to answer at this time (1:0/0/0)
– Executing [s@macro-dialout-trunk:23] NoOp(“SIP/702-000000a2”, “Dial failed for some reason with DIALSTATUS = NOANSWER and HANGUPCAUSE = 16”) in new stack
– Executing [s@macro-dialout-trunk:24] GotoIf(“SIP/702-000000a2”, “0?continue,1:s-NOANSWER,1”) in new stack
– Goto (macro-dialout-trunk,s-NOANSWER,1)
– Executing [s-NOANSWER@macro-dialout-trunk:1] NoOp(“SIP/702-000000a2”, “Dial failed due to trunk reporting NOANSWER - giving up”) in new stack
– Executing [s-NOANSWER@macro-dialout-trunk:2] Progress(“SIP/702-000000a2”, “”) in new stack
– Executing [s-NOANSWER@macro-dialout-trunk:3] Playback(“SIP/702-000000a2”, “number-not-answering,noanswer”) in new stack
– <SIP/702-000000a2> Playing ‘number-not-answering.ulaw’ (language ‘en’)
– Executing [s-NOANSWER@macro-dialout-trunk:4] Congestion(“SIP/702-000000a2”, “20”) in new stack
== Spawn extension (macro-dialout-trunk, s-NOANSWER, 4) exited non-zero on ‘SIP/702-000000a2’ in macro ‘dialout-trunk’
== Spawn extension (from-internal, 08920181655, 5) exited non-zero on ‘SIP/702-000000a2’
– Executing [h@from-internal:1] Hangup(“SIP/702-000000a2”, “”) in new stack
== Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/702-000000a2’

prefix and prepend empty-- match pattern = 9XXXXXXXXXX ( no . )

– Executing [08920181655@from-internal:1] ResetCDR(“SIP/702-000000a1”, “”) in new stack
– Executing [08920181655@from-internal:2] NoCDR(“SIP/702-000000a1”, “”) in new stack
– Executing [08920181655@from-internal:3] Progress(“SIP/702-000000a1”, “”) in new stack
– Executing [08920181655@from-internal:4] Wait(“SIP/702-000000a1”, “1”) in new stack
> 0xb2f81bd8 – Probation passed - setting RTP source address to 192.168.1.37:27350
– Executing [08920181655@from-internal:5] Progress(“SIP/702-000000a1”, “”) in new stack
– Executing [08920181655@from-internal:6] Playback(“SIP/702-000000a1”, “silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer”) in new stack
– <SIP/702-000000a1> Playing ‘silence/1.ulaw’ (language ‘en’)
– <SIP/702-000000a1> Playing ‘cannot-complete-as-dialed.ulaw’ (language ‘en’)
== Spawn extension (from-internal, 08920181655, 6) exited non-zero on ‘SIP/702-000000a1’
– Executing [h@from-internal:1] Hangup(“SIP/702-000000a1”, “”) in new stack
== Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/702-000000a1’

Prepend 9 Prefix (empty) – match pattern= XXXXXXXXXX.

– Executing [08920181655@from-internal:1] ResetCDR(“SIP/702-000000a4”, “”) in new stack
– Executing [08920181655@from-internal:2] NoCDR(“SIP/702-000000a4”, “”) in new stack
– Executing [08920181655@from-internal:3] Progress(“SIP/702-000000a4”, “”) in new stack
– Executing [08920181655@from-internal:4] Wait(“SIP/702-000000a4”, “1”) in new stack
> 0xb61a2198 – Probation passed - setting RTP source address to 192.168.1.37:31416
– Executing [08920181655@from-internal:5] Progress(“SIP/702-000000a4”, “”) in new stack
– Executing [08920181655@from-internal:6] Playback(“SIP/702-000000a4”, “silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer”) in new stack
– <SIP/702-000000a4> Playing ‘silence/1.ulaw’ (language ‘en’)
– <SIP/702-000000a4> Playing ‘cannot-complete-as-dialed.ulaw’ (language ‘en’)
== Spawn extension (from-internal, 08920181655, 6) exited non-zero on ‘SIP/702-000000a4’
– Executing [h@from-internal:1] Hangup(“SIP/702-000000a4”, “”) in new stack
== Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/702-000000a4’

Seems i keep running into " no answer" which i assume is due to the system not dialing out correctly ?

not sure.

Also i don’t believe i can manually edit a conf file to use 9|. manually right?
looks like all the conf files are generated manually and editing then manually is not a good idea.

any suggestions?

Cheers

9|. in the old version of FreePBX would strip the 9 and send anything afterward.

Put the 9 in the prefix field and the . in the dial pattern to have the same effect.

Get that to work then go to a more granular rule.

I wonder if there is some miscommunication with the provider? Maybe the provider is assuming that a 9 has to be dialed to get out of the PBX. Try putting a . in the match field and nothing in the other fields and see what happens when you dial just the number without the 9.

Bill your a GENIUS!
putting a . in the match field did the trick.
To be honest i dont really know how.
The only thing i can think of is that a matching pattern of . would basically allow all calls without restriction which is good i guess in the testing phase.

Either way THANK YOU! drinks

Great! Now that we know there is nothing wrong with the system, you can start experiment with other match sequences to make the system work a bit smoother? As I said before, just a miscommunication with your provider about the 9.