[SOLVED] Passing * Through

I have some new service from VOIP.MS that has a few functions accessed through “*” patterns. Some of these are also used by FreePBX. How do I pass them through to the service?

What particularly are such ’ “*” patterns’ ?

Like *97 for their VM. Also ***98 to play one of the on-hold songs.

I was thinking a prefix to make the key sequence route to the service instead of being intercepted by the PBX.

Good idea.
Or change the feature codes on FreePBX to something else, so that they don’t overlap with VoIP.ms codes.

I can’t quite figure out the dial pattern to allow one or more * through. I added the prefix and have tried


And some others but I still get no dial plan rules matched. Can anyone help me with the dialplan?

I tried contacting my VOIP.MS with this even though they don’t directly support PBXs. They suggested a dial plans:


But no, the phone still says no dial plan matched. Is there possible an escape character for *?

You could create a new trunk group just for this
Add your code to the trunk like it’s a password.

Then create your own code that selects that trunk group.

That’s pretty much what I am trying to do. I have the regular call patterns that pass dialed numbers to my VOIP service. Working great. I’m trying to add some asterisk patterns with a prefix so the system can differentiate between the asterisk patterns I want to send to the service and those I want the PBX to handle.

After talking to my VOIP provider, it sounds like dial patterns will not work. * codes are always intercepted by FreePBX.

So how about another route. How about remapping unused FreePBX codes to dial my provider with the desired code. For example, in extensions_custom.conf:

exten=> *82,Dial(SIP/*[email protected])

But that doesn’t work. Can any Asterisk wizards help me with this command? So that *82 will call out *75 to my provider?

Edit: This sounds like it should work using a trunk name instead:

exten=> *86,Dial(SIP/voipms/*75)

But it doesn’t. Oh, and *82 is used by FreePBX so I changed it.

Could you use “Outbound Routes” and map a “prefix” (which could be a replaced number set) that then got removed and had a “prepend” that got added for your dial set?

For example the below should allow you to dial 7215552221234 which will then be sent to whatever trunk is specified in the route as *7215552221234. Also this example is limited to only receiving this dial code from extension 197

EDIT: Just tested the below examples (with *72 and *73) on an analog trunk and it worked like a charm. I have to assume FreePBX will handle it the same at the trunk level with your trunks as well. I actually did just *72 and then entered the forwarding phone number. DTMF passed just fine.

I suppose if you just needed to dial like *97 you could even do something like “100 + dial code” so 10097 and then have all of it be the “Prefix” and have no actual “Dial Pattern” (1NXX…) and then prepend *97.

So it would allow you to dial 10097 which would dial *97 to the carrier?

Thanks for the thought. That’s what I tried. But even with the prefix FreePBX still captured the * codes.

However a custom extension in extensions_custom.conf worked:

exten=> *86,1,Answer exten=> *86,n,Dial(SIP/voipms/*97)

So now I dial *86 and FreePBX dials out to the service with *97. The issue I am addressing is that both FreePBX and my service provider want *97 for voicemail.

Since I had such a hard time getting an answer to this question, I created a wiki page:

Passing Asterisk Through FreePBX

JGiebler, you may want to add your method to the page.

This pattern in an outbound route that goes to your voip.ms trunk is all you need:

I never thought to use the prepend field. I was trying to do everything in the match pattern.

Ill add your method to the wiki page.

Once the local feature codes for voicemail have been disabled (or changed), you can direct dial voip.ms vm with this dial pattern:

Have you tested your second solution? I tried several dial patterns and they all were captured by FreePBX

Works fine. I don’t know what you mean by ‘captured’. For any sequence of digits to go out an outbound route, it’s necessary that it does not match a valid local extension. Since *97 and *98 are already defined feature codes (Admin, Feature Codes) you must first disable or change them. After that *97 and *98 will look to outbound routes for a valid pattern match.

1 Like

What I mean is that FreePBX acts on the code before it has a chance to be sent.

And my purpose here was to be able to access both vm systems. I don’t want to disable the system *97

[quote=“kbocek, post:18, topic:41504”]
What I mean is that FreePBX acts on the code before it has a chance to be sent.[/quote]

Again, I don’t know what “acts on the code” is supposed to mean, both solutions I noted above do work with voip.ms. Pick the use case that suits. If something is not working to expectation, the diagnosis starts with a call trace.

Jeez. You press *97 and FreePBX goes into Voicemail. It does not dial out. How much clearer can I be.

With my setup *68 dials out to voip.ms with *97. A bare *97 gives me FreePBX voicemail. How the heck else do you describe this?