Holding a Call using API

Hello !

I have a frontend java application which connects remotely to Asterisk server. The application makes a call by using OriginateCall Action of Asterisk API.
Now I need to implement a function of holding a call - so if corresponding button will be pressed in application a music should be played in the line.

[color=red]The problem is that there isn’t a ‘Hold a Call’ Action in API[/color]

Please Help!

holding a call should be part of this scheme 0
A calls B
A puts B on hold and calls C
A hangs up the phone
B and C speak

The way I would tackle this is to make an [on_hold] context. When you need to put the call on you would issue a manager Redirect to the [on_hold] context which would then execute the MusicOnHold() application.

When you want to take them off hold simply bridge the two channels back togehter.

[quote=“g2010”]The way I would tackle this is to make an [on_hold] context. When you need to put the call on you would issue a manager Redirect to the [on_hold] context which would then execute the MusicOnHold() application.

When you want to take them off hold simply bridge the two channels back togehter.[/quote]

Oh many thanks! I didnt know about this way,
If you’ll give me a hint or link explaining of how to make a [on_hold] context, I’ll be very thankful!