Search code examples
asterisktransferunlinkdisconnect

Can I "un-transfer" 2 existing channels with Asterisk?


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!


Solution

  • 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!