Commit dcd62e46 authored by Richard Mudgett's avatar Richard Mudgett

Add COLP support to libpri for ETSI PTP, ETSI PTMP, and Q.SIG.

Add Connected Line Presentation (COLP) support to chan_dahdi/libpri as an
addition to issue 8824.  This is the libpri portion.  COLP support is now
available for ETSI PTP, ETSI PTMP, and Q.SIG with this patch.

(closes issue #14068)
Tested by: rmudgett

Review: https://reviewboard.asterisk.org/r/339/


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@982 2fbb986a-6c06-0410-b554-c9c1f0a7f128
parent 926cc924
......@@ -52,6 +52,8 @@ STATIC_OBJS= \
rose.o \
rose_address.o \
rose_etsi_aoc.o \
rose_etsi_diversion.o \
rose_etsi_ect.o \
rose_other.o \
rose_q931.o \
rose_qsig_aoc.o \
......@@ -71,6 +73,8 @@ DYNAMIC_OBJS= \
rose.lo \
rose_address.lo \
rose_etsi_aoc.lo \
rose_etsi_diversion.lo \
rose_etsi_ect.lo \
rose_other.lo \
rose_q931.lo \
rose_qsig_aoc.lo \
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -60,6 +60,11 @@
#define Q932_TON_SUBSCRIBER 0x04
#define Q932_TON_ABBREVIATED 0x06
/* Q.SIG Subscription Option. Listed in ECMA-174 */
#define QSIG_NO_NOTIFICATION 0x00
#define QSIG_NOTIFICATION_WITHOUT_DIVERTED_TO_NR 0x01
#define QSIG_NOTIFICATION_WITH_DIVERTED_TO_NR 0x02
/* Queues an MWI apdu on a the given call */
int mwi_message_send(struct pri *pri, q931_call *call, struct pri_sr *req, int activate);
......@@ -73,6 +78,14 @@ int qsig_cf_callrerouting(struct pri *pri, q931_call *c, const char* dest, const
/* starts a QSIG Path Replacement */
int anfpr_initiate_transfer(struct pri *pri, q931_call *c1, q931_call *c2);
int send_call_transfer_complete(struct pri *pri, q931_call *call, int call_status);
int rose_diverting_leg_information1_encode(struct pri *pri, q931_call *call);
int rose_diverting_leg_information3_encode(struct pri *pri, q931_call *call, int messagetype);
int rose_connected_name_encode(struct pri *pri, q931_call *call, int messagetype);
int rose_called_name_encode(struct pri *pri, q931_call *call, int messagetype);
/* Use this function to queue a facility-IE born APDU onto a call
* call is the call to use, messagetype is any one of the Q931 messages,
* apdu is the apdu data, apdu_len is the length of the apdu data */
......
This diff is collapsed.
This diff is collapsed.
......@@ -192,6 +192,14 @@ struct rose_convert_error {
* First_Value = (First_Subidentifier * 40) + Second_Subidentifier
*/
/*! \brief ETSI Explicit Call Transfer OID prefix. */
static const struct asn1_oid rose_etsi_ect = {
/* *INDENT-OFF* */
/* {ccitt(0) identified-organization(4) etsi(0) 369 operations-and-errors(1)} */
4, { 4, 0, 369, 1 }
/* *INDENT-ON* */
};
/*! \brief ETSI specific invoke/result encode/decode message table */
static const struct rose_convert_msg rose_etsi_msgs[] = {
/* *INDENT-OFF* */
......@@ -200,6 +208,71 @@ static const struct rose_convert_msg rose_etsi_msgs[] = {
* encode_invoke_args, encode_result_args,
* decode_invoke_args, decode_result_args
*/
/*
* localValue's from Diversion-Operations
* {ccitt identified-organization etsi(0) 207 operations-and-errors(1)}
*/
{
ROSE_ETSI_ActivationDiversion, NULL, 7,
rose_enc_etsi_ActivationDiversion_ARG, NULL,
rose_dec_etsi_ActivationDiversion_ARG, NULL
},
{
ROSE_ETSI_DeactivationDiversion, NULL, 8,
rose_enc_etsi_DeactivationDiversion_ARG,NULL,
rose_dec_etsi_DeactivationDiversion_ARG,NULL
},
{
ROSE_ETSI_ActivationStatusNotificationDiv, NULL, 9,
rose_enc_etsi_ActivationStatusNotificationDiv_ARG,NULL,
rose_dec_etsi_ActivationStatusNotificationDiv_ARG,NULL
},
{
ROSE_ETSI_DeactivationStatusNotificationDiv,NULL, 10,
rose_enc_etsi_DeactivationStatusNotificationDiv_ARG,NULL,
rose_dec_etsi_DeactivationStatusNotificationDiv_ARG,NULL
},
{
ROSE_ETSI_InterrogationDiversion, NULL, 11,
rose_enc_etsi_InterrogationDiversion_ARG,rose_enc_etsi_InterrogationDiversion_RES,
rose_dec_etsi_InterrogationDiversion_ARG,rose_dec_etsi_InterrogationDiversion_RES
},
{
ROSE_ETSI_DiversionInformation, NULL, 12,
rose_enc_etsi_DiversionInformation_ARG, NULL,
rose_dec_etsi_DiversionInformation_ARG, NULL
},
{
ROSE_ETSI_CallDeflection, NULL, 13,
rose_enc_etsi_CallDeflection_ARG, NULL,
rose_dec_etsi_CallDeflection_ARG, NULL
},
{
ROSE_ETSI_CallRerouting, NULL, 14,
rose_enc_etsi_CallRerouting_ARG, NULL,
rose_dec_etsi_CallRerouting_ARG, NULL
},
{
ROSE_ETSI_DivertingLegInformation2, NULL, 15,
rose_enc_etsi_DivertingLegInformation2_ARG,NULL,
rose_dec_etsi_DivertingLegInformation2_ARG,NULL
},
{
ROSE_ETSI_InterrogateServedUserNumbers, NULL, 17,
NULL, rose_enc_etsi_InterrogateServedUserNumbers_RES,
NULL, rose_dec_etsi_InterrogateServedUserNumbers_RES
},
{
ROSE_ETSI_DivertingLegInformation1, NULL, 18,
rose_enc_etsi_DivertingLegInformation1_ARG,NULL,
rose_dec_etsi_DivertingLegInformation1_ARG,NULL
},
{
ROSE_ETSI_DivertingLegInformation3, NULL, 19,
rose_enc_etsi_DivertingLegInformation3_ARG,NULL,
rose_dec_etsi_DivertingLegInformation3_ARG,NULL
},
/*
* localValue's from Advice-of-Charge-Operations
* {ccitt identified-organization etsi (0) 182 operations-and-errors (1)}
......@@ -243,6 +316,51 @@ static const struct rose_convert_msg rose_etsi_msgs[] = {
rose_enc_etsi_AOCEChargingUnit_ARG, NULL,
rose_dec_etsi_AOCEChargingUnit_ARG, NULL
},
/*
* localValue's from Explicit-Call-Transfer-Operations-and-Errors
* {ccitt identified-organization etsi(0) 369 operations-and-errors(1)}
*/
{
ROSE_ETSI_EctExecute, NULL, 6,
NULL, NULL,
NULL, NULL
},
/*
* globalValue's (OIDs) from Explicit-Call-Transfer-Operations-and-Errors
* {ccitt identified-organization etsi(0) 369 operations-and-errors(1)}
*/
{
ROSE_ETSI_ExplicitEctExecute, &rose_etsi_ect, 1,
rose_enc_etsi_ExplicitEctExecute_ARG, NULL,
rose_dec_etsi_ExplicitEctExecute_ARG, NULL
},
{
ROSE_ETSI_RequestSubaddress, &rose_etsi_ect, 2,
NULL, NULL,
NULL, NULL
},
{
ROSE_ETSI_SubaddressTransfer, &rose_etsi_ect, 3,
rose_enc_etsi_SubaddressTransfer_ARG, NULL,
rose_dec_etsi_SubaddressTransfer_ARG, NULL
},
{
ROSE_ETSI_EctLinkIdRequest, &rose_etsi_ect, 4,
NULL, rose_enc_etsi_EctLinkIdRequest_RES,
NULL, rose_dec_etsi_EctLinkIdRequest_RES
},
{
ROSE_ETSI_EctInform, &rose_etsi_ect, 5,
rose_enc_etsi_EctInform_ARG, NULL,
rose_dec_etsi_EctInform_ARG, NULL
},
{
ROSE_ETSI_EctLoopTest, &rose_etsi_ect, 6,
rose_enc_etsi_EctLoopTest_ARG, rose_enc_etsi_EctLoopTest_RES,
rose_dec_etsi_EctLoopTest_ARG, rose_dec_etsi_EctLoopTest_RES
},
/* *INDENT-ON* */
};
......@@ -295,6 +413,39 @@ static const struct rose_convert_error rose_etsi_errors[] = {
NULL, NULL
},
/*
* localValue Errors from Diversion-Operations
* {ccitt identified-organization etsi(0) 207 operations-and-errors(1)}
*/
{
ROSE_ERROR_Div_InvalidDivertedToNr, NULL, 12,
NULL, NULL
},
{
ROSE_ERROR_Div_SpecialServiceNr, NULL, 14,
NULL, NULL
},
{
ROSE_ERROR_Div_DiversionToServedUserNr, NULL, 15,
NULL, NULL
},
{
ROSE_ERROR_Div_IncomingCallAccepted, NULL, 23,
NULL, NULL
},
{
ROSE_ERROR_Div_NumberOfDiversionsExceeded, NULL, 24,
NULL, NULL
},
{
ROSE_ERROR_Div_NotActivated, NULL, 46,
NULL, NULL
},
{
ROSE_ERROR_Div_RequestAlreadyAccepted, NULL, 48,
NULL, NULL
},
/*
* localValue Errors from Advice-of-Charge-Operations
* {ccitt identified-organization etsi (0) 182 operations-and-errors (1)}
......@@ -303,6 +454,15 @@ static const struct rose_convert_error rose_etsi_errors[] = {
ROSE_ERROR_AOC_NoChargingInfoAvailable, NULL, 26,
NULL, NULL
},
/*
* globalValue Errors (OIDs) from Explicit-Call-Transfer-Operations-and-Errors
* {ccitt identified-organization etsi(0) 369 operations-and-errors(1)}
*/
{
ROSE_ERROR_ECT_LinkIdNotAssignedByNetwork, &rose_etsi_ect, 21,
NULL, NULL
},
/* *INDENT-ON* */
};
......@@ -880,6 +1040,27 @@ const char *rose_operation2str(enum rose_operation operation)
{ ROSE_None, "ROSE_None" },
{ ROSE_Unknown, "ROSE_Unknown" },
{ ROSE_ETSI_ActivationDiversion, "ROSE_ETSI_ActivationDiversion" },
{ ROSE_ETSI_DeactivationDiversion, "ROSE_ETSI_DeactivationDiversion" },
{ ROSE_ETSI_ActivationStatusNotificationDiv,"ROSE_ETSI_ActivationStatusNotificationDiv" },
{ ROSE_ETSI_DeactivationStatusNotificationDiv,"ROSE_ETSI_DeactivationStatusNotificationDiv" },
{ ROSE_ETSI_InterrogationDiversion, "ROSE_ETSI_InterrogationDiversion" },
{ ROSE_ETSI_DiversionInformation, "ROSE_ETSI_DiversionInformation" },
{ ROSE_ETSI_CallDeflection, "ROSE_ETSI_CallDeflection" },
{ ROSE_ETSI_CallRerouting, "ROSE_ETSI_CallRerouting" },
{ ROSE_ETSI_DivertingLegInformation2, "ROSE_ETSI_DivertingLegInformation2" },
{ ROSE_ETSI_InterrogateServedUserNumbers, "ROSE_ETSI_InterrogateServedUserNumbers" },
{ ROSE_ETSI_DivertingLegInformation1, "ROSE_ETSI_DivertingLegInformation1" },
{ ROSE_ETSI_DivertingLegInformation3, "ROSE_ETSI_DivertingLegInformation3" },
{ ROSE_ETSI_EctExecute, "ROSE_ETSI_EctExecute" },
{ ROSE_ETSI_ExplicitEctExecute, "ROSE_ETSI_ExplicitEctExecute" },
{ ROSE_ETSI_RequestSubaddress, "ROSE_ETSI_RequestSubaddress" },
{ ROSE_ETSI_SubaddressTransfer, "ROSE_ETSI_SubaddressTransfer" },
{ ROSE_ETSI_EctLinkIdRequest, "ROSE_ETSI_EctLinkIdRequest" },
{ ROSE_ETSI_EctInform, "ROSE_ETSI_EctInform" },
{ ROSE_ETSI_EctLoopTest, "ROSE_ETSI_EctLoopTest" },
{ ROSE_ETSI_ChargingRequest, "ROSE_ETSI_ChargingRequest" },
{ ROSE_ETSI_AOCSCurrency, "ROSE_ETSI_AOCSCurrency" },
{ ROSE_ETSI_AOCSSpecialArr, "ROSE_ETSI_AOCSSpecialArr" },
......@@ -971,10 +1152,15 @@ const char *rose_error2str(enum rose_error_code code)
{ ROSE_ERROR_Div_InvalidDivertedToNr, "Diversion: Invalid Diverted To Number" },
{ ROSE_ERROR_Div_SpecialServiceNr, "Diversion: Special Service Number" },
{ ROSE_ERROR_Div_DiversionToServedUserNr, "Diversion: Diversion To Served User Number" },
{ ROSE_ERROR_Div_IncomingCallAccepted, "Diversion: Incoming Call Accepted" },
{ ROSE_ERROR_Div_NumberOfDiversionsExceeded, "Diversion: Number Of Diversions Exceeded" },
{ ROSE_ERROR_Div_NotActivated, "Diversion: Not Activated" },
{ ROSE_ERROR_Div_RequestAlreadyAccepted, "Diversion: Request Already Accepted" },
{ ROSE_ERROR_AOC_NoChargingInfoAvailable, "AOC: No Charging Info Available" },
{ ROSE_ERROR_ECT_LinkIdNotAssignedByNetwork, "ECT: Link ID Not Assigned By Network" },
/* Q.SIG specific errors */
{ ROSE_ERROR_QSIG_Unspecified, "Unspecified" },
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -137,6 +137,107 @@ const unsigned char *rose_dec_etsi_AOCEChargingUnit_ARG(struct pri *ctrl, unsign
const unsigned char *pos, const unsigned char *end,
union rose_msg_invoke_args *args);
/* ETSI Call Diversion */
unsigned char *rose_enc_etsi_ActivationDiversion_ARG(struct pri *ctrl,
unsigned char *pos, unsigned char *end, const union rose_msg_invoke_args *args);
unsigned char *rose_enc_etsi_DeactivationDiversion_ARG(struct pri *ctrl,
unsigned char *pos, unsigned char *end, const union rose_msg_invoke_args *args);
unsigned char *rose_enc_etsi_ActivationStatusNotificationDiv_ARG(struct pri *ctrl,
unsigned char *pos, unsigned char *end, const union rose_msg_invoke_args *args);
unsigned char *rose_enc_etsi_DeactivationStatusNotificationDiv_ARG(struct pri *ctrl,
unsigned char *pos, unsigned char *end, const union rose_msg_invoke_args *args);
unsigned char *rose_enc_etsi_InterrogationDiversion_ARG(struct pri *ctrl,
unsigned char *pos, unsigned char *end, const union rose_msg_invoke_args *args);
unsigned char *rose_enc_etsi_InterrogationDiversion_RES(struct pri *ctrl,
unsigned char *pos, unsigned char *end, const union rose_msg_result_args *args);
unsigned char *rose_enc_etsi_DiversionInformation_ARG(struct pri *ctrl,
unsigned char *pos, unsigned char *end, const union rose_msg_invoke_args *args);
unsigned char *rose_enc_etsi_CallDeflection_ARG(struct pri *ctrl, unsigned char *pos,
unsigned char *end, const union rose_msg_invoke_args *args);
unsigned char *rose_enc_etsi_CallRerouting_ARG(struct pri *ctrl, unsigned char *pos,
unsigned char *end, const union rose_msg_invoke_args *args);
unsigned char *rose_enc_etsi_InterrogateServedUserNumbers_RES(struct pri *ctrl,
unsigned char *pos, unsigned char *end, const union rose_msg_result_args *args);
unsigned char *rose_enc_etsi_DivertingLegInformation1_ARG(struct pri *ctrl,
unsigned char *pos, unsigned char *end, const union rose_msg_invoke_args *args);
unsigned char *rose_enc_etsi_DivertingLegInformation2_ARG(struct pri *ctrl,
unsigned char *pos, unsigned char *end, const union rose_msg_invoke_args *args);
unsigned char *rose_enc_etsi_DivertingLegInformation3_ARG(struct pri *ctrl,
unsigned char *pos, unsigned char *end, const union rose_msg_invoke_args *args);
const unsigned char *rose_dec_etsi_ActivationDiversion_ARG(struct pri *ctrl,
unsigned tag, const unsigned char *pos, const unsigned char *end,
union rose_msg_invoke_args *args);
const unsigned char *rose_dec_etsi_DeactivationDiversion_ARG(struct pri *ctrl,
unsigned tag, const unsigned char *pos, const unsigned char *end,
union rose_msg_invoke_args *args);
const unsigned char *rose_dec_etsi_ActivationStatusNotificationDiv_ARG(struct pri *ctrl,
unsigned tag, const unsigned char *pos, const unsigned char *end,
union rose_msg_invoke_args *args);
const unsigned char *rose_dec_etsi_DeactivationStatusNotificationDiv_ARG(struct pri
*ctrl, unsigned tag, const unsigned char *pos, const unsigned char *end,
union rose_msg_invoke_args *args);
const unsigned char *rose_dec_etsi_InterrogationDiversion_ARG(struct pri *ctrl,
unsigned tag, const unsigned char *pos, const unsigned char *end,
union rose_msg_invoke_args *args);
const unsigned char *rose_dec_etsi_InterrogationDiversion_RES(struct pri *ctrl,
unsigned tag, const unsigned char *pos, const unsigned char *end,
union rose_msg_result_args *args);
const unsigned char *rose_dec_etsi_DiversionInformation_ARG(struct pri *ctrl,
unsigned tag, const unsigned char *pos, const unsigned char *end,
union rose_msg_invoke_args *args);
const unsigned char *rose_dec_etsi_CallDeflection_ARG(struct pri *ctrl, unsigned tag,
const unsigned char *pos, const unsigned char *end,
union rose_msg_invoke_args *args);
const unsigned char *rose_dec_etsi_CallRerouting_ARG(struct pri *ctrl, unsigned tag,
const unsigned char *pos, const unsigned char *end,
union rose_msg_invoke_args *args);
const unsigned char *rose_dec_etsi_InterrogateServedUserNumbers_RES(struct pri *ctrl,
unsigned tag, const unsigned char *pos, const unsigned char *end,
union rose_msg_result_args *args);
const unsigned char *rose_dec_etsi_DivertingLegInformation1_ARG(struct pri *ctrl,
unsigned tag, const unsigned char *pos, const unsigned char *end,
union rose_msg_invoke_args *args);
const unsigned char *rose_dec_etsi_DivertingLegInformation2_ARG(struct pri *ctrl,
unsigned tag, const unsigned char *pos, const unsigned char *end,
union rose_msg_invoke_args *args);
const unsigned char *rose_dec_etsi_DivertingLegInformation3_ARG(struct pri *ctrl,
unsigned tag, const unsigned char *pos, const unsigned char *end,
union rose_msg_invoke_args *args);
/* ETSI Explicit Call Transfer (ECT) */
unsigned char *rose_enc_etsi_ExplicitEctExecute_ARG(struct pri *ctrl, unsigned char *pos,
unsigned char *end, const union rose_msg_invoke_args *args);
unsigned char *rose_enc_etsi_SubaddressTransfer_ARG(struct pri *ctrl, unsigned char *pos,
unsigned char *end, const union rose_msg_invoke_args *args);
unsigned char *rose_enc_etsi_EctLinkIdRequest_RES(struct pri *ctrl, unsigned char *pos,
unsigned char *end, const union rose_msg_result_args *args);
unsigned char *rose_enc_etsi_EctInform_ARG(struct pri *ctrl, unsigned char *pos,
unsigned char *end, const union rose_msg_invoke_args *args);
unsigned char *rose_enc_etsi_EctLoopTest_ARG(struct pri *ctrl, unsigned char *pos,
unsigned char *end, const union rose_msg_invoke_args *args);
unsigned char *rose_enc_etsi_EctLoopTest_RES(struct pri *ctrl, unsigned char *pos,
unsigned char *end, const union rose_msg_result_args *args);
const unsigned char *rose_dec_etsi_ExplicitEctExecute_ARG(struct pri *ctrl, unsigned tag,
const unsigned char *pos, const unsigned char *end,
union rose_msg_invoke_args *args);
const unsigned char *rose_dec_etsi_SubaddressTransfer_ARG(struct pri *ctrl, unsigned tag,
const unsigned char *pos, const unsigned char *end,
union rose_msg_invoke_args *args);
const unsigned char *rose_dec_etsi_EctLinkIdRequest_RES(struct pri *ctrl, unsigned tag,
const unsigned char *pos, const unsigned char *end,
union rose_msg_result_args *args);
const unsigned char *rose_dec_etsi_EctInform_ARG(struct pri *ctrl, unsigned tag,
const unsigned char *pos, const unsigned char *end,
union rose_msg_invoke_args *args);
const unsigned char *rose_dec_etsi_EctLoopTest_ARG(struct pri *ctrl, unsigned tag,
const unsigned char *pos, const unsigned char *end,
union rose_msg_invoke_args *args);
const unsigned char *rose_dec_etsi_EctLoopTest_RES(struct pri *ctrl, unsigned tag,
const unsigned char *pos, const unsigned char *end,
union rose_msg_result_args *args);
/* Q.SIG Name-Operations */
unsigned char *rose_enc_qsig_Name(struct pri *ctrl, unsigned char *pos,
unsigned char *end, const struct roseQsigName *name);
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment