Reputation: 115
I have 2 phones connected after transfer action and now I want to "un-trasfer" them both and put them on hold listening to background music. I've tried to park, call a phantom number, etc. But every time the second phone (the one that does not perform the action) hangs up.
Can I do this without a conference call? Thanks in advance!
Upvotes: 1
Views: 1752
Reputation: 115
Finally I did it! @arheops gave me the key with his note. I must do: With A and B speaking Redirect both channels to waiting:
Action: Redirect
ActionID: 1234
Channel: Channel1
ExtraChannel: Channel2
Exten: 000000001
ExtraExten: 000000001
Context: default
ExtraContext: default
Priority: 1
ExtraPriority: 1
In extensions.conf I wrote a "waiting" called "on_hold" extension:
[on_hold]
exten =>s,1,Answer()
exten =>s,2,BackGround(onholdmusic)
exten =>s,3,goto(on_hold,s,2)
exten =>h,1,HangUp()
Now A and B are listening to music(onholdmusic), then you can call C and bridge B with C. A keeps waiting listening to music until another bridge/hang up/other action is done.
Thanks!
Upvotes: 2
Reputation: 15259
Yes,you can use using ami action "Transfer", not it will transfer second one to n+1 prio,so you have create special context.
Read this first http://www.voip-info.org/wiki/view/Asterisk+manager+API
After that consult this:
http://www.voip-info.org/wiki/view/Asterisk+manager+Example:+Transfer
http://www.voip-info.org/wiki/view/Asterisk+Manager+API+Action+Redirect
Note, to do 2 channels same time in 1.6+ you have use ExtraChannel variable.
Upvotes: 1