Preconfigured Tone Dialler

I want to set up a virtual extension that I dial internally and which makes an outbound call on the specified trunk. At the end of the outbound number, I’d like it to dial preconfigured options into an external IVR. With mobile phones, you could achieve this by saving “012345678910,(or pp),2,2,1” as a contact number.

Does FreePBX allow for this behaviour anywhere? I’ve tried adding the additional keypresses after the # in the “follow me” option for the virtual extension, but additional digits get ignored and added before the #.

Can anyone tell me how to achieve this?

Most of the simple ways of doing this run afoul of attempting to send the calling extension number as caller ID.

Try this:
Create a Custom Trunk with:
Asterisk Trunk Dial Options: D(ww2w2w1)
Custom Dial String: PJSIP/012345678910@Yourtrunk
where Yourtrunk is the trunk you wish to use to place the call.

Then, create an Outbound Route with match pattern set to the number you want to dial internally, and listing the trunk created above as the only destination.

Thanks for your reply.

To start with, I’m using CHAN-SIP. I know this is deprecated but PJ-SIP causes severe audio issues with my telephones, so I’ve stuck with what works.

To clarify my scenario, I want to dial into my PBX on a specific number. That number directs straight to a specific virtual extension, which uses the “follow me” feature to dial a specified number using a prefix which puts it out of a specific trunk (which uses a different number to the inbound number).

Reading your answer, I think I may not have explained that properly but your proposed solution may be moot anyway because I’m not using PJ-SIP.

I was just giving an example. For a chan_sip trunk use:
Custom Dial String: SIP/Yourtrunk/012345678910

So if (for example) the match pattern of your route is 77777, then put 77777# in the Follow Me entry.

But if the only thing the specific call-in number does is route to the external number and send the DTMF, then you don’t need the virtual extension, just create a Misc Destination the dials 77777 and point the Inbound Route there. If you do that, the default caller ID will be the original caller’s number. You can avoid that by setting a forced caller ID for the Custom Trunk.

Choice of channel driver should not affect the RTP at all. So either there is a bug in pjsip (valid incoming SIP is sometimes mishandled, or invalid SIP is sometimes sent out), which you should report with enough detail to get it fixed, or the problem is at the device or trunking provider.

Is the problem with pjsip extensions, pjsip trunks, or both? If the former, what devices (make/model) are affected? Running latest firmware?

I’d forgotten all about Miscellaneous Destinations and adding one would be far neater than a virtual extension, so I can direct inbound calls from the trunk straight to that instead. I’m still not sure I follow how to add pauses and key presses…?

The issue with PJ-SIP is that recorded system messages were incredibly distorted when playing on the phones. All calls and recordings were absolutely fine. The phones I’m using are Mitel 5360s which aren’t officially supported by Sangoma/FreePBX.

See the D option in

Try constraining both phone and extension to allow only ulaw or alaw (whichever is appropriate for your country) and report whether system recording playback is still garbled.

Thanks for the link. D option sounds like what I need, although I want the connection to be bridged prior to DTMF tones being sent.

Trying different codecs was one of the first things I tried and all aspects of my PBX are set for alaw&ulaw only.

AFAIK Asterisk does not provide a way to do that. If it’s just for troubleshooting the tones and timing, capture the call with tcpdump (turning off encryption if applicable) and use Wireshark to listen to what was sent and received on the trunk. If you actually want external callers to hear the prompt snippets and DTMF tones, that seems pretty weird, report what you are trying to accomplish.

OK, so post a tcpdump capture for a garbled call, along with the Asterisk log for it and I’ll try to take a look. Depending on what is found, we may need the same call on chan_sip for comparison, and/or an audio recording from the phone’s earpiece.

It’s not that the external caller must hear the tones, it’s just that I’d rather have them knowing that something was happening rather than listening to hold music or ringing before being put through to the call. I’m trying to create a simplified process for an external telephone booking-on system.

As for the dumps, I’ll try to get around to this and set up a new post regarding the audio issues.

If you set this up with a virtual extension / follow me, the specified hold music will play in parallel with the outbound call being established and the remote IVR being navigated. Depending on your audience, you might create a custom ‘music’ which announces “Thank you for calling. You will be connected to the next available agent.”, followed by fake ringback tone.

Insert a playback command with the “Please hold while I connect your call” system recording. Or use the “announcement” field in find me/follow me on a virtual extension.

Unfortunately, with either playback or announcement, the outbound call doesn’t get processed until the announcement is over, so it takes longer for the caller to be connected.

With the “music”, the announcment might be cut off if the outbound call is answered and the DTMF stuff completes first, bu you can adjust the timing so that doesn’t happen.

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