Run transfer swap by command

Hello, I need to do atxferswap between calls through AMI cmd, is this possible?

Can someone help me?

Why do you need to do it? The answer may lead to a better way of achieving the underlying requirement.

At the moment, all I can think of is is ensuring there is a local channel between the fixed party and the exchangeable ones, and sending DTMF out of the local channel to execute the feature code, or doing things basically outside the features system and using a two part channel redirect to simultaneously redirect the fixed party to the other exchangeable one, and redirect the original exchangeable one to somewhere to keep them on hold.

1 Like

You mean a AMI program to do it?

You can send more details?

Best Regards… Fernando Romo

1 Like

The use case would be as follows:
The Agent receives the call from the queue, the agent puts the call on hold and calls another extension, speaks what he needs and holds the extension on hold and returns the call to the customer. Exactly the atxferswap action from the features file, however I need to do this by clicking a button on the screen, and not using the phone button.
You said send a DTMF to the local channel, how can I do that?

https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+ManagerAction_PlayDTMF

It would be easier if you used a consistent user interface throughout, either all screen or all phone.

With the PlayDTMF action, can I perform capture *8 or hangup *0 or even transfer actions?

As long as you do it from the other side of a bridge, which is the purpose of the local channel, although I was actually suggesting doing everything with channel redirects.

When I was in involved with this sort of things, we used parking for the music on hold, but there may be better ways. Also ARI didn’t exist, and it is conceivable that doing everything in ARI might be better.

I get a call and I can activate the transfer using PlayDTMF with *2 , but when I want to swap between channels I send *6 to the agent channel and nothing happens.

Action: PlayDTMF
channel: SIP/2852-000002b4
**digit: * **

Action: PlayDTMF
channel: SIP/2852-000002b4
digit: 6

You can use AMI to Park the call, process and Pick again.

Action: Redirect
Channel: $channel
Exten: 664
Priority: 1
Context: park

The extension 664 is a MusicOnHold

You can recover the call to the agent using redirect again:

Action: Redirect
Channel: $channel
Exten: $agent
Priority: 1
Context: pick

In the dial plan you define the context:

context park {
664 => {
Answer();
MusicOnHold(default);
Hangup;
}
}

context pick {
_XXXX => {
AgentRequest(${EXTEN});
Congestion();
}
}

Best Regards… Fernando Romo

1 Like

You have to Play DTMF on the local channel, for the reasons given in the thread I referenced above.

As I don’[t think the above actually points out the following, you need to start the local channel with the “/n”, no-optimise, option on the end of the dial string, otherwise it will get deleted once answered.

1 Like

I sent to both local channels, ;1 and ;2, no action occurs, I believe this should already enable atxferswap functionality.

Event: DTMFBegin
Privilege: dtmf,all
Channel: Local/2856@outTransfer-0000002a;2

Event: DTMFEnd
Privilege: dtmf,all
Channel: Local/2856@outTransfer-0000002a;2
ChannelState: 6
ChannelStateDesc: Up

Actually, it would seem that Play_DTMF now has a receive option that means you no longer have to play tricks with local channels. It appears to have been introduced in Asterisk 13, so should apply to all currently supported versions, as well.

You, obviously, have to perform the original transfer downstream of the local channel.

I was able to enable atxferswap using PlayDTMF with the parameter “Receive : 1”.
I am grateful for the great help they have given me!

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