ari/pjsip: Make it possible to control transfers through ARI

Introduce a ChannelTransfer event and the ability to notify progress to
ARI. Implement emitting this event from the PJSIP channel instead of
handling the transfer in Asterisk when configured.

Introduce a dialplan function to the PJSIP channel to switch between the
"core" and "ari-only" behavior.

UserNote: Call transfers on the PJSIP channel can now be controlled by
ARI. This can be enabled by using the PJSIP_TRANSFER_HANDLING(ari-only)
dialplan function.
This commit is contained in:
Holger Hans Peter Freyther
2024-06-15 16:01:58 +08:00
parent d53f96b6af
commit a0d0c47d06
18 changed files with 1462 additions and 6 deletions

View File

@@ -1997,6 +1997,59 @@
]
}
]
},
{
"path": "/channels/{channelId}/transfer_progress",
"description": "Inform the channel that the transfer is in progress.",
"operations": [
{
"httpMethod": "POST",
"since": [
"22.3.0",
"21.8.0",
"20.13.0"
],
"summary": "Inform the channel about the progress of the attended/blind transfer.",
"nickname": "transfer_progress",
"responseClass": "void",
"parameters": [
{
"name": "channelId",
"description": "Channel's id",
"paramType": "path",
"required": true,
"allowMultiple": false,
"dataType": "string"
},
{
"name": "states",
"description": "The state of the progress",
"paramType": "query",
"required": true,
"allowMultiple": false,
"dataType": "string"
}
],
"errorResponses": [
{
"code": 400,
"reason": "Endpoint parameter not provided"
},
{
"code": 404,
"reason": "Channel or endpoint not found"
},
{
"code": 409,
"reason": "Channel not in a Stasis application"
},
{
"code": 412,
"reason": "Channel in invalid state"
}
]
}
]
}
],
"models": {