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
HANGUP
event 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
Hangup
action 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 aHANGUP
event 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
Hangup
action 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 aHANGUP
event 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
JoinMeeting
action, if theHangup
action is associated with the meeting leg (usually Leg B) then the caller disconnects from the meeting and receives anACTION_SUCCESSFUL
event for theHangup
action.
The following example shows a typical Hangup
action.
{ "Type": "Hangup", "Parameters": { "CallId": "
call-id-1
", "ParticipantTag": "LEG-A", "SipResponseCode": "0" } }
- CallId
-
Description –
CallId
of participant in theCallDetails
of the AWS Lambda function invocationAllowed values – A valid call ID
Required – No
Default value – None
- ParticipantTag
-
Description –
ParticipantTag
of one of the connected participants in theCallDetails
Allowed values –
LEG-A
orLEG-B
Required – No
Default value –
ParticipantTag
of the invokedcallLeg
Ignored 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.
See working examples on GitHub: