[thirdparty-commits] rmudgett: mISDNuser/trunk r31 - /mISDNuser/trunk/suppserv/

SVN commits to the Digium third-party software repository thirdparty-commits at lists.digium.com
Fri Dec 5 11:41:13 CST 2008


Author: rmudgett
Date: Fri Dec  5 11:41:13 2008
New Revision: 31

URL: http://svn.digium.com/view/thirdparty?view=rev&rev=31
Log:
Added CCBS-T/CCNR-T facility message support

Modified:
    mISDNuser/trunk/suppserv/asn1.h
    mISDNuser/trunk/suppserv/asn1_ccbs.c
    mISDNuser/trunk/suppserv/asn1_ccbs.h
    mISDNuser/trunk/suppserv/asn1_comp.c
    mISDNuser/trunk/suppserv/fac.c
    mISDNuser/trunk/suppserv/suppserv.h

Modified: mISDNuser/trunk/suppserv/asn1.h
URL: http://svn.digium.com/view/thirdparty/mISDNuser/trunk/suppserv/asn1.h?view=diff&rev=31&r1=30&r2=31
==============================================================================
--- mISDNuser/trunk/suppserv/asn1.h (original)
+++ mISDNuser/trunk/suppserv/asn1.h Fri Dec  5 11:41:13 2008
@@ -107,6 +107,12 @@
 		struct FacCCBSRequest_ARG CCNRRequest;
 		struct FacCCBSInterrogate_ARG CCNRInterrogate;
 
+		/* CCBS-T support */
+		struct FacCCBS_T_Request_ARG CCBS_T_Request;
+
+		/* CCNR-T support */
+		struct FacCCBS_T_Request_ARG CCNR_T_Request;
+
 		/* ECT support */
 		struct FacExplicitEctExecute ExplicitEctExecute;
 		struct FacSubaddressTransfer SubaddressTransfer;
@@ -135,6 +141,12 @@
 		/* CCNR support */
 		struct FacCCBSRequest_RES CCNRRequest;
 		struct FacCCBSInterrogate_RES CCNRInterrogate;
+
+		/* CCBS-T support */
+		struct FacCCBS_T_Request_RES CCBS_T_Request;
+
+		/* CCNR-T support */
+		struct FacCCBS_T_Request_RES CCNR_T_Request;
 
 		/* ECT support */
 		struct FacEctLinkIdRequest_RES EctLinkIdRequest;

Modified: mISDNuser/trunk/suppserv/asn1_ccbs.c
URL: http://svn.digium.com/view/thirdparty/mISDNuser/trunk/suppserv/asn1_ccbs.c?view=diff&rev=31&r1=30&r2=31
==============================================================================
--- mISDNuser/trunk/suppserv/asn1_ccbs.c (original)
+++ mISDNuser/trunk/suppserv/asn1_ccbs.c Fri Dec  5 11:41:13 2008
@@ -1385,5 +1385,341 @@
 
 
 
