chan_pjsip, app_transfer: Add TRANSFERSTATUSPROTOCOL variable

When a Transfer/REFER is executed, TRANSFERSTATUSPROTOCOL variable is
0 when no protocl specific error
SIP example of failure, 3xx-6xx for the SIP error code received

This allows applications to perform actions based on the failure
reason.

ASTERISK-29252 #close
Reported-by: Dan Cropp

Change-Id: Ia6a94784b4925628af122409cdd733c9f29abfc4
This commit is contained in:
Dan Cropp
2021-01-22 09:12:12 -06:00
committed by George Joseph
parent 8a2f0fbbd1
commit a5364ac69b
5 changed files with 86 additions and 8 deletions

View File

@@ -2578,6 +2578,18 @@ int ast_settimeout_full(struct ast_channel *c, unsigned int rate, int (*func)(co
*/
int ast_transfer(struct ast_channel *chan, char *dest);
/*!
* \brief Transfer a channel (if supported) receieve protocol result.
* \retval -1 on error
* \retval 0 if not supported
* \retval 1 if supported and requested
* \param chan current channel
* \param dest destination extension for transfer
* \param protocol specific error code in case of failure
* Example, sip 0 success, else sip error code
*/
int ast_transfer_protocol(struct ast_channel *chan, char *dest, int *protocol);
/*!
* \brief Inherits channel variable from parent to child channel
* \param parent Parent channel