[asterisk-bugs] [JIRA] (ASTERISK-24703) ARI: Add the ability to "transfer" (redirect) a channel

Matt Jordan (JIRA) noreply at issues.asterisk.org
Sun Jan 18 21:06:34 CST 2015


Matt Jordan created ASTERISK-24703:
--------------------------------------

             Summary: ARI: Add the ability to "transfer" (redirect) a channel
                 Key: ASTERISK-24703
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-24703
             Project: Asterisk
          Issue Type: New Feature
      Security Level: None
          Components: Resources/res_ari_channels
    Affects Versions: 13.1.0
            Reporter: Matt Jordan
         Attachments: ASTERISK-24703-13.diff

The attached patch adds the ability to "transfer" (if answered) or forward (if not answered) a channel to another destination. This is identical to the {{Transfer}} dialplan application.

The Swagger JSON for the new operation is shown below:

{code}
		{
			"path": "/channels/{channelId}/redirect",
			"description": "Inform the channel that it should redirect itself to a different location. Note that this will almost certainly cause the channel to exit the application.",
			"operations": [
				{
					"httpMethod": "POST",
					"summary": "Redirect the channel to a different location.",
					"nickname": "redirect",
					"responseClass": "void",
					"parameters": [
						{
							"name": "channelId",
							"description": "Channel's id",
							"paramType": "path",
							"required": true,
							"allowMultiple": false,
							"dataType": "string"
						},
						{
							"name": "endpoint",
							"description": "The endpoint to redirect the channel to",
							"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": 422,
							"reason": "Endpoint is not the same type as the channel"
						}
					]
				}
			]
		},
{code}

Note that in the attached patch, some bugs in the PJSIP handling of the channel transfer callback were fixed, along with some better debug. A related bug is linked to this issue as a result.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list