How to park/grab using AMI?

Hello,

I am running Asterisk 20.4.0 and trying to use AMI.
I can successfully generate the call using originate action. Now, I want to use below two features :
park/grab i.e hold/unhold.

When I have a call connected between two SIP channels. 6001 called 7001. I want to put a caller 7001 on Park i.e on music on hold using AMI. After some time I want to grab that call and again want 6001 and 7001 can communicate with each other.

I have used Park action and by doing that the 7001 goes on music on hold but the one who generated the call i.e 6001 gets hangup.

<— Examining AMI action: →
action: Park
actionid: 1692032002.048
channel: SIP/7001-00000154
channel2: SIP/7001-00000154

   > Setting Parker dial string to SIP/7001 from BLINDTRANSFER value
-- Channel SIP/7001-00000154 left 'simple_bridge' basic-bridge <ab61e8f5-b654-4b58-b527-f036c981e2ac>
-- Parking 'SIP/7001-00000154' in 'default' at space 802

-- Channel SIP/6001-00000153 left 'simple_bridge' basic-bridge <ab61e8f5-b654-4b58-b527-f036c981e2ac>

Help me for how to achieve this?

Redirect the channels to dialplan that does the Park() etc. Redirect can act on two channels simultaneously.

Then how do I grab the call to a normal mode ?

Direct one leg into the Bridge application.

70001 calls 6001,
7001 parks 6001 using the Park Action of AMI.
6001 goes on music on hold.
But the 7001 hangup.
I want the 7001 to be active and when I grab 6001 back then again 6001 and 7001 starts talking.

How to make it work ?

No it doesn’t. Third party control logic does that.

You should redirect with both sides being sent to dialplan that runs Park, or possibly with one to Park and one to some long running application (Wait(…), or MusicOnHold(…)). Exactly what you use for 7001 depends on what you expect the user to hear.

(If you are not really using the park feature, but just want to hold the call, you can put both sides to long running applicationis.)

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