Extension to dial outside line, pause, more digits

First, what I would like to do:
Have a certain number of extensions say, 1155, 1171, 1198. Which all dial an outside line, wait 3 seconds and then dial the same 4 digits that were dialed. However, there are other extensions 1156 through 1170, 1172 through 1197 which are native extensions on the FreePBX and obviously should just behave normally.

I’ve been playing with both custom extensions and custom destinations to try to get this to work.

custom_extensions.conf
[intertel]
exten => s,1,Dial(SIP/sip-provider/[email protected],60,D(wwwww1155))

I’ve also tried

[intertel]
exten => 1155,1,Dial(SIP/sip-provider/[email protected],60,D(wwwww1155))

And then in the Custom Destinations model I have tried targets of both:

intertel,s,1
and
intertel,1155,1

I have applied the FreePBX config and reloaded dialplan via command line.

However, when I try to dial the extension, it does not even appear to be trying to dial out.

– Executing [[email protected]:1] ResetCDR(“PJSIP/1116-0000004f”, “”) in new stack
– Executing [[email protected]:2] NoCDR(“PJSIP/1116-0000004f”, “”) in new stack
– Executing [[email protected]:3] Progress(“PJSIP/1116-0000004f”, “”) in new stack
– Executing [[email protected]:4] Wait(“PJSIP/1116-0000004f”, “1”) in new stack
– Executing [[email protected]:5] Playback(“PJSIP/1116-0000004f”, “silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer”) in new stack

I’m sure there’s probably something simple I’m missing. Any thoughts?

You need a misc Application to point to the Custom Destination to make it dialable.

edit - a single context can be used for multiple custom destinations if you use:

[intertel]
exten => _X.,1,Dial(SIP/sip-provider/[email protected],60,D(wwwww${EXTEN}))
exten => _X.,n,hangup

Then use a dial string of intertel,1155,1

DOH… I just found that on my own, but ya beat me to it! Figures, beat my head against the problem doing searched for a couple hours, and then find a solution 20 minutes later after posting about it.

I like the idea of having a single context inside extensions_custom.conf. However, when I do that, and set the Custom destination target to itnertel,1155,1 as you suggest, I get a busy signal. The console log says:

-- Executing [[email protected]:3] Goto("PJSIP/1116-0000005b", "intertel,s,1") in new stack
-- Goto (intertel,s,1)

Should it not be saying Goto (intertel,1155,1)? I have verified twice that in FreePBX my custom destination is set to intertel,1155,1

Got it… somehow in my editing of my custom destination, the custom application now had an invalid Destination.

So I created the custom destination, with a name of “Patrick” and target of intertel,1155,1. And I created a custom application with a destination of “Custom Destination” “Patrick”. (This will need to be done for each extension I wish forwarded offsite).

Then I had to make a small change to the extensions_custom.conf you gave…

[intertel]
exten => _X.,1,Dial(local/[email protected],60,D(wwwww${EXTEN}))
exten => _X.,n,hangup
1 Like

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