|
|
|
@ -543,8 +543,8 @@ struct pri_rerouting_data {
|
|
|
|
|
#define PRI_SUBCMD_AOC_S 18 /*!< Advice Of Charge Start information (Rate list) */
|
|
|
|
|
#define PRI_SUBCMD_AOC_D 19 /*!< Advice Of Charge During information */
|
|
|
|
|
#define PRI_SUBCMD_AOC_E 20 /*!< Advice Of Charge End information */
|
|
|
|
|
//#define PRI_SUBCMD_AOC_CHARGING_REQ 21 /*!< Advice Of Charge Request information */
|
|
|
|
|
//#define PRI_SUBCMD_AOC_CHARGING_REQ_RSP 22 /*!< Advice Of Charge Request Response information */
|
|
|
|
|
#define PRI_SUBCMD_AOC_CHARGING_REQ 21 /*!< Advice Of Charge Request information */
|
|
|
|
|
#define PRI_SUBCMD_AOC_CHARGING_REQ_RSP 22 /*!< Advice Of Charge Request Response information */
|
|
|
|
|
#define PRI_SUBCMD_MCID_REQ 23 /*!< Malicious Call ID Request */
|
|
|
|
|
#define PRI_SUBCMD_MCID_RSP 24 /*!< Malicious Call ID Request response */
|
|
|
|
|
|
|
|
|
@ -877,6 +877,64 @@ struct pri_subcmd_aoc_e {
|
|
|
|
|
struct pri_aoc_e_charging_association associated;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
enum PRI_AOC_REQ_RSP {
|
|
|
|
|
/* Error Results */
|
|
|
|
|
PRI_AOC_REQ_RSP_ERROR_NOT_IMPLEMENTED,
|
|
|
|
|
PRI_AOC_REQ_RSP_ERROR_NOT_AVAILABLE,
|
|
|
|
|
PRI_AOC_REQ_RSP_ERROR_TIMEOUT,
|
|
|
|
|
PRI_AOC_REQ_RSP_ERROR_REJECT,
|
|
|
|
|
/* generic error result all other errors are lumped into */
|
|
|
|
|
PRI_AOC_REQ_RSP_ERROR,
|
|
|
|
|
|
|
|
|
|
/* AOC Results */
|
|
|
|
|
PRI_AOC_REQ_RSP_CHARGING_INFO_FOLLOWS,
|
|
|
|
|
PRI_AOC_REQ_RSP_CURRENCY_INFO_LIST,
|
|
|
|
|
PRI_AOC_REQ_RSP_SPECIAL_ARR,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
enum PRI_AOC_REQUEST {
|
|
|
|
|
PRI_AOC_REQUEST_S = (1 << 0),
|
|
|
|
|
PRI_AOC_REQUEST_D = (1 << 1),
|
|
|
|
|
PRI_AOC_REQUEST_E = (1 << 2),
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct pri_subcmd_aoc_request_response {
|
|
|
|
|
/*!
|
|
|
|
|
* \brief aoc_s data from response
|
|
|
|
|
*/
|
|
|
|
|
struct pri_subcmd_aoc_s aoc_s;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief if the aoc_s msg is present, this will be set
|
|
|
|
|
*/
|
|
|
|
|
int valid_aoc_s;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief What type of aoc was requested.
|
|
|
|
|
* \see enum PRI_AOC_REQUEST
|
|
|
|
|
*/
|
|
|
|
|
int charging_request;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief response to the charging_request
|
|
|
|
|
* \see enum PRI_AOC_REQ_RSP
|
|
|
|
|
*/
|
|
|
|
|
int charging_response;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct pri_subcmd_aoc_request {
|
|
|
|
|
/*!
|
|
|
|
|
* \brief What types of aoc are being requested.
|
|
|
|
|
* \see enum PRI_AOC_REQUEST
|
|
|
|
|
*/
|
|
|
|
|
int charging_request;
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Value given by the initiating request.
|
|
|
|
|
*/
|
|
|
|
|
int invoke_id;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct pri_subcmd_mcid_req {
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Information libpri knows about the malicious caller.
|
|
|
|
@ -934,6 +992,8 @@ struct pri_subcommand {
|
|
|
|
|
struct pri_subcmd_cc_id cc_call;
|
|
|
|
|
struct pri_subcmd_cc_cancel cc_cancel;
|
|
|
|
|
struct pri_subcmd_transfer transfer;
|
|
|
|
|
struct pri_subcmd_aoc_request aoc_request;
|
|
|
|
|
struct pri_subcmd_aoc_request_response aoc_request_response;
|
|
|
|
|
struct pri_subcmd_aoc_s aoc_s;
|
|
|
|
|
struct pri_subcmd_aoc_d aoc_d;
|
|
|
|
|
struct pri_subcmd_aoc_e aoc_e;
|
|
|
|
@ -1587,6 +1647,79 @@ void pri_set_inbanddisconnect(struct pri *pri, unsigned int enable);
|
|
|
|
|
(and maybe some timers) */
|
|
|
|
|
void pri_enslave(struct pri *master, struct pri *slave);
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Request AOC on call setup
|
|
|
|
|
*
|
|
|
|
|
* \param call setup struct to set charging request info on
|
|
|
|
|
* \param charging request to set on setup struct
|
|
|
|
|
*
|
|
|
|
|
* \retval 0 on success
|
|
|
|
|
* \retval -1 on failure
|
|
|
|
|
*/
|
|
|
|
|
int pri_sr_set_aoc_charging_request(struct pri_sr *sr, int charging_request);
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Send AOC Request Response to a request for AOC-S
|
|
|
|
|
*
|
|
|
|
|
* \param ctrl D channel controller.
|
|
|
|
|
* \param call Q.931 call leg.
|
|
|
|
|
* \param invoke_id for response message
|
|
|
|
|
* \param aoc_s message for response
|
|
|
|
|
*
|
|
|
|
|
* \retval 0 on success
|
|
|
|
|
* \retval -1 on failure
|
|
|
|
|
*/
|
|
|
|
|
int pri_aoc_s_request_response_send(struct pri *ctrl, q931_call *call, int invoke_id, const struct pri_subcmd_aoc_s *aoc_s);
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Send AOC Request Response to a request for AOC-D or AOC-E
|
|
|
|
|
*
|
|
|
|
|
* \param ctrl D channel controller.
|
|
|
|
|
* \param call Q.931 call leg.
|
|
|
|
|
* \param response in form of enum PRI_AOC_REQ_RSP
|
|
|
|
|
* \param invoke_id for response message
|
|
|
|
|
*
|
|
|
|
|
* \retval 0 on success
|
|
|
|
|
* \retval -1 on failure
|
|
|
|
|
*/
|
|
|
|
|
int pri_aoc_de_request_response_send(struct pri *ctrl, q931_call *call, int response, int invoke_id);
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Send AOC-S message.
|
|
|
|
|
*
|
|
|
|
|
* \param ctrl D channel controller.
|
|
|
|
|
* \param call Q.931 call leg.
|
|
|
|
|
* \param aoc_s message to send
|
|
|
|
|
*
|
|
|
|
|
* \retval 0 on success
|
|
|
|
|
* \retval -1 on failure
|
|
|
|
|
*/
|
|
|
|
|
int pri_aoc_s_send(struct pri *ctrl, q931_call *c, const struct pri_subcmd_aoc_s *aoc_s);
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Send AOC-D message.
|
|
|
|
|
*
|
|
|
|
|
* \param ctrl D channel controller.
|
|
|
|
|
* \param call Q.931 call leg.
|
|
|
|
|
* \param aoc_d message to send
|
|
|
|
|
*
|
|
|
|
|
* \retval 0 on success
|
|
|
|
|
* \retval -1 on failure
|
|
|
|
|
*/
|
|
|
|
|
int pri_aoc_d_send(struct pri *ctrl, q931_call *c, const struct pri_subcmd_aoc_d *aoc_d);
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* \brief Send AOC-E message.
|
|
|
|
|
*
|
|
|
|
|
* \param ctrl D channel controller.
|
|
|
|
|
* \param call Q.931 call leg.
|
|
|
|
|
* \param aoc_e message to send
|
|
|
|
|
*
|
|
|
|
|
* \retval 0 on success
|
|
|
|
|
* \retval -1 on failure
|
|
|
|
|
*/
|
|
|
|
|
int pri_aoc_e_send(struct pri *ctrl, q931_call *c, const struct pri_subcmd_aoc_e *aoc_e);
|
|
|
|
|
|
|
|
|
|
#define PRI_GR303_SUPPORT
|
|
|
|
|
#define PRI_ENSLAVE_SUPPORT
|
|
|
|
|
#define PRI_SETUP_CALL
|
|
|
|
|