Transfer to an external number using a feature code

I am trying to set up a feature code for my users that will transfer the channel they are currently connected to, to a specific external number. The users should not be able to reach the external number by dialing it (or the shortcode) directly - it should only be accessible via transfer.

I currently have the following set up (using Custom Dynamic Feature Codes):

extensions_custom.conf:

[globals](+)
DYNAMIC_FEATURES = externaltransfer#apprecord

features_applicationmap_custom.conf:

externaltransfer => *300,peer,Dial(Local/<redacted>@from-internal)

When dialing *300 during an active call, the Dial executes (and I can hear ringing on the called side’s end), but thereafter the call disconnects and my original call is still active.

I have also tried the following:

features_applicationmap_custom.conf:

externaltransfer => *300,peer,Gosub(ext-transfer,1,1)

with this in extensions_custom.conf:

[ext-transfer]
exten => 1,1,Answer()
exten => 1,n,Dial(Local/<redacted>@from-internal)
exten => 1,n,Hangup()

This doesn’t work either.

Here is an output of a call attempt using the setup described above:

https://pastebin.com/cgYb6KxG

Where am I going wrong?

I would try ChannelRedirect. That is, effectively, what happens when you use a normal features transfer.

Alternatively, define a special context for the transfers and use standard transfer.

1 Like

Hi,

Thank you very much, ChannelRedirect works perfectly!

For reference, this was the final setup I used:

extensions_custom.conf:

[globals](+)
DYNAMIC_FEATURES = externaltransfer#apprecord

[ext-transfer]
exten => 1,1,Answer()
exten => 1,n,Dial(Local/<redacted>@from-internal)
exten => 1,n,Hangup()

features_applicationmap_custom.conf:

externaltransfer => *300,peer,ChannelRedirect(${CHANNEL},ext-transfer,1,1)
1 Like