+/* ******************************************************************* */
+/*!
+ * \internal
+ * \brief Encode the CCBS_T_xxx event facility ie.
+ *
+ * \param Dest Where to put the encoding
+ * \param InvokeID
+ * \param OperationValue CCBS_T_xxx message type
+ *
+ * \retval length on success.
+ * \retval -1 on error.
+ */
+static int encodeFacCCBS_T_Event(__u8 *Dest, int InvokeID, enum FacFunction OperationValue)
+{
+	int Length;
+	__u8 *p;
+
+	p = encodeComponentInvoke_Head(Dest, InvokeID, OperationValue);
+
+	Length = encodeComponent_Length(Dest, p);
+
+	return Length;
+}	/* end encodeFacCCBS_T_Event() */
+
+
+
+
+/* ******************************************************************* */
+/*!
+ * \brief Encode the CCBS_T_Call facility ie.
+ *
+ * \param Dest Where to put the encoding
+ * \param CCBS_T_Call Information needed to encode in ie.
+ *
+ * \retval length on success.
+ * \retval -1 on error.
+ */
+int encodeFacCCBS_T_Call(__u8 *Dest, const struct FacCCBS_T_Event *CCBS_T_Call)
+{
+	return encodeFacCCBS_T_Event(Dest, CCBS_T_Call->InvokeID, Fac_CCBS_T_Call);
+}	/* end encodeFacCCBS_T_Call() */
+
+
+
+
+/* ******************************************************************* */
+/*!
+ * \brief Encode the CCBS_T_Suspend facility ie.
+ *
+ * \param Dest Where to put the encoding
+ * \param CCBS_T_Suspend Information needed to encode in ie.
+ *
+ * \retval length on success.
+ * \retval -1 on error.
+ */
+int encodeFacCCBS_T_Suspend(__u8 *Dest, const struct FacCCBS_T_Event *CCBS_T_Suspend)
+{
+	return encodeFacCCBS_T_Event(Dest, CCBS_T_Suspend->InvokeID, Fac_CCBS_T_Suspend);
+}	/* end encodeFacCCBS_T_Suspend() */
+
+
+
+
+/* ******************************************************************* */
+/*!
+ * \brief Encode the CCBS_T_Resume facility ie.
+ *
+ * \param Dest Where to put the encoding
+ * \param CCBS_T_Resume Information needed to encode in ie.
+ *
+ * \retval length on success.
+ * \retval -1 on error.
+ */
+int encodeFacCCBS_T_Resume(__u8 *Dest, const struct FacCCBS_T_Event *CCBS_T_Resume)
+{
+	return encodeFacCCBS_T_Event(Dest, CCBS_T_Resume->InvokeID, Fac_CCBS_T_Resume);
+}	/* end encodeFacCCBS_T_Resume() */
+
+
+
+
+/* ******************************************************************* */
+/*!
+ * \brief Encode the CCBS_T_RemoteUserFree facility ie.
+ *
+ * \param Dest Where to put the encoding
+ * \param CCBS_T_RemoteUserFree Information needed to encode in ie.
+ *
+ * \retval length on success.
+ * \retval -1 on error.
+ */
+int encodeFacCCBS_T_RemoteUserFree(__u8 *Dest, const struct FacCCBS_T_Event *CCBS_T_RemoteUserFree)
+{
+	return encodeFacCCBS_T_Event(Dest, CCBS_T_RemoteUserFree->InvokeID, Fac_CCBS_T_RemoteUserFree);
+}	/* end encodeFacCCBS_T_RemoteUserFree() */
+
+
+
+
+/* ******************************************************************* */
+/*!
+ * \brief Encode the CCBS_T_Available facility ie.
+ *
+ * \param Dest Where to put the encoding
+ * \param CCBS_T_Available Information needed to encode in ie.
+ *
+ * \retval length on success.
+ * \retval -1 on error.
+ */
+int encodeFacCCBS_T_Available(__u8 *Dest, const struct FacCCBS_T_Event *CCBS_T_Available)
+{
+	return encodeFacCCBS_T_Event(Dest, CCBS_T_Available->InvokeID, Fac_CCBS_T_Available);
+}	/* end encodeFacCCBS_T_Available() */
+
+
+
+
+/* ******************************************************************* */
+/*!
+ * \internal
+ * \brief Encode the CCBS-T/CCNR-T-Request facility ie backend.
+ *
+ * \param Dest Where to put the encoding
+ * \param CCBS_T_Request Information needed to encode in ie.
+ * \param MsgType Which facility type to generate
+ *
+ * \retval length on success.
+ * \retval -1 on error.
+ */
+static int encodeFacCCBS_T_Request_Backend(__u8 *Dest, const struct FacCCBS_T_Request *CCBS_T_Request, enum FacFunction MsgType)
+{
+	int Length;
+	__u8 *p;
+	__u8 *SeqStart;
+
+	switch (CCBS_T_Request->ComponentType) {
+	case FacComponent_Invoke:
+		p = encodeComponentInvoke_Head(Dest, CCBS_T_Request->InvokeID, MsgType);
+
+		SeqStart = p;
+		SeqStart[0] = ASN1_TAG_SEQUENCE;
+		p = &SeqStart[2];
+
+		p += encodeAddress_Full(p, &CCBS_T_Request->Component.Invoke.Destination);
+		p += encodeQ931ie_CCBS(p, &CCBS_T_Request->Component.Invoke.Q931ie);
+		if (CCBS_T_Request->Component.Invoke.RetentionSupported) {
+			/* Not the DEFAULT value */
+			p += encodeBoolean(p, ASN1_TAG_CONTEXT_SPECIFIC | 1, CCBS_T_Request->Component.Invoke.RetentionSupported);
+		}
+		if (CCBS_T_Request->Component.Invoke.PresentationAllowedIndicatorPresent) {
+			p += encodeBoolean(p, ASN1_TAG_CONTEXT_SPECIFIC | 2, CCBS_T_Request->Component.Invoke.PresentationAllowedIndicator);
+		}
+		if (CCBS_T_Request->Component.Invoke.Originating.Party.LengthOfNumber) {
+			p += encodeAddress_Full(p, &CCBS_T_Request->Component.Invoke.Originating);
+		}
+
+		/* sequence Length */
+		SeqStart[1] = p - &SeqStart[2];
+
+		Length = encodeComponent_Length(Dest, p);
+		break;
+	case FacComponent_Result:
+		p = encodeComponent_Head(Dest, asn1ComponentTag_Result);
+		p += encodeInt(p, ASN1_TAG_INTEGER, CCBS_T_Request->InvokeID);
+
+		SeqStart = p;
+		SeqStart[0] = ASN1_TAG_SEQUENCE;
+		p = &SeqStart[2];
+
+		p += encodeOperationValue(p, MsgType);
+
+		p += encodeBoolean(p, ASN1_TAG_BOOLEAN, CCBS_T_Request->Component.Result.RetentionSupported);
+
+		/* sequence Length */
+		SeqStart[1] = p - &SeqStart[2];
+
+		Length = encodeComponent_Length(Dest, p);
+		break;
+	default:
+		Length = -1;
+		break;
+	}	/* end switch */
+
+	return Length;
+}	/* end encodeFacCCBS_T_Request_Backend() */
+
+
+
+
+/* ******************************************************************* */
+/*!
+ * \brief Encode the CCBS_T_Request facility ie.
+ *
+ * \param Dest Where to put the encoding
+ * \param CCBS_T_Request Information needed to encode in ie.
+ *
+ * \retval length on success.
+ * \retval -1 on error.
+ */
+int encodeFacCCBS_T_Request(__u8 *Dest, const struct FacCCBS_T_Request *CCBS_T_Request)
+{
+	return encodeFacCCBS_T_Request_Backend(Dest, CCBS_T_Request, Fac_CCBS_T_Request);
+}	/* end encodeFacCCBS_T_Request() */
+
+
+
+
+/* ******************************************************************* */
+/*!
+ * \brief Encode the CCNR_T_Request facility ie.
+ *
+ * \param Dest Where to put the encoding
+ * \param CCNR_T_Request Information needed to encode in ie.
+ *
+ * \retval length on success.
+ * \retval -1 on error.
+ */
+int encodeFacCCNR_T_Request(__u8 *Dest, const struct FacCCBS_T_Request *CCNR_T_Request)
+{
+	return encodeFacCCBS_T_Request_Backend(Dest, CCNR_T_Request, Fac_CCNR_T_Request);
+}	/* end encodeFacCCNR_T_Request() */
+
+
+
+
+/* ******************************************************************* */
+/*!
+ * \brief Parse the CCBS_T_Request invoke argument parameters.
+ *
+ * \param pc Complete component message storage data.
+ * \param p Starting buffer position to parse arguments
+ * \param end End buffer position that must not go past.
+ * \param CCBS_T_Request Parameter storage to fill.
+ *
+ * \retval length of buffer consumed
+ * \retval -1 on error.
+ */
+int ParseCCBS_T_Request_ARG(struct asn1_parm *pc, u_char *p, u_char *end, struct FacCCBS_T_Request_ARG *CCBS_T_Request)
+{
+	int Value;
+	INIT;
+
+	XSEQUENCE_1(ParseAddress_Full, ASN1_TAG_SEQUENCE, ASN1_NOT_TAGGED, &CCBS_T_Request->Destination);
+	XSEQUENCE_1(ParseQ931ie_CCBS, ASN1_TAG_APPLICATION_WIDE, 0, &CCBS_T_Request->Q931ie);
+
+	Value = 0;	/* DEFAULT RetentionSupported value (FALSE) */
+	XSEQUENCE_OPT_1(ParseBoolean, ASN1_TAG_CONTEXT_SPECIFIC, 1, &Value);
+	CCBS_T_Request->RetentionSupported = Value;
+
+	if (p < end && *p == (ASN1_TAG_CONTEXT_SPECIFIC | 2)) {
+		CallASN1(ret, p, end, ParseBoolean(pc, p, end, &Value));
+		CCBS_T_Request->PresentationAllowedIndicator = Value;
+		CCBS_T_Request->PresentationAllowedIndicatorPresent = 1;
+	} else {
+		CCBS_T_Request->PresentationAllowedIndicator = 0;
+		CCBS_T_Request->PresentationAllowedIndicatorPresent = 0;
+	}
+
+	CCBS_T_Request->Originating.Party.LengthOfNumber = 0;/* Assume Originating party number not present */
+	XSEQUENCE_OPT_1(ParseAddress_Full, ASN1_TAG_SEQUENCE, ASN1_NOT_TAGGED, &CCBS_T_Request->Originating);
+
+	return p - beg;
+}	/* end ParseCCBS_T_Request_ARG() */
+
+
+
+
+/* ******************************************************************* */
+/*!
+ * \brief Parse the CCNR_T_Request invoke argument parameters.
+ *
+ * \param pc Complete component message storage data.
+ * \param p Starting buffer position to parse arguments
+ * \param end End buffer position that must not go past.
+ * \param CCNR_T_Request Parameter storage to fill.
+ *
+ * \retval length of buffer consumed
+ * \retval -1 on error.
+ */
+int ParseCCNR_T_Request_ARG(struct asn1_parm *pc, u_char *p, u_char *end, struct FacCCBS_T_Request_ARG *CCNR_T_Request)
+{
+	return ParseCCBS_T_Request_ARG(pc, p, end, CCNR_T_Request);
+}	/* end ParseCCNR_T_Request_ARG() */
+
+
+
+
+/* ******************************************************************* */
+/*!
+ * \brief Parse the CCBS_T_Request result parameters.
+ *
+ * \param pc Complete component message storage data.
+ * \param p Starting buffer position to parse parameters
+ * \param end End buffer position that must not go past.
+ * \param CCBS_T_Request Parameter storage to fill.
+ *
+ * \retval length of buffer consumed
+ * \retval -1 on error.
+ */
+int ParseCCBS_T_Request_RES(struct asn1_parm *pc, u_char *p, u_char *end, struct FacCCBS_T_Request_RES *CCBS_T_Request)
+{
+	int RetentionSupported;
+	int ret;
+	u_char *beg;
+
+	print_asn1msg(PRT_DEBUG_DECODE, " DEBUG> %s\n", __FUNCTION__);
+	beg = p;
+	XSEQUENCE_1(ParseBoolean, ASN1_TAG_BOOLEAN, ASN1_NOT_TAGGED, &RetentionSupported);
+	CCBS_T_Request->RetentionSupported = RetentionSupported;
+
+	return p - beg;
+}	/* end ParseCCBS_T_Request_RES() */
+
+
+
+
+/* ******************************************************************* */
+/*!
+ * \brief Parse the CCNR_T_Request result parameters.
+ *
+ * \param pc Complete component message storage data.
+ * \param p Starting buffer position to parse parameters
+ * \param end End buffer position that must not go past.
+ * \param CCNR_T_Request Parameter storage to fill.
+ *
+ * \retval length of buffer consumed
+ * \retval -1 on error.
+ */
+int ParseCCNR_T_Request_RES(struct asn1_parm *pc, u_char *p, u_char *end, struct FacCCBS_T_Request_RES *CCNR_T_Request)
+{
+	return ParseCCBS_T_Request_RES(pc, p, end, CCNR_T_Request);
+}	/* end ParseCCNR_T_Request_RES() */
+
+
+
+
 /* ------------------------------------------------------------------- */
 /* end asn1_ccbs.c */

