Setting up an extension to dial an internal only extension at an outside number

I got tasked to set up a phone number for an employee but they will not be getting a physical phone. The only purpose of this number will be to dial an internal only extension at an external number affiliated with a different organization. So say the number I assigned this employee is 5514 ( DID ) and I am trying to set it up so that when anyone calls it, it dials a private internal only extension ( 158 ) at an outside phone number that belongs to MIT. In all the work I tried to attempt, it seems like setting up a custom destination that links to the extensions_custom.conf file will be what can make this possible. Is there anyone who can show me an Asterisk dial plan template that can make this task possible?

If the extension is inside only, there will, by definition, be no way of calling it from outside.

Do you mean a direct in dialling number that isn’t published, or do you mean an automated attendant, to which you automatically feed digits to route the call onwards. If this is one of these, it will depend on how MIT have set up their system.

The first one is not special, for FreePBX; you are calling an unpublished, external number, but it is still a normal PSTN number. In the second case, you would use the D option on Dial, if you can dead reckon it, or use a callee subroutine, with SendDTMF, if you need to look for things like silence, to get the timing right.

I am not trying to call the inside extension directly, I know the DID number that needs to be called before that. After you call that DID, an IVR says “Thank you for calling our company, please dial your party’s extension now if you know it………” . So I dial the extension ( 158 ) and it takes me to hold music before someone can potentially pick up. I don’t know how 158 is set up for them inside their organization which I can potentially ask them later.

Is it possible to make a dial plan in the extensions_custom.conf file to where when someone dials DID 5514 in my organization, that it forwards to the external DID and then puts in pauses before dialing 158? Is that possible with the second case you mentioned?

Except that they will be calling extension 5514, yes. There may even be ways of doing it without custom dialplan.

The I in DID stands for incoming, but you are making an outgoing call. DID has come to mean a PSTN number, but they are always longer than four digits. (DID stands for direct in dialling.)

I was just mentioning 5514 which is in use at my organization and is registered as a full 10 digit number by our provider. I didn’t want to mention the full number here for privacy reasons, so I mentioned it was a DID to distinguish it from being an internal only extension.

What other suggestions beyond the custom dial plan? I tried doing a FollowMe but it doesn’t allow for any pauses to put in 158 after the DID of the external organization.

There may be ways of setting channel variables for a custom destination. The Dial options are set in channel variables. However, I really mentioned this in case someone else had more knowledge, as I didn’t want to trawl the documentation to actually design the details.

You can do this as a Custom Extension within FreePBX. Go to Extensions –> Add New –> Custom Extension.

In the extension field, whatever you want.

In the Advanced tab and Dial field, Local/6172533400@from-internal,,D(158)

…replacing the 617 number above with the correct number of the organization.

Set your inbound route for DID ending in 5514 to point to the new custom extension you just created.

This sounds reassuring. However I should have mentioned from the start of this post that we are on FreePBX 16 and it sounds like what you are talking about is only possible in 17. There is a Custom Extensions options in 16 but it only shows Custom Extension as a required field and none of the options you mentioned. Is there I way I can make all that work in the extensions_custom.conf file?

Sorry, too many things are named “Extensions.”

I mean Applications → Extensions → where you set up “phone extensions.” Go there and you’ll be able to follow what I wrote.

Everything you mentioned sounds like it is only possible in FreePBX 17 since those options are not available in FreePBX 16. I ended up getting a cell phone number for the individual that 5514 is associated with so a FollowMe is enabled with it.

Yes it is available FreePBX 16. I don’t know how to make it more clear but glad you found another solution.