Dialling outbound feature code

Our pstn supplier allows us to transfer calls from our main number to our mobile by using a feature code * 2 1 * transfer number #
After i installed freepbx i cant get this feature to work any more and would like to know how to make freepbx push this number to the outbound route.
For the outbound routes there is no place to configure * codes.
All my other calls work ok
Can anyone help with this?

I’m not sure what would trigger this in FreePBX.

Is 21 a real-time (in call) transfer, or is it the code to forward your calls to your cell phone?

If it’s the former, you can use ‘**’ and transfer the call that way (or is it ##, I can never remember).

If it’s the latter, you can set your cell phone in a Custom Destination and send the call “if not answered”. You can also use any of the dozen “call forward” codes in the Feature Codes page to set a specific extension to your cell.

As far as using that specific feature code, there’s probably a way using a custom setting to build that “number” and dial it. Make sure to set up a specific outbound route with “21” as the first four digits.

Thanks for taking the time to answer.
The feature code is not an in call transfer.
On the regular pstn line you just dial * 2 1 * forwardnumber #
We only have 1 pstn line here so i cant send the call out "if not answered"
Freepbx is installed to allow IP doorphones and for multiple internal extensions.

So is there a way to make freepbx push out the * 2 1 * code to the pstn ?
Thanks again

OK - let’s try something.

Set up a Miscellaneous Destination with the name of this action you want to dial.and the number you want to dial. For example, set the “dial” string to “*21*1231231234#”

Next, set up a Miscellaneous Application and associate it with a feature code you want to use. Use the Feature Codes list from the Admin pulldown to get the list of active codes. The “destination” of the code will be the Misc Dest name you just added.

If your outbound route isn’t messing with your dial strings, when you dial the feature code, it should dial the number from the PBX and connect you to the world.

If it doesn’t work, it’s probably something about the ‘*’ characters.Post the log when you try it if it doesn’t work.

By default in FreePBX you will have *2 and *1 as “in-call” feature codes, you need to change those to something else if you want your string not to be intercepted at the outset or later. Due to the speed at which those digits are dialed and interpreted it would probably be safer to disable/move all in-call features to not use *

1 Like

Yeah - I was thinking about that last night.

Another approach would be use a “special” phone number in the Miscellaneous Destinations. Something like “1231231234” or “9999999”. Set the Miscellaneous Application to your feature code and have it use the special number as the dialed number.

Now, set up an outbound route that will be checked first in the route order.

I’m just thinking out loud, so this is just an idea.

In the Dial Patterns field, set your match pattern to the number you are dialing. Add your “*21*1231231234#” in the prepend, and the number or ‘9999999’ in the prefix (to remove the dialed number). That might get around the *21 capture.

Of course, Dicko’s suggestion (to just get rid of all of the *21 feature codes) would probably be easier and would work as well. The second set of ‘*??’ in your dialed number would also probably need to be removed as well.

No matter what, I think you should probably have to set a special outbound route to match your dialed number.

Hi Sorry for the delayed reply …
I am unable to get any of these solutions to work.
So is there a way to just pickup a pstn line then dial the 21 code after ?
I had some success by using the dialplan and having it modify my number dialled from 21* to prepend a * but then it wont allow me to dial the transfer number with a # afterward.
So really all i need to know is how to pass 21 to the pstn line and then #21# to the pstn to cancel.

maybe it would be better to get pstn gateway 2 stage dialling ?
And have the pstn setup as an extension. Then dial the extension to get pstn line then dial “21” actually on the line.
had tried but not sure how to get the gateway to register as an extension
And handset doesnt pass dtmf after call is answered

How is the POTS line interfaced with the PBX? If you are using DAHDI hardware there is a way to get raw PSTN dial tone but if you are using an ATA it would only be possible if the ATA supports it.