Modified: mISDNuser/trunk/suppserv/asn1_ccbs.h
URL: http://svn.digium.com/view/thirdparty/mISDNuser/trunk/suppserv/asn1_ccbs.h?view=diff&rev=31&r1=30&r2=31
==============================================================================
--- mISDNuser/trunk/suppserv/asn1_ccbs.h (original)
+++ mISDNuser/trunk/suppserv/asn1_ccbs.h Fri Dec  5 11:41:13 2008
@@ -67,6 +67,20 @@
 int ParseCCNRInterrogate_RES(struct asn1_parm *pc, u_char *p, u_char *end, struct FacCCBSInterrogate_RES *CCNRInterrogate);
 
 
+int encodeFacCCBS_T_Call(__u8 *Dest, const struct FacCCBS_T_Event *CCBS_T_Call);
+int encodeFacCCBS_T_Suspend(__u8 *Dest, const struct FacCCBS_T_Event *CCBS_T_Suspend);
+int encodeFacCCBS_T_Resume(__u8 *Dest, const struct FacCCBS_T_Event *CCBS_T_Resume);
+int encodeFacCCBS_T_RemoteUserFree(__u8 *Dest, const struct FacCCBS_T_Event *CCBS_T_RemoteUserFree);
+int encodeFacCCBS_T_Available(__u8 *Dest, const struct FacCCBS_T_Event *CCBS_T_Available);
+
+int encodeFacCCBS_T_Request(__u8 *Dest, const struct FacCCBS_T_Request *CCBS_T_Request);
+int encodeFacCCNR_T_Request(__u8 *Dest, const struct FacCCBS_T_Request *CCNR_T_Request);
+int ParseCCBS_T_Request_ARG(struct asn1_parm *pc, u_char *p, u_char *end, struct FacCCBS_T_Request_ARG *CCBS_T_Request);
+int ParseCCNR_T_Request_ARG(struct asn1_parm *pc, u_char *p, u_char *end, struct FacCCBS_T_Request_ARG *CCNR_T_Request);
+int ParseCCBS_T_Request_RES(struct asn1_parm *pc, u_char *p, u_char *end, struct FacCCBS_T_Request_RES *CCBS_T_Request);
+int ParseCCNR_T_Request_RES(struct asn1_parm *pc, u_char *p, u_char *end, struct FacCCBS_T_Request_RES *CCNR_T_Request);
+
+
 /* ------------------------------------------------------------------- */
 
 #ifdef __cplusplus

Modified: mISDNuser/trunk/suppserv/asn1_comp.c
URL: http://svn.digium.com/view/thirdparty/mISDNuser/trunk/suppserv/asn1_comp.c?view=diff&rev=31&r1=30&r2=31
==============================================================================
--- mISDNuser/trunk/suppserv/asn1_comp.c (original)
+++ mISDNuser/trunk/suppserv/asn1_comp.c Fri Dec  5 11:41:13 2008
@@ -23,8 +23,14 @@
 	/* {ccitt(0) identified-organization(4) etsi(0) 359 operations-and-errors(1)} */
 	{ FacOIDBase_CCBS,			{ 4, { 4, 0, 359, 1 } } },
 
+	/* {ccitt(0) identified-organization(4) etsi(0) 359 private-networks-operations-and-errors(2)} */
+	{ FacOIDBase_CCBS_T,		{ 4, { 4, 0, 359, 2 } } },
+
 	/* {ccitt(0) identified-organization(4) etsi(0) 1065 operations-and-errors(1)} */
 	{ FacOIDBase_CCNR,			{ 4, { 4, 0, 1065, 1 } } },
+
+	/* {ccitt(0) identified-organization(4) etsi(0) 1065 private-networks-operations-and-errors(2)} */
+	{ FacOIDBase_CCNR_T,		{ 4, { 4, 0, 1065, 2 } } },
 
 	/* {itu-t(0) identified-organization(4) etsi(0) 196 status-request-procedure(9)} */
 	{ FacOIDBase_StatusRequest,	{ 4, { 4, 0, 196, 9 } } },
@@ -259,6 +265,21 @@
 		XSEQUENCE_1(ParseCCNRInterrogate_ARG, ASN1_TAG_SEQUENCE, ASN1_NOT_TAGGED, &pc->u.inv.o.CCNRInterrogate);
 		break;
 
+	/* CCBS-T/CCNR-T support */
+	case Fac_CCBS_T_Call:
+	case Fac_CCBS_T_Suspend:
+	case Fac_CCBS_T_Resume:
+	case Fac_CCBS_T_RemoteUserFree:
+	case Fac_CCBS_T_Available:
+		/* No additional invoke parameters */
+		break;
+	case Fac_CCBS_T_Request:
+		XSEQUENCE_1(ParseCCBS_T_Request_ARG, ASN1_TAG_SEQUENCE, ASN1_NOT_TAGGED, &pc->u.inv.o.CCBS_T_Request);
+		break;
+	case Fac_CCNR_T_Request:
+		XSEQUENCE_1(ParseCCNR_T_Request_ARG, ASN1_TAG_SEQUENCE, ASN1_NOT_TAGGED, &pc->u.inv.o.CCNR_T_Request);
+		break;
+
 	default:
 		return -1;
 	}
@@ -315,6 +336,14 @@
 		break;
 	case Fac_CCNRInterrogate:
 		XSEQUENCE_1(ParseCCNRInterrogate_RES, ASN1_TAG_SEQUENCE, ASN1_NOT_TAGGED, &pc->u.retResult.o.CCNRInterrogate);
+		break;
+
+	/* CCBS-T/CCNR-T support */
+	case Fac_CCBS_T_Request:
+		XSEQUENCE_1(ParseCCBS_T_Request_RES, ASN1_NOT_TAGGED, ASN1_NOT_TAGGED, &pc->u.retResult.o.CCBS_T_Request);
+		break;
+	case Fac_CCNR_T_Request:
+		XSEQUENCE_1(ParseCCNR_T_Request_RES, ASN1_NOT_TAGGED, ASN1_NOT_TAGGED, &pc->u.retResult.o.CCNR_T_Request);
 		break;
 
 	default:
@@ -439,9 +468,11 @@
 	case FacError_CCBS_InvalidCCBSReference:
 		error = "invalid ccbs reference";
 		break;
+	case FacError_CCBS_T_LongTermDenial:
 	case FacError_CCBS_LongTermDenial:
 		error = "long term denial";
 		break;
+	case FacError_CCBS_T_ShortTermDenial:
 	case FacError_CCBS_ShortTermDenial:
 		error = "short term denial";
 		break;

Modified: mISDNuser/trunk/suppserv/fac.c
URL: http://svn.digium.com/view/thirdparty/mISDNuser/trunk/suppserv/fac.c?view=diff&rev=31&r1=30&r2=31
==============================================================================
--- mISDNuser/trunk/suppserv/fac.c (original)
+++ mISDNuser/trunk/suppserv/fac.c Fri Dec  5 11:41:13 2008
@@ -396,6 +396,29 @@
 		break;
 	case Fac_CCNRInterrogate:
 		len = encodeFacCCNRInterrogate(dest, &fac->u.CCNRInterrogate);
+		break;
+
+	/* CCBS-T/CCNR-T support */
+	case Fac_CCBS_T_Call:
+		len = encodeFacCCBS_T_Call(dest, &fac->u.CCBS_T_Call);
+		break;
+	case Fac_CCBS_T_Suspend:
+		len = encodeFacCCBS_T_Suspend(dest, &fac->u.CCBS_T_Suspend);
+		break;
+	case Fac_CCBS_T_Resume:
+		len = encodeFacCCBS_T_Resume(dest, &fac->u.CCBS_T_Resume);
+		break;
+	case Fac_CCBS_T_RemoteUserFree:
+		len = encodeFacCCBS_T_RemoteUserFree(dest, &fac->u.CCBS_T_RemoteUserFree);
+		break;
+	case Fac_CCBS_T_Available:
+		len = encodeFacCCBS_T_Available(dest, &fac->u.CCBS_T_Available);
+		break;
+	case Fac_CCBS_T_Request:
+		len = encodeFacCCBS_T_Request(dest, &fac->u.CCBS_T_Request);
+		break;
+	case Fac_CCNR_T_Request:
+		len = encodeFacCCNR_T_Request(dest, &fac->u.CCNR_T_Request);
 		break;
 
 	default:
@@ -566,6 +589,33 @@
 			fac->u.CCNRInterrogate.InvokeID = pc.u.inv.invokeId;
 			fac->u.CCNRInterrogate.ComponentType = FacComponent_Invoke;
 			fac->u.CCNRInterrogate.Component.Invoke = pc.u.inv.o.CCNRInterrogate;
+			return 0;
+
+		/* CCBS-T/CCNR-T support */
+		case Fac_CCBS_T_Call:
+			fac->u.CCBS_T_Call.InvokeID = pc.u.inv.invokeId;
+			return 0;
+		case Fac_CCBS_T_Suspend:
+			fac->u.CCBS_T_Suspend.InvokeID = pc.u.inv.invokeId;
+			return 0;
+		case Fac_CCBS_T_Resume:
+			fac->u.CCBS_T_Resume.InvokeID = pc.u.inv.invokeId;
+			return 0;
+		case Fac_CCBS_T_RemoteUserFree:
+			fac->u.CCBS_T_RemoteUserFree.InvokeID = pc.u.inv.invokeId;
+			return 0;
+		case Fac_CCBS_T_Available:
+			fac->u.CCBS_T_Available.InvokeID = pc.u.inv.invokeId;
+			return 0;
+		case Fac_CCBS_T_Request:
+			fac->u.CCBS_T_Request.InvokeID = pc.u.inv.invokeId;
+			fac->u.CCBS_T_Request.ComponentType = FacComponent_Invoke;
+			fac->u.CCBS_T_Request.Component.Invoke = pc.u.inv.o.CCBS_T_Request;
+			return 0;
+		case Fac_CCNR_T_Request:
+			fac->u.CCNR_T_Request.InvokeID = pc.u.inv.invokeId;
+			fac->u.CCNR_T_Request.ComponentType = FacComponent_Invoke;
+			fac->u.CCNR_T_Request.Component.Invoke = pc.u.inv.o.CCNR_T_Request;
 			return 0;
 
 		default:
@@ -674,6 +724,24 @@
 			fac->u.CCNRInterrogate.Component.Result = pc.u.retResult.o.CCNRInterrogate;
 			return 0;
 
+		/* CCBS-T/CCNR-T support */
+		case Fac_CCBS_T_Call:
+		case Fac_CCBS_T_Suspend:
+		case Fac_CCBS_T_Resume:
+		case Fac_CCBS_T_RemoteUserFree:
+		case Fac_CCBS_T_Available:
+			break;
+		case Fac_CCBS_T_Request:
+			fac->u.CCBS_T_Request.InvokeID = pc.u.inv.invokeId;
+			fac->u.CCBS_T_Request.ComponentType = FacComponent_Result;
+			fac->u.CCBS_T_Request.Component.Result = pc.u.retResult.o.CCBS_T_Request;
+			return 0;
+		case Fac_CCNR_T_Request:
+			fac->u.CCNR_T_Request.InvokeID = pc.u.inv.invokeId;
+			fac->u.CCNR_T_Request.ComponentType = FacComponent_Result;
+			fac->u.CCNR_T_Request.Component.Result = pc.u.retResult.o.CCNR_T_Request;
+			return 0;
+
 		default:
 			break;
 		}	/* end switch */

Modified: mISDNuser/trunk/suppserv/suppserv.h
URL: http://svn.digium.com/view/thirdparty/mISDNuser/trunk/suppserv/suppserv.h?view=diff&rev=31&r1=30&r2=31
==============================================================================
--- mISDNuser/trunk/suppserv/suppserv.h (original)
+++ mISDNuser/trunk/suppserv/suppserv.h Fri Dec  5 11:41:13 2008
@@ -43,6 +43,8 @@
 	FacOIDBase_CCNR,
 	FacOIDBase_StatusRequest,
 	FacOIDBase_ECT,
+	FacOIDBase_CCBS_T,
+	FacOIDBase_CCNR_T,
 #endif	/* defined(AST_MISDN_ENHANCEMENTS) */
 
 	/* Must be last in the list */
@@ -153,11 +155,28 @@
 	Fac_CCBSStopAlerting		= FAC_OID_BASE(FacOIDBase_CCBS) + 11,
 
 	/*
+	 * globalValue's (OIDs) from CCBS-private-networks-Operations-and-Errors
+	 * {ccitt identified-organization etsi(0) 359 private-networks-operations-and-errors(2)}
+	 */
+	Fac_CCBS_T_Request			= FAC_OID_BASE(FacOIDBase_CCBS_T) + 1,
+	Fac_CCBS_T_Call				= FAC_OID_BASE(FacOIDBase_CCBS_T) + 2,
+	Fac_CCBS_T_Suspend			= FAC_OID_BASE(FacOIDBase_CCBS_T) + 3,
+	Fac_CCBS_T_Resume			= FAC_OID_BASE(FacOIDBase_CCBS_T) + 4,
+	Fac_CCBS_T_RemoteUserFree	= FAC_OID_BASE(FacOIDBase_CCBS_T) + 5,
+	Fac_CCBS_T_Available		= FAC_OID_BASE(FacOIDBase_CCBS_T) + 6,
+
+	/*
 	 * globalValue's (OIDs) from CCNR-Operations-and-Errors
 	 * {ccitt identified-organization etsi(0) 1065 operations-and-errors(1)}
 	 */
 	Fac_CCNRRequest				= FAC_OID_BASE(FacOIDBase_CCNR) + 1,
 	Fac_CCNRInterrogate			= FAC_OID_BASE(FacOIDBase_CCNR) + 2,
+
+	/*
+	 * globalValue's (OIDs) from CCNR-private-networks-Operations-and-Errors
+	 * {ccitt identified-organization etsi(0) 1065 private-networks-operations-and-errors(2)}
+	 */
+	Fac_CCNR_T_Request			= FAC_OID_BASE(FacOIDBase_CCNR_T) + 1,
 #endif	/* defined(AST_MISDN_ENHANCEMENTS) */
 };
 
@@ -213,6 +232,13 @@
 	FacError_CCBS_NotReadyForCall			= FAC_OID_BASE(FacOIDBase_CCBS) + 28,
 
 	/*
+	 * globalValue Errors (OIDs) from CCBS-private-networks-Operations-and-Errors
+	 * {ccitt identified-organization etsi(0) 359 private-networks-operations-and-errors(2)}
+	 */
+	FacError_CCBS_T_LongTermDenial			= FAC_OID_BASE(FacOIDBase_CCBS_T) + 20,
+	FacError_CCBS_T_ShortTermDenial			= FAC_OID_BASE(FacOIDBase_CCBS_T) + 21,
+
+	/*
 	 * globalValue Errors (OIDs) from Explicit-Call-Transfer-Operations-and-Errors
 	 * {ccitt identified-organization etsi(0) 369 operations-and-errors(1)}
 	 */
@@ -672,6 +698,48 @@
 
 	/* CCBS Record ID */
 	__u8 CCBSReference;
+};
+
+
+struct FacCCBS_T_Request_ARG {
+	/* The BC, HLC (optional) and LLC (optional) information */
+	struct Q931_Bc_Hlc_Llc Q931ie;
+
+	/* Address of B */
+	struct FacAddress Destination;
+
+	/* Caller-ID Address (Present if Originating.Party.LengthOfNumber is nonzero) */
+	struct FacAddress Originating;
+
+	/* TRUE if the PresentationAllowedIndicator is present */
+	__u8 PresentationAllowedIndicatorPresent;
+
+	/* TRUE if presentation is allowed for the originating address */
+	__u8 PresentationAllowedIndicator;
+
+	/* TRUE if User A's CCBS request is continued if user B is busy again. */
+	__u8 RetentionSupported;
+};
+
+struct FacCCBS_T_Request_RES {
+	/* TRUE if User A's CCBS request is continued if user B is busy again. */
+	__u8 RetentionSupported;
+};
+
+struct FacCCBS_T_Request {
+	__s16 InvokeID;
+
+	/*! \see enum FacComponentType */
+	__u8 ComponentType;
+	union {
+		struct FacCCBS_T_Request_ARG Invoke;
+		struct FacCCBS_T_Request_RES Result;
+	} Component;
+};
+
+
+struct FacCCBS_T_Event {
+	__s16 InvokeID;
 };
 
 struct FacEctExecute {
@@ -791,6 +859,19 @@
 		struct FacCCBSRequest CCNRRequest;
 		struct FacCCBSInterrogate CCNRInterrogate;
 
+		/* CCBS-T/CCNR-T support */
+		struct FacCCBS_T_Event CCBS_T_Call;
+		struct FacCCBS_T_Event CCBS_T_Suspend;
+		struct FacCCBS_T_Event CCBS_T_Resume;
+		struct FacCCBS_T_Event CCBS_T_RemoteUserFree;
+		struct FacCCBS_T_Event CCBS_T_Available;
+
+		/* CCBS-T support */
+		struct FacCCBS_T_Request CCBS_T_Request;
+
+		/* CCNR-T support */
+		struct FacCCBS_T_Request CCNR_T_Request;
+
 		/* ECT support */
 		struct FacEctExecute EctExecute;
 		struct FacExplicitEctExecute ExplicitEctExecute;




More information about the thirdparty-commits mailing list