Hangup
Sends a Hangup value with a SipStatusCode to any leg
of a call.
When the Audio Service runs a Hangup action on a call leg:
-
For a call with only one call leg, the SIP media application invokes the AWS Lambda function with a
HANGUPevent and ignores the response. The call is then disconnected. For a call leg (Leg A) that is bridged to another call leg (Leg B), if the
Hangupaction is associated with the bridged call leg (Leg B) then the PSTN audio service disconnects the bridged call leg, then invokes the Lambda function with aHANGUPevent for leg B. The PSTN audio service then runs any actions returned from that Lambda invocation.For a call leg (Leg A) that is bridged to another call leg (Leg B), if the
Hangupaction is associated with the original call leg (Leg A), then the PSTN audio service disconnects the original call leg, then invokes the Lambda function with aHANGUPevent for leg A. The PSTN audio service then runs any actions returned from that Lambda invocation.For a call leg that joined to a meeting using the
JoinMeetingaction, if theHangupaction is associated with the meeting leg (usually Leg B) then the caller disconnects from the meeting and receives anACTION_SUCCESSFULevent for theHangupaction.
The following example shows a typical Hangup action.
{ "Type": "Hangup", "Parameters": { "CallId": "call-id-1", "ParticipantTag": "LEG-A", "SipResponseCode": "0" } }
- CallId
-
Description –
CallIdof participant in theCallDetailsof the AWS Lambda function invocationAllowed values – A valid call ID
Required – No
Default value – None
- ParticipantTag
-
Description –
ParticipantTagof one of the connected participants in theCallDetailsAllowed values –
LEG-AorLEG-BRequired – No
Default value –
ParticipantTagof the invokedcallLegIgnored if you specifyCallId - SipResponseCode
-
Description – Any of the supported SIP response codes
Allowed values – 480–Unavailable; 486–Busy; 0–Normal Termination
Required – No
Default value – 0
After a user ends a call, the SIP media application invokes an AWS Lambda function with the code listed in Ending a call using the Amazon Chime SDK PSTN audio service.
See working examples on GitHub: