Codingstyle cleanup
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@535 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
parent
cb92fcdf43
commit
b2623fb871
|
@ -60,66 +60,66 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
void ATT5ESSCreateNT(L3UCHAR i)
|
void ATT5ESSCreateNT(L3UCHAR i)
|
||||||
{
|
{
|
||||||
Q931SetMesProc(Q931mes_ALERTING, i,Q931ProcAlertingNT, Q931Umes_Alerting, Q931Pmes_Alerting);
|
Q931SetMesProc(Q931mes_ALERTING, i, Q931ProcAlertingNT, Q931Umes_Alerting, Q931Pmes_Alerting);
|
||||||
Q931SetMesProc(Q931mes_CALL_PROCEEDING, i,Q931ProcCallProceedingNT, Q931Umes_CallProceeding, Q931Pmes_CallProceeding);
|
Q931SetMesProc(Q931mes_CALL_PROCEEDING, i, Q931ProcCallProceedingNT, Q931Umes_CallProceeding, Q931Pmes_CallProceeding);
|
||||||
Q931SetMesProc(Q931mes_CONNECT, i,Q931ProcConnectNT, Q931Umes_Connect, Q931Pmes_Connect);
|
Q931SetMesProc(Q931mes_CONNECT, i, Q931ProcConnectNT, Q931Umes_Connect, Q931Pmes_Connect);
|
||||||
Q931SetMesProc(Q931mes_CONNECT_ACKNOWLEDGE, i,Q931ProcConnectAckNT, Q931Umes_ConnectAck, Q931Pmes_ConnectAck);
|
Q931SetMesProc(Q931mes_CONNECT_ACKNOWLEDGE, i, Q931ProcConnectAckNT, Q931Umes_ConnectAck, Q931Pmes_ConnectAck);
|
||||||
Q931SetMesProc(Q931mes_PROGRESS, i,Q931ProcProgressNT, Q931Umes_Progress, Q931Pmes_Progress);
|
Q931SetMesProc(Q931mes_PROGRESS, i, Q931ProcProgressNT, Q931Umes_Progress, Q931Pmes_Progress);
|
||||||
Q931SetMesProc(Q931mes_SETUP, i,Q931ProcSetupNT, Q931Umes_Setup, Q931Pmes_Setup);
|
Q931SetMesProc(Q931mes_SETUP, i, Q931ProcSetupNT, Q931Umes_Setup, Q931Pmes_Setup);
|
||||||
Q931SetMesProc(Q931mes_SETUP_ACKNOWLEDGE, i,Q931ProcSetupAckNT, Q931Umes_SetupAck, Q931Pmes_SetupAck);
|
Q931SetMesProc(Q931mes_SETUP_ACKNOWLEDGE, i, Q931ProcSetupAckNT, Q931Umes_SetupAck, Q931Pmes_SetupAck);
|
||||||
Q931SetMesProc(Q931mes_RESUME, i,Q931ProcResumeNT, Q931Umes_Resume, Q931Pmes_Resume);
|
Q931SetMesProc(Q931mes_RESUME, i, Q931ProcResumeNT, Q931Umes_Resume, Q931Pmes_Resume);
|
||||||
Q931SetMesProc(Q931mes_RESUME_ACKNOWLEDGE, i,Q931ProcResumeAckNT, Q931Umes_ResumeAck, Q931Pmes_ResumeAck);
|
Q931SetMesProc(Q931mes_RESUME_ACKNOWLEDGE, i, Q931ProcResumeAckNT, Q931Umes_ResumeAck, Q931Pmes_ResumeAck);
|
||||||
Q931SetMesProc(Q931mes_RESUME_REJECT, i,Q931ProcResumeRejectNT, Q931Umes_ResumeReject, Q931Pmes_ResumeReject);
|
Q931SetMesProc(Q931mes_RESUME_REJECT, i, Q931ProcResumeRejectNT, Q931Umes_ResumeReject, Q931Pmes_ResumeReject);
|
||||||
Q931SetMesProc(Q931mes_SUSPEND, i,Q931ProcSuspendNT, Q931Umes_Suspend, Q931Pmes_Suspend);
|
Q931SetMesProc(Q931mes_SUSPEND, i, Q931ProcSuspendNT, Q931Umes_Suspend, Q931Pmes_Suspend);
|
||||||
Q931SetMesProc(Q931mes_SUSPEND_ACKNOWLEDGE, i,Q931ProcSuspendAckNT, Q931Umes_SuspendAck, Q931Pmes_SuspendAck);
|
Q931SetMesProc(Q931mes_SUSPEND_ACKNOWLEDGE, i, Q931ProcSuspendAckNT, Q931Umes_SuspendAck, Q931Pmes_SuspendAck);
|
||||||
Q931SetMesProc(Q931mes_SUSPEND_REJECT, i,Q931ProcSuspendRejectNT, Q931Umes_SuspendReject, Q931Pmes_SuspendReject);
|
Q931SetMesProc(Q931mes_SUSPEND_REJECT, i, Q931ProcSuspendRejectNT, Q931Umes_SuspendReject, Q931Pmes_SuspendReject);
|
||||||
Q931SetMesProc(Q931mes_USER_INFORMATION, i,Q931ProcUserInformationNT, Q931Umes_UserInformation, Q931Pmes_UserInformation);
|
Q931SetMesProc(Q931mes_USER_INFORMATION, i, Q931ProcUserInformationNT, Q931Umes_UserInformation, Q931Pmes_UserInformation);
|
||||||
Q931SetMesProc(Q931mes_DISCONNECT, i,Q931ProcDisconnectNT, Q931Umes_Disconnect, Q931Pmes_Disconnect);
|
Q931SetMesProc(Q931mes_DISCONNECT, i, Q931ProcDisconnectNT, Q931Umes_Disconnect, Q931Pmes_Disconnect);
|
||||||
Q931SetMesProc(Q931mes_RELEASE, i,Q931ProcReleaseNT, Q931Umes_Release, Q931Pmes_Release);
|
Q931SetMesProc(Q931mes_RELEASE, i, Q931ProcReleaseNT, Q931Umes_Release, Q931Pmes_Release);
|
||||||
Q931SetMesProc(Q931mes_RELEASE_COMPLETE, i,Q931ProcReleaseCompleteNT, Q931Umes_ReleaseComplete, Q931Pmes_ReleaseComplete);
|
Q931SetMesProc(Q931mes_RELEASE_COMPLETE, i, Q931ProcReleaseCompleteNT, Q931Umes_ReleaseComplete, Q931Pmes_ReleaseComplete);
|
||||||
Q931SetMesProc(Q931mes_RESTART, i,Q931ProcRestartNT, Q931Umes_Restart, Q931Pmes_Restart);
|
Q931SetMesProc(Q931mes_RESTART, i, Q931ProcRestartNT, Q931Umes_Restart, Q931Pmes_Restart);
|
||||||
Q931SetMesProc(Q931mes_RESTART_ACKNOWLEDGE, i,Q931ProcRestartAckNT, Q931Umes_RestartAck, Q931Pmes_RestartAck);
|
Q931SetMesProc(Q931mes_RESTART_ACKNOWLEDGE, i, Q931ProcRestartAckNT, Q931Umes_RestartAck, Q931Pmes_RestartAck);
|
||||||
Q931SetMesProc(Q931mes_CONGESTION_CONTROL, i,Q931ProcCongestionControlNT, Q931Umes_CongestionControl, Q931Pmes_CongestionControl);
|
Q931SetMesProc(Q931mes_CONGESTION_CONTROL, i, Q931ProcCongestionControlNT, Q931Umes_CongestionControl, Q931Pmes_CongestionControl);
|
||||||
Q931SetMesProc(Q931mes_INFORMATION, i,Q931ProcInformationNT, Q931Umes_Information, Q931Pmes_Information);
|
Q931SetMesProc(Q931mes_INFORMATION, i, Q931ProcInformationNT, Q931Umes_Information, Q931Pmes_Information);
|
||||||
Q931SetMesProc(Q931mes_NOTIFY, i,Q931ProcNotifyNT, Q931Umes_Notify, Q931Pmes_Notify);
|
Q931SetMesProc(Q931mes_NOTIFY, i, Q931ProcNotifyNT, Q931Umes_Notify, Q931Pmes_Notify);
|
||||||
Q931SetMesProc(Q931mes_STATUS, i,Q931ProcStatusNT, Q931Umes_Status, Q931Pmes_Status);
|
Q931SetMesProc(Q931mes_STATUS, i, Q931ProcStatusNT, Q931Umes_Status, Q931Pmes_Status);
|
||||||
Q931SetMesProc(Q931mes_STATUS_ENQUIRY, i,Q931ProcStatusEnquiryNT, Q931Umes_StatusEnquiry, Q931Pmes_StatusEnquiry);
|
Q931SetMesProc(Q931mes_STATUS_ENQUIRY, i, Q931ProcStatusEnquiryNT, Q931Umes_StatusEnquiry, Q931Pmes_StatusEnquiry);
|
||||||
Q931SetMesProc(Q931mes_SEGMENT, i,Q931ProcSegmentNT, Q931Umes_Segment, Q931Pmes_Segment);
|
Q931SetMesProc(Q931mes_SEGMENT, i, Q931ProcSegmentNT, Q931Umes_Segment, Q931Pmes_Segment);
|
||||||
|
|
||||||
Q931SetMesProc(Q932mes_FACILITY, i,Q932ProcFacilityNT, Q932Umes_Facility, Q932Pmes_Facility);
|
Q931SetMesProc(Q932mes_FACILITY, i, Q932ProcFacilityNT, Q932Umes_Facility, Q932Pmes_Facility);
|
||||||
Q931SetMesProc(Q932mes_HOLD, i,Q932ProcHoldNT, Q932Umes_Hold, Q932Pmes_Hold);
|
Q931SetMesProc(Q932mes_HOLD, i, Q932ProcHoldNT, Q932Umes_Hold, Q932Pmes_Hold);
|
||||||
Q931SetMesProc(Q932mes_HOLD_ACKNOWLEDGE, i,Q932ProcHoldAckNT, Q932Umes_HoldAck, Q932Pmes_HoldAck);
|
Q931SetMesProc(Q932mes_HOLD_ACKNOWLEDGE, i, Q932ProcHoldAckNT, Q932Umes_HoldAck, Q932Pmes_HoldAck);
|
||||||
Q931SetMesProc(Q932mes_HOLD_REJECT, i,Q932ProcHoldRejectNT, Q932Umes_HoldReject, Q932Pmes_HoldReject);
|
Q931SetMesProc(Q932mes_HOLD_REJECT, i, Q932ProcHoldRejectNT, Q932Umes_HoldReject, Q932Pmes_HoldReject);
|
||||||
Q931SetMesProc(Q932mes_REGISTER, i,Q932ProcRegisterNT, Q932Umes_Register, Q932Pmes_Register);
|
Q931SetMesProc(Q932mes_REGISTER, i, Q932ProcRegisterNT, Q932Umes_Register, Q932Pmes_Register);
|
||||||
Q931SetMesProc(Q932mes_RETRIEVE, i,Q932ProcRetrieveNT, Q932Umes_Retrieve, Q932Pmes_Retrieve);
|
Q931SetMesProc(Q932mes_RETRIEVE, i, Q932ProcRetrieveNT, Q932Umes_Retrieve, Q932Pmes_Retrieve);
|
||||||
Q931SetMesProc(Q932mes_RETRIEVE_ACKNOWLEDGE,i,Q932ProcRetrieveAckNT, Q932Umes_RetrieveAck, Q932Pmes_RetrieveAck);
|
Q931SetMesProc(Q932mes_RETRIEVE_ACKNOWLEDGE, i, Q932ProcRetrieveAckNT, Q932Umes_RetrieveAck, Q932Pmes_RetrieveAck);
|
||||||
Q931SetMesProc(Q932mes_RETRIEVE_REJECT, i,Q932ProcRetrieveRejectNT, Q932Umes_RetrieveReject, Q932Pmes_RetrieveReject);
|
Q931SetMesProc(Q932mes_RETRIEVE_REJECT, i, Q932ProcRetrieveRejectNT, Q932Umes_RetrieveReject, Q932Pmes_RetrieveReject);
|
||||||
|
|
||||||
/* Set up the IE encoder/decoder handle table.*/
|
/* Set up the IE encoder/decoder handle table.*/
|
||||||
Q931SetIEProc(Q931ie_SEGMENTED_MESSAGE, i,Q931Pie_Segment, Q931Uie_Segment);
|
Q931SetIEProc(Q931ie_SEGMENTED_MESSAGE, i, Q931Pie_Segment, Q931Uie_Segment);
|
||||||
Q931SetIEProc(Q931ie_BEARER_CAPABILITY, i,Q931Pie_BearerCap, Q931Uie_BearerCap);
|
Q931SetIEProc(Q931ie_BEARER_CAPABILITY, i, Q931Pie_BearerCap, Q931Uie_BearerCap);
|
||||||
Q931SetIEProc(Q931ie_CAUSE, i,Q931Pie_Cause, Q931Uie_Cause);
|
Q931SetIEProc(Q931ie_CAUSE, i, Q931Pie_Cause, Q931Uie_Cause);
|
||||||
Q931SetIEProc(Q931ie_CALL_IDENTITY, i,Q931Pie_CallID, Q931Uie_CallID);
|
Q931SetIEProc(Q931ie_CALL_IDENTITY, i, Q931Pie_CallID, Q931Uie_CallID);
|
||||||
Q931SetIEProc(Q931ie_CALL_STATE, i,Q931Pie_CallState, Q931Uie_CallState);
|
Q931SetIEProc(Q931ie_CALL_STATE, i, Q931Pie_CallState, Q931Uie_CallState);
|
||||||
Q931SetIEProc(Q931ie_CHANNEL_IDENTIFICATION, i,Q931Pie_ChanID, Q931Uie_ChanID);
|
Q931SetIEProc(Q931ie_CHANNEL_IDENTIFICATION, i, Q931Pie_ChanID, Q931Uie_ChanID);
|
||||||
Q931SetIEProc(Q931ie_PROGRESS_INDICATOR, i,Q931Pie_ProgInd, Q931Uie_ProgInd);
|
Q931SetIEProc(Q931ie_PROGRESS_INDICATOR, i, Q931Pie_ProgInd, Q931Uie_ProgInd);
|
||||||
Q931SetIEProc(Q931ie_NETWORK_SPECIFIC_FACILITIES, i,Q931Pie_NetFac, Q931Uie_NetFac);
|
Q931SetIEProc(Q931ie_NETWORK_SPECIFIC_FACILITIES, i, Q931Pie_NetFac, Q931Uie_NetFac);
|
||||||
Q931SetIEProc(Q931ie_NOTIFICATION_INDICATOR, i,Q931Pie_NotifInd, Q931Uie_NotifInd);
|
Q931SetIEProc(Q931ie_NOTIFICATION_INDICATOR, i, Q931Pie_NotifInd, Q931Uie_NotifInd);
|
||||||
Q931SetIEProc(Q931ie_DISPLAY, i,Q931Pie_Display, Q931Uie_Display);
|
Q931SetIEProc(Q931ie_DISPLAY, i, Q931Pie_Display, Q931Uie_Display);
|
||||||
Q931SetIEProc(Q931ie_DATETIME, i,Q931Pie_DateTime, Q931Uie_DateTime);
|
Q931SetIEProc(Q931ie_DATETIME, i, Q931Pie_DateTime, Q931Uie_DateTime);
|
||||||
Q931SetIEProc(Q931ie_KEYPAD_FACILITY, i,Q931Pie_KeypadFac, Q931Uie_KeypadFac);
|
Q931SetIEProc(Q931ie_KEYPAD_FACILITY, i, Q931Pie_KeypadFac, Q931Uie_KeypadFac);
|
||||||
Q931SetIEProc(Q931ie_SIGNAL, i,Q931Pie_Signal, Q931Uie_Signal);
|
Q931SetIEProc(Q931ie_SIGNAL, i, Q931Pie_Signal, Q931Uie_Signal);
|
||||||
Q931SetIEProc(Q931ie_TRANSIT_DELAY_SELECTION_AND_IND, i,Q931Pie_TransNetSel, Q931Uie_TransNetSel);
|
Q931SetIEProc(Q931ie_TRANSIT_DELAY_SELECTION_AND_IND, i, Q931Pie_TransNetSel, Q931Uie_TransNetSel);
|
||||||
Q931SetIEProc(Q931ie_CALLING_PARTY_NUMBER, i,Q931Pie_CallingNum, Q931Uie_CallingNum);
|
Q931SetIEProc(Q931ie_CALLING_PARTY_NUMBER, i, Q931Pie_CallingNum, Q931Uie_CallingNum);
|
||||||
Q931SetIEProc(Q931ie_CALLING_PARTY_SUBADDRESS, i,Q931Pie_CallingSub, Q931Uie_CallingSub);
|
Q931SetIEProc(Q931ie_CALLING_PARTY_SUBADDRESS, i, Q931Pie_CallingSub, Q931Uie_CallingSub);
|
||||||
Q931SetIEProc(Q931ie_CALLED_PARTY_NUMBER, i,Q931Pie_CalledNum, Q931Uie_CalledNum);
|
Q931SetIEProc(Q931ie_CALLED_PARTY_NUMBER, i, Q931Pie_CalledNum, Q931Uie_CalledNum);
|
||||||
Q931SetIEProc(Q931ie_CALLED_PARTY_SUBADDRESS, i,Q931Pie_CalledSub, Q931Uie_CalledSub);
|
Q931SetIEProc(Q931ie_CALLED_PARTY_SUBADDRESS, i, Q931Pie_CalledSub, Q931Uie_CalledSub);
|
||||||
Q931SetIEProc(Q931ie_TRANSIT_NETWORK_SELECTION, i,Q931Pie_TransNetSel, Q931Uie_TransNetSel);
|
Q931SetIEProc(Q931ie_TRANSIT_NETWORK_SELECTION, i, Q931Pie_TransNetSel, Q931Uie_TransNetSel);
|
||||||
Q931SetIEProc(Q931ie_RESTART_INDICATOR, i,Q931Pie_RestartInd, Q931Uie_RestartInd);
|
Q931SetIEProc(Q931ie_RESTART_INDICATOR, i, Q931Pie_RestartInd, Q931Uie_RestartInd);
|
||||||
Q931SetIEProc(Q931ie_LOW_LAYER_COMPATIBILITY, i,Q931Pie_LLComp, Q931Uie_LLComp);
|
Q931SetIEProc(Q931ie_LOW_LAYER_COMPATIBILITY, i, Q931Pie_LLComp, Q931Uie_LLComp);
|
||||||
Q931SetIEProc(Q931ie_HIGH_LAYER_COMPATIBILITY, i,Q931Pie_HLComp, Q931Uie_HLComp);
|
Q931SetIEProc(Q931ie_HIGH_LAYER_COMPATIBILITY, i, Q931Pie_HLComp, Q931Uie_HLComp);
|
||||||
Q931SetIEProc(Q931ie_USER_USER, i,Q931Pie_UserUser, Q931Uie_UserUser);
|
Q931SetIEProc(Q931ie_USER_USER, i, Q931Pie_UserUser, Q931Uie_UserUser);
|
||||||
Q931SetIEProc(Q931ie_GENERIC_DIGITS, i,Q931Pie_GenericDigits, Q931Uie_GenericDigits);
|
Q931SetIEProc(Q931ie_GENERIC_DIGITS, i, Q931Pie_GenericDigits, Q931Uie_GenericDigits);
|
||||||
|
|
||||||
Q931SetIEProc(Q931ie_CONNECTED_NUMBER, i, Q931Pie_Generic, Q931Uie_Generic);
|
Q931SetIEProc(Q931ie_CONNECTED_NUMBER, i, Q931Pie_Generic, Q931Uie_Generic);
|
||||||
Q931SetIEProc(Q931ie_FACILITY, i, Q931Pie_Generic, Q931Uie_Generic);
|
Q931SetIEProc(Q931ie_FACILITY, i, Q931Pie_Generic, Q931Uie_Generic);
|
||||||
|
|
|
@ -68,67 +68,67 @@ extern L3INT Q931L4HeaderSpace;
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
void ATT5ESSCreateTE(L3UCHAR i)
|
void ATT5ESSCreateTE(L3UCHAR i)
|
||||||
{
|
{
|
||||||
Q931SetMesProc(Q931mes_ALERTING, i,Q931ProcAlertingTE, Q931Umes_Alerting, Q931Pmes_Alerting);
|
Q931SetMesProc(Q931mes_ALERTING, i, Q931ProcAlertingTE, Q931Umes_Alerting, Q931Pmes_Alerting);
|
||||||
Q931SetMesProc(Q931mes_CALL_PROCEEDING, i,Q931ProcCallProceedingTE, Q931Umes_CallProceeding, Q931Pmes_CallProceeding);
|
Q931SetMesProc(Q931mes_CALL_PROCEEDING, i, Q931ProcCallProceedingTE, Q931Umes_CallProceeding, Q931Pmes_CallProceeding);
|
||||||
Q931SetMesProc(Q931mes_CONNECT, i,ATT5ESSProc0x07TE, ATT5ESSUmes_0x07, ATT5ESSPmes_0x07);
|
Q931SetMesProc(Q931mes_CONNECT, i, ATT5ESSProc0x07TE, ATT5ESSUmes_0x07, ATT5ESSPmes_0x07);
|
||||||
Q931SetMesProc(Q931mes_CONNECT_ACKNOWLEDGE, i,ATT5ESSProc0x0fTE, ATT5ESSUmes_0x0f, ATT5ESSPmes_0x0f);
|
Q931SetMesProc(Q931mes_CONNECT_ACKNOWLEDGE, i, ATT5ESSProc0x0fTE, ATT5ESSUmes_0x0f, ATT5ESSPmes_0x0f);
|
||||||
Q931SetMesProc(Q931mes_PROGRESS, i,Q931ProcProgressTE, Q931Umes_Progress, Q931Pmes_Progress);
|
Q931SetMesProc(Q931mes_PROGRESS, i, Q931ProcProgressTE, Q931Umes_Progress, Q931Pmes_Progress);
|
||||||
Q931SetMesProc(Q931mes_SETUP, i,Q931ProcSetupTE, ATT5ESSUmes_Setup, ATT5ESSPmes_Setup);
|
Q931SetMesProc(Q931mes_SETUP, i, Q931ProcSetupTE, ATT5ESSUmes_Setup, ATT5ESSPmes_Setup);
|
||||||
Q931SetMesProc(Q931mes_SETUP_ACKNOWLEDGE, i,Q931ProcSetupAckTE, Q931Umes_SetupAck, Q931Pmes_SetupAck);
|
Q931SetMesProc(Q931mes_SETUP_ACKNOWLEDGE, i, Q931ProcSetupAckTE, Q931Umes_SetupAck, Q931Pmes_SetupAck);
|
||||||
Q931SetMesProc(Q931mes_RESUME, i,Q931ProcResumeTE, Q931Umes_Resume, Q931Pmes_Resume);
|
Q931SetMesProc(Q931mes_RESUME, i, Q931ProcResumeTE, Q931Umes_Resume, Q931Pmes_Resume);
|
||||||
Q931SetMesProc(Q931mes_RESUME_ACKNOWLEDGE, i,Q931ProcResumeAckTE, Q931Umes_ResumeAck, Q931Pmes_ResumeAck);
|
Q931SetMesProc(Q931mes_RESUME_ACKNOWLEDGE, i, Q931ProcResumeAckTE, Q931Umes_ResumeAck, Q931Pmes_ResumeAck);
|
||||||
Q931SetMesProc(Q931mes_RESUME_REJECT, i,Q931ProcResumeRejectTE, Q931Umes_ResumeReject, Q931Pmes_ResumeReject);
|
Q931SetMesProc(Q931mes_RESUME_REJECT, i, Q931ProcResumeRejectTE, Q931Umes_ResumeReject, Q931Pmes_ResumeReject);
|
||||||
Q931SetMesProc(Q931mes_SUSPEND, i,Q931ProcSuspendTE, Q931Umes_Suspend, Q931Pmes_Suspend);
|
Q931SetMesProc(Q931mes_SUSPEND, i, Q931ProcSuspendTE, Q931Umes_Suspend, Q931Pmes_Suspend);
|
||||||
Q931SetMesProc(Q931mes_SUSPEND_ACKNOWLEDGE, i,Q931ProcSuspendAckTE, Q931Umes_SuspendAck, Q931Pmes_SuspendAck);
|
Q931SetMesProc(Q931mes_SUSPEND_ACKNOWLEDGE, i, Q931ProcSuspendAckTE, Q931Umes_SuspendAck, Q931Pmes_SuspendAck);
|
||||||
Q931SetMesProc(Q931mes_SUSPEND_REJECT, i,Q931ProcSuspendRejectTE, Q931Umes_SuspendReject, Q931Pmes_SuspendReject);
|
Q931SetMesProc(Q931mes_SUSPEND_REJECT, i, Q931ProcSuspendRejectTE, Q931Umes_SuspendReject, Q931Pmes_SuspendReject);
|
||||||
Q931SetMesProc(Q931mes_USER_INFORMATION, i,Q931ProcUserInformationTE, Q931Umes_UserInformation, Q931Pmes_UserInformation);
|
Q931SetMesProc(Q931mes_USER_INFORMATION, i, Q931ProcUserInformationTE, Q931Umes_UserInformation, Q931Pmes_UserInformation);
|
||||||
Q931SetMesProc(Q931mes_DISCONNECT, i,Q931ProcDisconnectTE, Q931Umes_Disconnect, Q931Pmes_Disconnect);
|
Q931SetMesProc(Q931mes_DISCONNECT, i, Q931ProcDisconnectTE, Q931Umes_Disconnect, Q931Pmes_Disconnect);
|
||||||
Q931SetMesProc(Q931mes_RELEASE, i,Q931ProcReleaseTE, Q931Umes_Release, Q931Pmes_Release);
|
Q931SetMesProc(Q931mes_RELEASE, i, Q931ProcReleaseTE, Q931Umes_Release, Q931Pmes_Release);
|
||||||
Q931SetMesProc(Q931mes_RELEASE_COMPLETE, i,Q931ProcReleaseCompleteTE, Q931Umes_ReleaseComplete, Q931Pmes_ReleaseComplete);
|
Q931SetMesProc(Q931mes_RELEASE_COMPLETE, i, Q931ProcReleaseCompleteTE, Q931Umes_ReleaseComplete, Q931Pmes_ReleaseComplete);
|
||||||
Q931SetMesProc(Q931mes_RESTART, i,Q931ProcRestartTE, Q931Umes_Restart, Q931Pmes_Restart);
|
Q931SetMesProc(Q931mes_RESTART, i, Q931ProcRestartTE, Q931Umes_Restart, Q931Pmes_Restart);
|
||||||
Q931SetMesProc(Q931mes_RESTART_ACKNOWLEDGE, i,Q931ProcRestartAckTE, Q931Umes_RestartAck, Q931Pmes_RestartAck);
|
Q931SetMesProc(Q931mes_RESTART_ACKNOWLEDGE, i, Q931ProcRestartAckTE, Q931Umes_RestartAck, Q931Pmes_RestartAck);
|
||||||
Q931SetMesProc(Q931mes_CONGESTION_CONTROL, i,Q931ProcCongestionControlTE, Q931Umes_CongestionControl, Q931Pmes_CongestionControl);
|
Q931SetMesProc(Q931mes_CONGESTION_CONTROL, i, Q931ProcCongestionControlTE, Q931Umes_CongestionControl, Q931Pmes_CongestionControl);
|
||||||
Q931SetMesProc(Q931mes_INFORMATION, i,Q931ProcInformationTE, Q931Umes_Information, Q931Pmes_Information);
|
Q931SetMesProc(Q931mes_INFORMATION, i, Q931ProcInformationTE, Q931Umes_Information, Q931Pmes_Information);
|
||||||
Q931SetMesProc(Q931mes_NOTIFY, i,Q931ProcNotifyTE, Q931Umes_Notify, Q931Pmes_Notify);
|
Q931SetMesProc(Q931mes_NOTIFY, i, Q931ProcNotifyTE, Q931Umes_Notify, Q931Pmes_Notify);
|
||||||
Q931SetMesProc(Q931mes_STATUS, i,Q931ProcStatusTE, Q931Umes_Status, Q931Pmes_Status);
|
Q931SetMesProc(Q931mes_STATUS, i, Q931ProcStatusTE, Q931Umes_Status, Q931Pmes_Status);
|
||||||
Q931SetMesProc(Q931mes_STATUS_ENQUIRY, i,Q931ProcStatusEnquiryTE, Q931Umes_StatusEnquiry, Q931Pmes_StatusEnquiry);
|
Q931SetMesProc(Q931mes_STATUS_ENQUIRY, i, Q931ProcStatusEnquiryTE, Q931Umes_StatusEnquiry, Q931Pmes_StatusEnquiry);
|
||||||
Q931SetMesProc(Q931mes_SEGMENT, i,Q931ProcSegmentTE, Q931Umes_Segment, Q931Pmes_Segment);
|
Q931SetMesProc(Q931mes_SEGMENT, i, Q931ProcSegmentTE, Q931Umes_Segment, Q931Pmes_Segment);
|
||||||
|
|
||||||
Q931SetMesProc(Q932mes_FACILITY, i,Q932ProcFacilityTE, Q932Umes_Facility, Q932Pmes_Facility);
|
Q931SetMesProc(Q932mes_FACILITY, i, Q932ProcFacilityTE, Q932Umes_Facility, Q932Pmes_Facility);
|
||||||
Q931SetMesProc(Q932mes_HOLD, i,Q932ProcHoldTE, Q932Umes_Hold, Q932Pmes_Hold);
|
Q931SetMesProc(Q932mes_HOLD, i, Q932ProcHoldTE, Q932Umes_Hold, Q932Pmes_Hold);
|
||||||
Q931SetMesProc(Q932mes_HOLD_ACKNOWLEDGE, i,Q932ProcHoldAckTE, Q932Umes_HoldAck, Q932Pmes_HoldAck);
|
Q931SetMesProc(Q932mes_HOLD_ACKNOWLEDGE, i, Q932ProcHoldAckTE, Q932Umes_HoldAck, Q932Pmes_HoldAck);
|
||||||
Q931SetMesProc(Q932mes_HOLD_REJECT, i,Q932ProcHoldRejectTE, Q932Umes_HoldReject, Q932Pmes_HoldReject);
|
Q931SetMesProc(Q932mes_HOLD_REJECT, i, Q932ProcHoldRejectTE, Q932Umes_HoldReject, Q932Pmes_HoldReject);
|
||||||
Q931SetMesProc(Q932mes_REGISTER, i,Q932ProcRegisterTE, Q932Umes_Register, Q932Pmes_Register);
|
Q931SetMesProc(Q932mes_REGISTER, i, Q932ProcRegisterTE, Q932Umes_Register, Q932Pmes_Register);
|
||||||
Q931SetMesProc(Q932mes_RETRIEVE, i,Q932ProcRetrieveTE, Q932Umes_Retrieve, Q932Pmes_Retrieve);
|
Q931SetMesProc(Q932mes_RETRIEVE, i, Q932ProcRetrieveTE, Q932Umes_Retrieve, Q932Pmes_Retrieve);
|
||||||
Q931SetMesProc(Q932mes_RETRIEVE_ACKNOWLEDGE,i,Q932ProcRetrieveAckTE, Q932Umes_RetrieveAck, Q932Pmes_RetrieveAck);
|
Q931SetMesProc(Q932mes_RETRIEVE_ACKNOWLEDGE, i, Q932ProcRetrieveAckTE, Q932Umes_RetrieveAck, Q932Pmes_RetrieveAck);
|
||||||
Q931SetMesProc(Q932mes_RETRIEVE_REJECT, i,Q932ProcRetrieveRejectTE, Q932Umes_RetrieveReject, Q932Pmes_RetrieveReject);
|
Q931SetMesProc(Q932mes_RETRIEVE_REJECT, i, Q932ProcRetrieveRejectTE, Q932Umes_RetrieveReject, Q932Pmes_RetrieveReject);
|
||||||
|
|
||||||
/* Set up the IE encoder/decoder handle table.*/
|
/* Set up the IE encoder/decoder handle table.*/
|
||||||
Q931SetIEProc(Q931ie_SEGMENTED_MESSAGE, i,Q931Pie_Segment, Q931Uie_Segment);
|
Q931SetIEProc(Q931ie_SEGMENTED_MESSAGE, i, Q931Pie_Segment, Q931Uie_Segment);
|
||||||
Q931SetIEProc(Q931ie_BEARER_CAPABILITY, i,Q931Pie_BearerCap, Q931Uie_BearerCap);
|
Q931SetIEProc(Q931ie_BEARER_CAPABILITY, i, Q931Pie_BearerCap, Q931Uie_BearerCap);
|
||||||
Q931SetIEProc(Q931ie_CAUSE, i,Q931Pie_Cause, Q931Uie_Cause);
|
Q931SetIEProc(Q931ie_CAUSE, i, Q931Pie_Cause, Q931Uie_Cause);
|
||||||
Q931SetIEProc(Q931ie_CALL_IDENTITY, i,Q931Pie_CallID, Q931Uie_CallID);
|
Q931SetIEProc(Q931ie_CALL_IDENTITY, i, Q931Pie_CallID, Q931Uie_CallID);
|
||||||
Q931SetIEProc(Q931ie_CALL_STATE, i,Q931Pie_CallState, Q931Uie_CallState);
|
Q931SetIEProc(Q931ie_CALL_STATE, i, Q931Pie_CallState, Q931Uie_CallState);
|
||||||
Q931SetIEProc(Q931ie_CHANGE_STATUS, i,Q931Pie_ChangeStatus, Q931Uie_ChangeStatus);
|
Q931SetIEProc(Q931ie_CHANGE_STATUS, i, Q931Pie_ChangeStatus, Q931Uie_ChangeStatus);
|
||||||
Q931SetIEProc(Q931ie_CHANNEL_IDENTIFICATION, i,Q931Pie_ChanID, Q931Uie_ChanID);
|
Q931SetIEProc(Q931ie_CHANNEL_IDENTIFICATION, i, Q931Pie_ChanID, Q931Uie_ChanID);
|
||||||
Q931SetIEProc(Q931ie_PROGRESS_INDICATOR, i,Q931Pie_ProgInd, Q931Uie_ProgInd);
|
Q931SetIEProc(Q931ie_PROGRESS_INDICATOR, i, Q931Pie_ProgInd, Q931Uie_ProgInd);
|
||||||
Q931SetIEProc(Q931ie_NETWORK_SPECIFIC_FACILITIES, i,Q931Pie_NetFac, Q931Uie_NetFac);
|
Q931SetIEProc(Q931ie_NETWORK_SPECIFIC_FACILITIES, i, Q931Pie_NetFac, Q931Uie_NetFac);
|
||||||
Q931SetIEProc(Q931ie_NOTIFICATION_INDICATOR, i,Q931Pie_NotifInd, Q931Uie_NotifInd);
|
Q931SetIEProc(Q931ie_NOTIFICATION_INDICATOR, i, Q931Pie_NotifInd, Q931Uie_NotifInd);
|
||||||
Q931SetIEProc(Q931ie_DISPLAY, i,Q931Pie_Display, Q931Uie_Display);
|
Q931SetIEProc(Q931ie_DISPLAY, i, Q931Pie_Display, Q931Uie_Display);
|
||||||
Q931SetIEProc(Q931ie_DATETIME, i,Q931Pie_DateTime, Q931Uie_DateTime);
|
Q931SetIEProc(Q931ie_DATETIME, i, Q931Pie_DateTime, Q931Uie_DateTime);
|
||||||
Q931SetIEProc(Q931ie_KEYPAD_FACILITY, i,Q931Pie_KeypadFac, Q931Uie_KeypadFac);
|
Q931SetIEProc(Q931ie_KEYPAD_FACILITY, i, Q931Pie_KeypadFac, Q931Uie_KeypadFac);
|
||||||
Q931SetIEProc(Q931ie_SIGNAL, i,Q931Pie_Signal, Q931Uie_Signal);
|
Q931SetIEProc(Q931ie_SIGNAL, i, Q931Pie_Signal, Q931Uie_Signal);
|
||||||
Q931SetIEProc(Q931ie_TRANSIT_DELAY_SELECTION_AND_IND, i,Q931Pie_TransNetSel, Q931Uie_TransNetSel);
|
Q931SetIEProc(Q931ie_TRANSIT_DELAY_SELECTION_AND_IND, i, Q931Pie_TransNetSel, Q931Uie_TransNetSel);
|
||||||
Q931SetIEProc(Q931ie_CALLING_PARTY_NUMBER, i,Q931Pie_CallingNum, Q931Uie_CallingNum);
|
Q931SetIEProc(Q931ie_CALLING_PARTY_NUMBER, i, Q931Pie_CallingNum, Q931Uie_CallingNum);
|
||||||
Q931SetIEProc(Q931ie_CALLING_PARTY_SUBADDRESS, i,Q931Pie_CallingSub, Q931Uie_CallingSub);
|
Q931SetIEProc(Q931ie_CALLING_PARTY_SUBADDRESS, i, Q931Pie_CallingSub, Q931Uie_CallingSub);
|
||||||
Q931SetIEProc(Q931ie_CALLED_PARTY_NUMBER, i,Q931Pie_CalledNum, Q931Uie_CalledNum);
|
Q931SetIEProc(Q931ie_CALLED_PARTY_NUMBER, i, Q931Pie_CalledNum, Q931Uie_CalledNum);
|
||||||
Q931SetIEProc(Q931ie_CALLED_PARTY_SUBADDRESS, i,Q931Pie_CalledSub, Q931Uie_CalledSub);
|
Q931SetIEProc(Q931ie_CALLED_PARTY_SUBADDRESS, i, Q931Pie_CalledSub, Q931Uie_CalledSub);
|
||||||
Q931SetIEProc(Q931ie_TRANSIT_NETWORK_SELECTION, i,Q931Pie_TransNetSel, Q931Uie_TransNetSel);
|
Q931SetIEProc(Q931ie_TRANSIT_NETWORK_SELECTION, i, Q931Pie_TransNetSel, Q931Uie_TransNetSel);
|
||||||
Q931SetIEProc(Q931ie_RESTART_INDICATOR, i,Q931Pie_RestartInd, Q931Uie_RestartInd);
|
Q931SetIEProc(Q931ie_RESTART_INDICATOR, i, Q931Pie_RestartInd, Q931Uie_RestartInd);
|
||||||
Q931SetIEProc(Q931ie_LOW_LAYER_COMPATIBILITY, i,Q931Pie_LLComp, Q931Uie_LLComp);
|
Q931SetIEProc(Q931ie_LOW_LAYER_COMPATIBILITY, i, Q931Pie_LLComp, Q931Uie_LLComp);
|
||||||
Q931SetIEProc(Q931ie_HIGH_LAYER_COMPATIBILITY, i,Q931Pie_HLComp, Q931Uie_HLComp);
|
Q931SetIEProc(Q931ie_HIGH_LAYER_COMPATIBILITY, i, Q931Pie_HLComp, Q931Uie_HLComp);
|
||||||
Q931SetIEProc(Q931ie_USER_USER, i,Q931Pie_UserUser, Q931Uie_UserUser);
|
Q931SetIEProc(Q931ie_USER_USER, i, Q931Pie_UserUser, Q931Uie_UserUser);
|
||||||
Q931SetIEProc(Q931ie_GENERIC_DIGITS, i,Q931Pie_GenericDigits, Q931Uie_GenericDigits);
|
Q931SetIEProc(Q931ie_GENERIC_DIGITS, i, Q931Pie_GenericDigits, Q931Uie_GenericDigits);
|
||||||
|
|
||||||
Q931SetIEProc(Q931ie_CONNECTED_NUMBER, i, Q931Pie_Generic, Q931Uie_Generic);
|
Q931SetIEProc(Q931ie_CONNECTED_NUMBER, i, Q931Pie_Generic, Q931Uie_Generic);
|
||||||
Q931SetIEProc(Q931ie_FACILITY, i, Q931Pie_Generic, Q931Uie_Generic);
|
Q931SetIEProc(Q931ie_FACILITY, i, Q931Pie_Generic, Q931Uie_Generic);
|
||||||
|
@ -138,82 +138,82 @@ void ATT5ESSCreateTE(L3UCHAR i)
|
||||||
/* combination is legale. If not, the proc for unexpected message apply.*/
|
/* combination is legale. If not, the proc for unexpected message apply.*/
|
||||||
|
|
||||||
/* State 0 Idle */
|
/* State 0 Idle */
|
||||||
Q931AddStateEntry(i,Q931_U0, Q931mes_RESUME, 2);
|
Q931AddStateEntry(i, Q931_U0, Q931mes_RESUME, 2);
|
||||||
Q931AddStateEntry(i,Q931_U0, Q931mes_SETUP, 4);
|
Q931AddStateEntry(i, Q931_U0, Q931mes_SETUP, 4);
|
||||||
Q931AddStateEntry(i,Q931_U0, Q931mes_SETUP, 2);
|
Q931AddStateEntry(i, Q931_U0, Q931mes_SETUP, 2);
|
||||||
Q931AddStateEntry(i,Q931_U0, Q931mes_STATUS, 4);
|
Q931AddStateEntry(i, Q931_U0, Q931mes_STATUS, 4);
|
||||||
Q931AddStateEntry(i,Q931_U0, Q931mes_RELEASE, 4);
|
Q931AddStateEntry(i, Q931_U0, Q931mes_RELEASE, 4);
|
||||||
Q931AddStateEntry(i,Q931_U0, Q931mes_RELEASE_COMPLETE, 4);
|
Q931AddStateEntry(i, Q931_U0, Q931mes_RELEASE_COMPLETE, 4);
|
||||||
|
|
||||||
/* State 1 Call Initiating */
|
/* State 1 Call Initiating */
|
||||||
Q931AddStateEntry(i,Q931_U1, Q931mes_DISCONNECT, 2);
|
Q931AddStateEntry(i, Q931_U1, Q931mes_DISCONNECT, 2);
|
||||||
Q931AddStateEntry(i,Q931_U1, Q931mes_SETUP_ACKNOWLEDGE, 4);
|
Q931AddStateEntry(i, Q931_U1, Q931mes_SETUP_ACKNOWLEDGE, 4);
|
||||||
Q931AddStateEntry(i,Q931_U1, Q931mes_RELEASE_COMPLETE, 4);
|
Q931AddStateEntry(i, Q931_U1, Q931mes_RELEASE_COMPLETE, 4);
|
||||||
Q931AddStateEntry(i,Q931_U1, Q931mes_CALL_PROCEEDING, 4);
|
Q931AddStateEntry(i, Q931_U1, Q931mes_CALL_PROCEEDING, 4);
|
||||||
Q931AddStateEntry(i,Q931_U1, Q931mes_ALERTING, 4);
|
Q931AddStateEntry(i, Q931_U1, Q931mes_ALERTING, 4);
|
||||||
Q931AddStateEntry(i,Q931_U1, Q931mes_CONNECT, 4);
|
Q931AddStateEntry(i, Q931_U1, Q931mes_CONNECT, 4);
|
||||||
|
|
||||||
/* State 2 Overlap Sending */
|
/* State 2 Overlap Sending */
|
||||||
Q931AddStateEntry(i,Q931_U2, Q931mes_INFORMATION, 2);
|
Q931AddStateEntry(i, Q931_U2, Q931mes_INFORMATION, 2);
|
||||||
Q931AddStateEntry(i,Q931_U2, Q931mes_CALL_PROCEEDING, 4);
|
Q931AddStateEntry(i, Q931_U2, Q931mes_CALL_PROCEEDING, 4);
|
||||||
Q931AddStateEntry(i,Q931_U2, Q931mes_ALERTING, 4);
|
Q931AddStateEntry(i, Q931_U2, Q931mes_ALERTING, 4);
|
||||||
Q931AddStateEntry(i,Q931_U2, Q931mes_PROGRESS, 4);
|
Q931AddStateEntry(i, Q931_U2, Q931mes_PROGRESS, 4);
|
||||||
Q931AddStateEntry(i,Q931_U2, Q931mes_CONNECT, 4);
|
Q931AddStateEntry(i, Q931_U2, Q931mes_CONNECT, 4);
|
||||||
Q931AddStateEntry(i,Q931_U2, Q931mes_RELEASE, 2);
|
Q931AddStateEntry(i, Q931_U2, Q931mes_RELEASE, 2);
|
||||||
|
|
||||||
/* State 3 Outgoing Call Proceeding */
|
/* State 3 Outgoing Call Proceeding */
|
||||||
Q931AddStateEntry(i,Q931_U3, Q931mes_PROGRESS, 4);
|
Q931AddStateEntry(i, Q931_U3, Q931mes_PROGRESS, 4);
|
||||||
Q931AddStateEntry(i,Q931_U3, Q931mes_ALERTING, 4);
|
Q931AddStateEntry(i, Q931_U3, Q931mes_ALERTING, 4);
|
||||||
Q931AddStateEntry(i,Q931_U3, Q931mes_CONNECT, 4);
|
Q931AddStateEntry(i, Q931_U3, Q931mes_CONNECT, 4);
|
||||||
Q931AddStateEntry(i,Q931_U3, Q931mes_RELEASE, 2);
|
Q931AddStateEntry(i, Q931_U3, Q931mes_RELEASE, 2);
|
||||||
|
|
||||||
/* State 4 Call Delivered */
|
/* State 4 Call Delivered */
|
||||||
Q931AddStateEntry(i,Q931_U4, Q931mes_CONNECT, 4);
|
Q931AddStateEntry(i, Q931_U4, Q931mes_CONNECT, 4);
|
||||||
|
|
||||||
/* State 6 Call Precent */
|
/* State 6 Call Precent */
|
||||||
Q931AddStateEntry(i,Q931_U6, Q931mes_INFORMATION, 2);
|
Q931AddStateEntry(i, Q931_U6, Q931mes_INFORMATION, 2);
|
||||||
Q931AddStateEntry(i,Q931_U6, Q931mes_ALERTING, 2);
|
Q931AddStateEntry(i, Q931_U6, Q931mes_ALERTING, 2);
|
||||||
Q931AddStateEntry(i,Q931_U6, Q931mes_CALL_PROCEEDING, 2);
|
Q931AddStateEntry(i, Q931_U6, Q931mes_CALL_PROCEEDING, 2);
|
||||||
Q931AddStateEntry(i,Q931_U6, Q931mes_CONNECT, 2);
|
Q931AddStateEntry(i, Q931_U6, Q931mes_CONNECT, 2);
|
||||||
Q931AddStateEntry(i,Q931_U6, Q931mes_RELEASE_COMPLETE, 2);
|
Q931AddStateEntry(i, Q931_U6, Q931mes_RELEASE_COMPLETE, 2);
|
||||||
Q931AddStateEntry(i,Q931_U6, Q931mes_RELEASE, 4);
|
Q931AddStateEntry(i, Q931_U6, Q931mes_RELEASE, 4);
|
||||||
Q931AddStateEntry(i,Q931_U6, Q931mes_DISCONNECT, 4);
|
Q931AddStateEntry(i, Q931_U6, Q931mes_DISCONNECT, 4);
|
||||||
|
|
||||||
/* State 7 Call Received */
|
/* State 7 Call Received */
|
||||||
Q931AddStateEntry(i,Q931_U7, Q931mes_CONNECT, 2);
|
Q931AddStateEntry(i, Q931_U7, Q931mes_CONNECT, 2);
|
||||||
|
|
||||||
/* State 8 Connect request */
|
/* State 8 Connect request */
|
||||||
Q931AddStateEntry(i,Q931_U8, Q931mes_CONNECT_ACKNOWLEDGE,4);
|
Q931AddStateEntry(i, Q931_U8, Q931mes_CONNECT_ACKNOWLEDGE, 4);
|
||||||
|
|
||||||
/* State 9 Incoming Call Proceeding */
|
/* State 9 Incoming Call Proceeding */
|
||||||
Q931AddStateEntry(i,Q931_U9, Q931mes_CONNECT, 2);
|
Q931AddStateEntry(i, Q931_U9, Q931mes_CONNECT, 2);
|
||||||
Q931AddStateEntry(i,Q931_U9, Q931mes_ALERTING, 2);
|
Q931AddStateEntry(i, Q931_U9, Q931mes_ALERTING, 2);
|
||||||
Q931AddStateEntry(i,Q931_U9, Q931mes_PROGRESS, 2);
|
Q931AddStateEntry(i, Q931_U9, Q931mes_PROGRESS, 2);
|
||||||
|
|
||||||
/* State 10 Active */
|
/* State 10 Active */
|
||||||
Q931AddStateEntry(i,Q931_U10, Q931mes_SUSPEND, 2);
|
Q931AddStateEntry(i, Q931_U10, Q931mes_SUSPEND, 2);
|
||||||
Q931AddStateEntry(i,Q931_U10, Q931mes_NOTIFY, 4);
|
Q931AddStateEntry(i, Q931_U10, Q931mes_NOTIFY, 4);
|
||||||
Q931AddStateEntry(i,Q931_U10, Q931mes_NOTIFY, 2);
|
Q931AddStateEntry(i, Q931_U10, Q931mes_NOTIFY, 2);
|
||||||
|
|
||||||
/* State 11 Disconnect Request */
|
/* State 11 Disconnect Request */
|
||||||
Q931AddStateEntry(i,Q931_U11, Q931mes_RELEASE, 4);
|
Q931AddStateEntry(i, Q931_U11, Q931mes_RELEASE, 4);
|
||||||
Q931AddStateEntry(i,Q931_U11, Q931mes_DISCONNECT, 4);
|
Q931AddStateEntry(i, Q931_U11, Q931mes_DISCONNECT, 4);
|
||||||
Q931AddStateEntry(i,Q931_U11, Q931mes_NOTIFY, 4);
|
Q931AddStateEntry(i, Q931_U11, Q931mes_NOTIFY, 4);
|
||||||
|
|
||||||
/* State 12 Disconnect Ind */
|
/* State 12 Disconnect Ind */
|
||||||
Q931AddStateEntry(i,Q931_U12, Q931mes_RELEASE, 4);
|
Q931AddStateEntry(i, Q931_U12, Q931mes_RELEASE, 4);
|
||||||
Q931AddStateEntry(i,Q931_U12, Q931mes_RELEASE, 2);
|
Q931AddStateEntry(i, Q931_U12, Q931mes_RELEASE, 2);
|
||||||
|
|
||||||
/* State 15 Suspend Request */
|
/* State 15 Suspend Request */
|
||||||
Q931AddStateEntry(i,Q931_U15, Q931mes_SUSPEND_ACKNOWLEDGE,4);
|
Q931AddStateEntry(i, Q931_U15, Q931mes_SUSPEND_ACKNOWLEDGE, 4);
|
||||||
Q931AddStateEntry(i,Q931_U15, Q931mes_SUSPEND_REJECT, 4);
|
Q931AddStateEntry(i, Q931_U15, Q931mes_SUSPEND_REJECT, 4);
|
||||||
Q931AddStateEntry(i,Q931_U15, Q931mes_DISCONNECT, 4);
|
Q931AddStateEntry(i, Q931_U15, Q931mes_DISCONNECT, 4);
|
||||||
Q931AddStateEntry(i,Q931_U15, Q931mes_RELEASE, 4);
|
Q931AddStateEntry(i, Q931_U15, Q931mes_RELEASE, 4);
|
||||||
|
|
||||||
/* TODO
|
/* TODO
|
||||||
Q931AddStateEntry(i,Q931_U17,
|
Q931AddStateEntry(i, Q931_U17,
|
||||||
Q931AddStateEntry(i,Q931_U19,
|
Q931AddStateEntry(i, Q931_U19,
|
||||||
Q931AddStateEntry(i,Q931_U25,
|
Q931AddStateEntry(i, Q931_U25,
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -224,37 +224,33 @@ void ATT5ESSCreateTE(L3UCHAR i)
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
L3INT ATT5ESSProc0x0fTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom)
|
L3INT ATT5ESSProc0x0fTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom)
|
||||||
{
|
{
|
||||||
L3INT callIndex;
|
|
||||||
L3INT ret=Q931E_NO_ERROR;
|
|
||||||
Q931mes_Header *pMes = (Q931mes_Header *)&buf[Q931L4HeaderSpace];
|
Q931mes_Header *pMes = (Q931mes_Header *)&buf[Q931L4HeaderSpace];
|
||||||
|
L3INT callIndex;
|
||||||
|
L3INT ret = Q931E_NO_ERROR;
|
||||||
|
|
||||||
if (pMes->ProtDisc == 8) {
|
if (pMes->ProtDisc == 8) {
|
||||||
/* Find the call using CRV */
|
/* Find the call using CRV */
|
||||||
ret = Q931FindCRV(pTrunk, pMes->CRV, &callIndex);
|
ret = Q931FindCRV(pTrunk, pMes->CRV, &callIndex);
|
||||||
if(ret != Q931E_NO_ERROR)
|
if (ret != Q931E_NO_ERROR)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
|
||||||
/* TODO chack against state table for illegal or unexpected message here*/
|
/* TODO chack against state table for illegal or unexpected message here*/
|
||||||
|
|
||||||
/* TODO - Set correct timer here */
|
/* TODO - Set correct timer here */
|
||||||
Q931StartTimer(pTrunk, callIndex, 303);
|
Q931StartTimer(pTrunk, callIndex, 303);
|
||||||
}
|
}
|
||||||
if(iFrom == 4)
|
if (iFrom == 4) {
|
||||||
{
|
|
||||||
/* TODO Add proc here*/
|
/* TODO Add proc here*/
|
||||||
ret = Q931Tx32Data(pTrunk,0,buf,pMes->Size);
|
ret = Q931Tx32Data(pTrunk, 0, buf, pMes->Size);
|
||||||
}
|
}
|
||||||
else if (iFrom ==2)
|
else if (iFrom ==2) {
|
||||||
{
|
|
||||||
/* TODO Add proc here*/
|
/* TODO Add proc here*/
|
||||||
ret = Q931Tx34(pTrunk,buf,pMes->Size);
|
ret = Q931Tx34(pTrunk, buf, pMes->Size);
|
||||||
|
|
||||||
if (pMes->ProtDisc == 3 && pTrunk->autoServiceAck) {
|
if (pMes->ProtDisc == 3 && pTrunk->autoServiceAck) {
|
||||||
printf("autoServiceAck is on, responding to Service Req from network...\n");
|
printf("autoServiceAck is on, responding to Service Req from network...\n");
|
||||||
Q931AckService(pTrunk, buf);
|
Q931AckService(pTrunk, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
@ -267,31 +263,28 @@ L3INT ATT5ESSProc0x0fTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom)
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
L3INT ATT5ESSProc0x07TE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom)
|
L3INT ATT5ESSProc0x07TE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom)
|
||||||
{
|
{
|
||||||
L3INT callIndex;
|
|
||||||
L3INT ret=Q931E_NO_ERROR;
|
|
||||||
Q931mes_Header *pMes = (Q931mes_Header *)&buf[Q931L4HeaderSpace];
|
Q931mes_Header *pMes = (Q931mes_Header *)&buf[Q931L4HeaderSpace];
|
||||||
|
L3INT callIndex;
|
||||||
|
L3INT ret = Q931E_NO_ERROR;
|
||||||
|
|
||||||
if (pMes->ProtDisc == 8) {
|
if (pMes->ProtDisc == 8) {
|
||||||
/* Find the call using CRV */
|
/* Find the call using CRV */
|
||||||
ret = Q931FindCRV(pTrunk, pMes->CRV, &callIndex);
|
ret = Q931FindCRV(pTrunk, pMes->CRV, &callIndex);
|
||||||
if(ret != Q931E_NO_ERROR)
|
if (ret != Q931E_NO_ERROR)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
|
||||||
/* TODO chack against state table for illegal or unexpected message here*/
|
/* TODO chack against state table for illegal or unexpected message here*/
|
||||||
|
|
||||||
/* TODO - Set correct timer here */
|
/* TODO - Set correct timer here */
|
||||||
Q931StartTimer(pTrunk, callIndex, 303);
|
Q931StartTimer(pTrunk, callIndex, 303);
|
||||||
}
|
}
|
||||||
if(iFrom == 4)
|
if (iFrom == 4) {
|
||||||
{
|
|
||||||
/* TODO Add proc here*/
|
/* TODO Add proc here*/
|
||||||
ret = Q931Tx32Data(pTrunk,0,buf,pMes->Size);
|
ret = Q931Tx32Data(pTrunk, 0, buf, pMes->Size);
|
||||||
}
|
}
|
||||||
else if (iFrom ==2)
|
else if (iFrom == 2) {
|
||||||
{
|
|
||||||
/* TODO Add proc here*/
|
/* TODO Add proc here*/
|
||||||
ret = Q931Tx34(pTrunk,buf,pMes->Size);
|
ret = Q931Tx34(pTrunk, buf, pMes->Size);
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
|
|
@ -56,13 +56,13 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
L3INT ATT5ESSUmes_Setup(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, Q931mes_Generic *mes, L3INT IOff, L3INT Size)
|
L3INT ATT5ESSUmes_Setup(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, Q931mes_Generic *mes, L3INT IOff, L3INT Size)
|
||||||
{
|
{
|
||||||
L3INT ir=0;
|
L3INT ir = 0;
|
||||||
L3INT OOff=0;
|
L3INT OOff = 0;
|
||||||
L3INT rc=Q931E_NO_ERROR;
|
L3INT rc = Q931E_NO_ERROR;
|
||||||
L3UCHAR last_codeset = 0, codeset = 0;
|
L3UCHAR last_codeset = 0, codeset = 0;
|
||||||
L3UCHAR shift_lock = 1;
|
L3UCHAR shift_lock = 1;
|
||||||
|
|
||||||
while(IOff < Size)
|
while (IOff < Size)
|
||||||
{
|
{
|
||||||
if (!shift_lock) {
|
if (!shift_lock) {
|
||||||
codeset = last_codeset;
|
codeset = last_codeset;
|
||||||
|
@ -78,7 +78,7 @@ L3INT ATT5ESSUmes_Setup(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, Q931mes_Generic
|
||||||
}
|
}
|
||||||
|
|
||||||
if (codeset == 0) {
|
if (codeset == 0) {
|
||||||
switch(IBuf[IOff])
|
switch (IBuf[IOff])
|
||||||
{
|
{
|
||||||
case Q931ie_SENDING_COMPLETE:
|
case Q931ie_SENDING_COMPLETE:
|
||||||
case Q931ie_BEARER_CAPABILITY:
|
case Q931ie_BEARER_CAPABILITY:
|
||||||
|
@ -98,11 +98,11 @@ L3INT ATT5ESSUmes_Setup(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, Q931mes_Generic
|
||||||
case Q931ie_HIGH_LAYER_COMPATIBILITY:
|
case Q931ie_HIGH_LAYER_COMPATIBILITY:
|
||||||
case Q931ie_FACILITY:
|
case Q931ie_FACILITY:
|
||||||
rc = Q931Uie[pTrunk->Dialect][IBuf[IOff]](pTrunk, mes, &IBuf[IOff], &mes->buf[OOff], &IOff, &OOff);
|
rc = Q931Uie[pTrunk->Dialect][IBuf[IOff]](pTrunk, mes, &IBuf[IOff], &mes->buf[OOff], &IOff, &OOff);
|
||||||
if(rc != Q931E_NO_ERROR)
|
if (rc != Q931E_NO_ERROR)
|
||||||
return rc;
|
return rc;
|
||||||
break;
|
break;
|
||||||
case Q931ie_REPEAT_INDICATOR:
|
case Q931ie_REPEAT_INDICATOR:
|
||||||
if(ir < 2) {
|
if (ir < 2) {
|
||||||
rc = Q931Uie[pTrunk->Dialect][IBuf[IOff]](pTrunk, mes, &IBuf[IOff], &mes->buf[OOff], &IOff, &OOff);
|
rc = Q931Uie[pTrunk->Dialect][IBuf[IOff]](pTrunk, mes, &IBuf[IOff], &mes->buf[OOff], &IOff, &OOff);
|
||||||
ir++;
|
ir++;
|
||||||
} else {
|
} else {
|
||||||
|
@ -114,11 +114,11 @@ L3INT ATT5ESSUmes_Setup(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, Q931mes_Generic
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else if (codeset == 6) {
|
} else if (codeset == 6) {
|
||||||
switch(IBuf[IOff])
|
switch (IBuf[IOff])
|
||||||
{
|
{
|
||||||
case Q931ie_GENERIC_DIGITS:
|
case Q931ie_GENERIC_DIGITS:
|
||||||
rc = Q931Uie[pTrunk->Dialect][IBuf[IOff]](pTrunk, mes, &IBuf[IOff], &mes->buf[OOff], &IOff, &OOff);
|
rc = Q931Uie[pTrunk->Dialect][IBuf[IOff]](pTrunk, mes, &IBuf[IOff], &mes->buf[OOff], &IOff, &OOff);
|
||||||
if(rc != Q931E_NO_ERROR)
|
if (rc != Q931E_NO_ERROR)
|
||||||
return rc;
|
return rc;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -162,100 +162,113 @@ L3INT ATT5ESSPmes_Setup(Q931_TrunkInfo_t *pTrunk, Q931mes_Generic *IBuf, L3INT I
|
||||||
Q931MesgHeader(pTrunk, pMes, OBuf, *OSize, &Octet);
|
Q931MesgHeader(pTrunk, pMes, OBuf, *OSize, &Octet);
|
||||||
|
|
||||||
/* Sending Complete */
|
/* Sending Complete */
|
||||||
if(Q931IsIEPresent(pMes->SendComplete))
|
if (Q931IsIEPresent(pMes->SendComplete)) {
|
||||||
OBuf[Octet++] = (L3UCHAR)(pMes->SendComplete & 0x00ff);
|
OBuf[Octet++] = (L3UCHAR)(pMes->SendComplete & 0x00ff);
|
||||||
|
}
|
||||||
|
|
||||||
/* Repeat Indicator */
|
/* Repeat Indicator */
|
||||||
if(Q931IsIEPresent(pMes->RepeatInd))
|
if (Q931IsIEPresent(pMes->RepeatInd)) {
|
||||||
OBuf[Octet++] = (L3UCHAR)(pMes->RepeatInd & 0x00ff);
|
OBuf[Octet++] = (L3UCHAR)(pMes->RepeatInd & 0x00ff);
|
||||||
|
}
|
||||||
|
|
||||||
/* Bearer capability */
|
/* Bearer capability */
|
||||||
if(Q931IsIEPresent(pMes->BearerCap))
|
if (Q931IsIEPresent(pMes->BearerCap)) {
|
||||||
{
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_BEARER_CAPABILITY](pTrunk, Q931GetIEPtr(pMes->BearerCap,pMes->buf), OBuf, &Octet))!=0)
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_BEARER_CAPABILITY](pTrunk, Q931GetIEPtr(pMes->BearerCap,pMes->buf), OBuf, &Octet))!=0)
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
} else {
|
||||||
else
|
rc = Q931E_BEARERCAP;
|
||||||
{
|
|
||||||
rc=Q931E_BEARERCAP;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Channel Identification */
|
/* Channel Identification */
|
||||||
if(Q931IsIEPresent(pMes->ChanID))
|
if (Q931IsIEPresent(pMes->ChanID)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_CHANNEL_IDENTIFICATION](pTrunk, Q931GetIEPtr(pMes->ChanID,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_CHANNEL_IDENTIFICATION](pTrunk, Q931GetIEPtr(pMes->ChanID,pMes->buf), OBuf, &Octet))!=0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Progress indicator */
|
/* Progress indicator */
|
||||||
if(Q931IsIEPresent(pMes->ProgInd))
|
if (Q931IsIEPresent(pMes->ProgInd)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_PROGRESS_INDICATOR](pTrunk, Q931GetIEPtr(pMes->ProgInd,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_PROGRESS_INDICATOR](pTrunk, Q931GetIEPtr(pMes->ProgInd,pMes->buf), OBuf, &Octet))!=0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Network specific facilities */
|
/* Network specific facilities */
|
||||||
if(Q931IsIEPresent(pMes->NetFac))
|
if (Q931IsIEPresent(pMes->NetFac)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_NETWORK_SPECIFIC_FACILITIES](pTrunk, Q931GetIEPtr(pMes->NetFac,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_NETWORK_SPECIFIC_FACILITIES](pTrunk, Q931GetIEPtr(pMes->NetFac,pMes->buf), OBuf, &Octet))!=0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Display */
|
/* Display */
|
||||||
if(Q931IsIEPresent(pMes->Display))
|
if (Q931IsIEPresent(pMes->Display)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_DISPLAY](pTrunk, Q931GetIEPtr(pMes->Display,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_DISPLAY](pTrunk, Q931GetIEPtr(pMes->Display,pMes->buf), OBuf, &Octet))!=0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Date/Time */
|
/* Date/Time */
|
||||||
if(Q931IsIEPresent(pMes->DateTime))
|
if (Q931IsIEPresent(pMes->DateTime)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_DATETIME](pTrunk, Q931GetIEPtr(pMes->DateTime,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_DATETIME](pTrunk, Q931GetIEPtr(pMes->DateTime,pMes->buf), OBuf, &Octet))!=0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Keypad Facility */
|
/* Keypad Facility */
|
||||||
if(Q931IsIEPresent(pMes->KeypadFac))
|
if (Q931IsIEPresent(pMes->KeypadFac)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_KEYPAD_FACILITY](pTrunk, Q931GetIEPtr(pMes->KeypadFac,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_KEYPAD_FACILITY](pTrunk, Q931GetIEPtr(pMes->KeypadFac,pMes->buf), OBuf, &Octet))!=0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Signal */
|
/* Signal */
|
||||||
if(Q931IsIEPresent(pMes->Signal))
|
if (Q931IsIEPresent(pMes->Signal)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_SIGNAL](pTrunk, Q931GetIEPtr(pMes->Signal,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_SIGNAL](pTrunk, Q931GetIEPtr(pMes->Signal,pMes->buf), OBuf, &Octet))!=0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Calling Party Number */
|
/* Calling Party Number */
|
||||||
if(Q931IsIEPresent(pMes->CallingNum))
|
if (Q931IsIEPresent(pMes->CallingNum)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_CALLING_PARTY_NUMBER](pTrunk, Q931GetIEPtr(pMes->CallingNum,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_CALLING_PARTY_NUMBER](pTrunk, Q931GetIEPtr(pMes->CallingNum,pMes->buf), OBuf, &Octet))!=0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Calling Party Subaddress */
|
/* Calling Party Subaddress */
|
||||||
if(Q931IsIEPresent(pMes->CallingSub))
|
if (Q931IsIEPresent(pMes->CallingSub)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_CALLING_PARTY_SUBADDRESS](pTrunk, Q931GetIEPtr(pMes->CallingSub,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_CALLING_PARTY_SUBADDRESS](pTrunk, Q931GetIEPtr(pMes->CallingSub,pMes->buf), OBuf, &Octet))!=0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Called Party number */
|
/* Called Party number */
|
||||||
if(Q931IsIEPresent(pMes->CalledNum))
|
if (Q931IsIEPresent(pMes->CalledNum)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_CALLED_PARTY_NUMBER](pTrunk, Q931GetIEPtr(pMes->CalledNum,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_CALLED_PARTY_NUMBER](pTrunk, Q931GetIEPtr(pMes->CalledNum,pMes->buf), OBuf, &Octet))!=0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Called party subaddress */
|
/* Called party subaddress */
|
||||||
if(Q931IsIEPresent(pMes->CalledSub))
|
if (Q931IsIEPresent(pMes->CalledSub)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_CALLED_PARTY_SUBADDRESS](pTrunk, Q931GetIEPtr(pMes->CalledSub,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_CALLED_PARTY_SUBADDRESS](pTrunk, Q931GetIEPtr(pMes->CalledSub,pMes->buf), OBuf, &Octet))!=0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Transit network selection */
|
/* Transit network selection */
|
||||||
if(Q931IsIEPresent(pMes->TransNetSel))
|
if (Q931IsIEPresent(pMes->TransNetSel)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_TRANSIT_NETWORK_SELECTION](pTrunk, Q931GetIEPtr(pMes->TransNetSel,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_TRANSIT_NETWORK_SELECTION](pTrunk, Q931GetIEPtr(pMes->TransNetSel,pMes->buf), OBuf, &Octet))!=0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Repeat Indicator */
|
/* Repeat Indicator */
|
||||||
if(Q931IsIEPresent(pMes->LLRepeatInd))
|
if (Q931IsIEPresent(pMes->LLRepeatInd)) {
|
||||||
rc = Q931E_UNKNOWN_IE;/* TODO */
|
rc = Q931E_UNKNOWN_IE;/* TODO */
|
||||||
|
}
|
||||||
|
|
||||||
/* Low Layer Compatibility */
|
/* Low Layer Compatibility */
|
||||||
if(Q931IsIEPresent(pMes->LLComp))
|
if (Q931IsIEPresent(pMes->LLComp)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_LOW_LAYER_COMPATIBILITY](pTrunk, Q931GetIEPtr(pMes->LLComp,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_LOW_LAYER_COMPATIBILITY](pTrunk, Q931GetIEPtr(pMes->LLComp,pMes->buf), OBuf, &Octet))!=0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* High Layer Compatibility */
|
/* High Layer Compatibility */
|
||||||
if(Q931IsIEPresent(pMes->HLComp))
|
if (Q931IsIEPresent(pMes->HLComp)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_HIGH_LAYER_COMPATIBILITY](pTrunk, Q931GetIEPtr(pMes->HLComp,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_HIGH_LAYER_COMPATIBILITY](pTrunk, Q931GetIEPtr(pMes->HLComp,pMes->buf), OBuf, &Octet))!=0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
*OSize = Octet;
|
*OSize = Octet;
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,66 +57,66 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
void DMSCreateNT(L3UCHAR i)
|
void DMSCreateNT(L3UCHAR i)
|
||||||
{
|
{
|
||||||
Q931SetMesProc(Q931mes_ALERTING, i,Q931ProcAlertingNT, Q931Umes_Alerting, Q931Pmes_Alerting);
|
Q931SetMesProc(Q931mes_ALERTING, i, Q931ProcAlertingNT, Q931Umes_Alerting, Q931Pmes_Alerting);
|
||||||
Q931SetMesProc(Q931mes_CALL_PROCEEDING, i,Q931ProcCallProceedingNT, Q931Umes_CallProceeding, Q931Pmes_CallProceeding);
|
Q931SetMesProc(Q931mes_CALL_PROCEEDING, i, Q931ProcCallProceedingNT, Q931Umes_CallProceeding, Q931Pmes_CallProceeding);
|
||||||
Q931SetMesProc(Q931mes_CONNECT, i,Q931ProcConnectNT, Q931Umes_Connect, Q931Pmes_Connect);
|
Q931SetMesProc(Q931mes_CONNECT, i, Q931ProcConnectNT, Q931Umes_Connect, Q931Pmes_Connect);
|
||||||
Q931SetMesProc(Q931mes_CONNECT_ACKNOWLEDGE, i,Q931ProcConnectAckNT, Q931Umes_ConnectAck, Q931Pmes_ConnectAck);
|
Q931SetMesProc(Q931mes_CONNECT_ACKNOWLEDGE, i, Q931ProcConnectAckNT, Q931Umes_ConnectAck, Q931Pmes_ConnectAck);
|
||||||
Q931SetMesProc(Q931mes_PROGRESS, i,Q931ProcProgressNT, Q931Umes_Progress, Q931Pmes_Progress);
|
Q931SetMesProc(Q931mes_PROGRESS, i, Q931ProcProgressNT, Q931Umes_Progress, Q931Pmes_Progress);
|
||||||
Q931SetMesProc(Q931mes_SETUP, i,Q931ProcSetupNT, DMSUmes_Setup, DMSPmes_Setup);
|
Q931SetMesProc(Q931mes_SETUP, i, Q931ProcSetupNT, DMSUmes_Setup, DMSPmes_Setup);
|
||||||
Q931SetMesProc(Q931mes_SETUP_ACKNOWLEDGE, i,Q931ProcSetupAckNT, Q931Umes_SetupAck, Q931Pmes_SetupAck);
|
Q931SetMesProc(Q931mes_SETUP_ACKNOWLEDGE, i, Q931ProcSetupAckNT, Q931Umes_SetupAck, Q931Pmes_SetupAck);
|
||||||
Q931SetMesProc(Q931mes_RESUME, i,Q931ProcResumeNT, Q931Umes_Resume, Q931Pmes_Resume);
|
Q931SetMesProc(Q931mes_RESUME, i, Q931ProcResumeNT, Q931Umes_Resume, Q931Pmes_Resume);
|
||||||
Q931SetMesProc(Q931mes_RESUME_ACKNOWLEDGE, i,Q931ProcResumeAckNT, Q931Umes_ResumeAck, Q931Pmes_ResumeAck);
|
Q931SetMesProc(Q931mes_RESUME_ACKNOWLEDGE, i, Q931ProcResumeAckNT, Q931Umes_ResumeAck, Q931Pmes_ResumeAck);
|
||||||
Q931SetMesProc(Q931mes_RESUME_REJECT, i,Q931ProcResumeRejectNT, Q931Umes_ResumeReject, Q931Pmes_ResumeReject);
|
Q931SetMesProc(Q931mes_RESUME_REJECT, i, Q931ProcResumeRejectNT, Q931Umes_ResumeReject, Q931Pmes_ResumeReject);
|
||||||
Q931SetMesProc(Q931mes_SUSPEND, i,Q931ProcSuspendNT, Q931Umes_Suspend, Q931Pmes_Suspend);
|
Q931SetMesProc(Q931mes_SUSPEND, i, Q931ProcSuspendNT, Q931Umes_Suspend, Q931Pmes_Suspend);
|
||||||
Q931SetMesProc(Q931mes_SUSPEND_ACKNOWLEDGE, i,Q931ProcSuspendAckNT, Q931Umes_SuspendAck, Q931Pmes_SuspendAck);
|
Q931SetMesProc(Q931mes_SUSPEND_ACKNOWLEDGE, i, Q931ProcSuspendAckNT, Q931Umes_SuspendAck, Q931Pmes_SuspendAck);
|
||||||
Q931SetMesProc(Q931mes_SUSPEND_REJECT, i,Q931ProcSuspendRejectNT, Q931Umes_SuspendReject, Q931Pmes_SuspendReject);
|
Q931SetMesProc(Q931mes_SUSPEND_REJECT, i, Q931ProcSuspendRejectNT, Q931Umes_SuspendReject, Q931Pmes_SuspendReject);
|
||||||
Q931SetMesProc(Q931mes_USER_INFORMATION, i,Q931ProcUserInformationNT, Q931Umes_UserInformation, Q931Pmes_UserInformation);
|
Q931SetMesProc(Q931mes_USER_INFORMATION, i, Q931ProcUserInformationNT, Q931Umes_UserInformation, Q931Pmes_UserInformation);
|
||||||
Q931SetMesProc(Q931mes_DISCONNECT, i,Q931ProcDisconnectNT, Q931Umes_Disconnect, Q931Pmes_Disconnect);
|
Q931SetMesProc(Q931mes_DISCONNECT, i, Q931ProcDisconnectNT, Q931Umes_Disconnect, Q931Pmes_Disconnect);
|
||||||
Q931SetMesProc(Q931mes_RELEASE, i,Q931ProcReleaseNT, Q931Umes_Release, Q931Pmes_Release);
|
Q931SetMesProc(Q931mes_RELEASE, i, Q931ProcReleaseNT, Q931Umes_Release, Q931Pmes_Release);
|
||||||
Q931SetMesProc(Q931mes_RELEASE_COMPLETE, i,Q931ProcReleaseCompleteNT, Q931Umes_ReleaseComplete, Q931Pmes_ReleaseComplete);
|
Q931SetMesProc(Q931mes_RELEASE_COMPLETE, i, Q931ProcReleaseCompleteNT, Q931Umes_ReleaseComplete, Q931Pmes_ReleaseComplete);
|
||||||
Q931SetMesProc(Q931mes_RESTART, i,Q931ProcRestartNT, Q931Umes_Restart, Q931Pmes_Restart);
|
Q931SetMesProc(Q931mes_RESTART, i, Q931ProcRestartNT, Q931Umes_Restart, Q931Pmes_Restart);
|
||||||
Q931SetMesProc(Q931mes_RESTART_ACKNOWLEDGE, i,Q931ProcRestartAckNT, Q931Umes_RestartAck, Q931Pmes_RestartAck);
|
Q931SetMesProc(Q931mes_RESTART_ACKNOWLEDGE, i, Q931ProcRestartAckNT, Q931Umes_RestartAck, Q931Pmes_RestartAck);
|
||||||
Q931SetMesProc(Q931mes_CONGESTION_CONTROL, i,Q931ProcCongestionControlNT, Q931Umes_CongestionControl, Q931Pmes_CongestionControl);
|
Q931SetMesProc(Q931mes_CONGESTION_CONTROL, i, Q931ProcCongestionControlNT, Q931Umes_CongestionControl, Q931Pmes_CongestionControl);
|
||||||
Q931SetMesProc(Q931mes_INFORMATION, i,Q931ProcInformationNT, Q931Umes_Information, Q931Pmes_Information);
|
Q931SetMesProc(Q931mes_INFORMATION, i, Q931ProcInformationNT, Q931Umes_Information, Q931Pmes_Information);
|
||||||
Q931SetMesProc(Q931mes_NOTIFY, i,Q931ProcNotifyNT, Q931Umes_Notify, Q931Pmes_Notify);
|
Q931SetMesProc(Q931mes_NOTIFY, i, Q931ProcNotifyNT, Q931Umes_Notify, Q931Pmes_Notify);
|
||||||
Q931SetMesProc(Q931mes_STATUS, i,Q931ProcStatusNT, Q931Umes_Status, Q931Pmes_Status);
|
Q931SetMesProc(Q931mes_STATUS, i, Q931ProcStatusNT, Q931Umes_Status, Q931Pmes_Status);
|
||||||
Q931SetMesProc(Q931mes_STATUS_ENQUIRY, i,Q931ProcStatusEnquiryNT, Q931Umes_StatusEnquiry, Q931Pmes_StatusEnquiry);
|
Q931SetMesProc(Q931mes_STATUS_ENQUIRY, i, Q931ProcStatusEnquiryNT, Q931Umes_StatusEnquiry, Q931Pmes_StatusEnquiry);
|
||||||
Q931SetMesProc(Q931mes_SEGMENT, i,Q931ProcSegmentNT, Q931Umes_Segment, Q931Pmes_Segment);
|
Q931SetMesProc(Q931mes_SEGMENT, i, Q931ProcSegmentNT, Q931Umes_Segment, Q931Pmes_Segment);
|
||||||
|
|
||||||
Q931SetMesProc(Q932mes_FACILITY, i,Q932ProcFacilityNT, Q932Umes_Facility, Q932Pmes_Facility);
|
Q931SetMesProc(Q932mes_FACILITY, i, Q932ProcFacilityNT, Q932Umes_Facility, Q932Pmes_Facility);
|
||||||
Q931SetMesProc(Q932mes_HOLD, i,Q932ProcHoldNT, Q932Umes_Hold, Q932Pmes_Hold);
|
Q931SetMesProc(Q932mes_HOLD, i, Q932ProcHoldNT, Q932Umes_Hold, Q932Pmes_Hold);
|
||||||
Q931SetMesProc(Q932mes_HOLD_ACKNOWLEDGE, i,Q932ProcHoldAckNT, Q932Umes_HoldAck, Q932Pmes_HoldAck);
|
Q931SetMesProc(Q932mes_HOLD_ACKNOWLEDGE, i, Q932ProcHoldAckNT, Q932Umes_HoldAck, Q932Pmes_HoldAck);
|
||||||
Q931SetMesProc(Q932mes_HOLD_REJECT, i,Q932ProcHoldRejectNT, Q932Umes_HoldReject, Q932Pmes_HoldReject);
|
Q931SetMesProc(Q932mes_HOLD_REJECT, i, Q932ProcHoldRejectNT, Q932Umes_HoldReject, Q932Pmes_HoldReject);
|
||||||
Q931SetMesProc(Q932mes_REGISTER, i,Q932ProcRegisterNT, Q932Umes_Register, Q932Pmes_Register);
|
Q931SetMesProc(Q932mes_REGISTER, i, Q932ProcRegisterNT, Q932Umes_Register, Q932Pmes_Register);
|
||||||
Q931SetMesProc(Q932mes_RETRIEVE, i,Q932ProcRetrieveNT, Q932Umes_Retrieve, Q932Pmes_Retrieve);
|
Q931SetMesProc(Q932mes_RETRIEVE, i, Q932ProcRetrieveNT, Q932Umes_Retrieve, Q932Pmes_Retrieve);
|
||||||
Q931SetMesProc(Q932mes_RETRIEVE_ACKNOWLEDGE,i,Q932ProcRetrieveAckNT, Q932Umes_RetrieveAck, Q932Pmes_RetrieveAck);
|
Q931SetMesProc(Q932mes_RETRIEVE_ACKNOWLEDGE, i, Q932ProcRetrieveAckNT, Q932Umes_RetrieveAck, Q932Pmes_RetrieveAck);
|
||||||
Q931SetMesProc(Q932mes_RETRIEVE_REJECT, i,Q932ProcRetrieveRejectNT, Q932Umes_RetrieveReject, Q932Pmes_RetrieveReject);
|
Q931SetMesProc(Q932mes_RETRIEVE_REJECT, i, Q932ProcRetrieveRejectNT, Q932Umes_RetrieveReject, Q932Pmes_RetrieveReject);
|
||||||
|
|
||||||
/* Set up the IE encoder/decoder handle table.*/
|
/* Set up the IE encoder/decoder handle table.*/
|
||||||
Q931SetIEProc(Q931ie_SEGMENTED_MESSAGE, i,Q931Pie_Segment, Q931Uie_Segment);
|
Q931SetIEProc(Q931ie_SEGMENTED_MESSAGE, i, Q931Pie_Segment, Q931Uie_Segment);
|
||||||
Q931SetIEProc(Q931ie_BEARER_CAPABILITY, i,Q931Pie_BearerCap, Q931Uie_BearerCap);
|
Q931SetIEProc(Q931ie_BEARER_CAPABILITY, i, Q931Pie_BearerCap, Q931Uie_BearerCap);
|
||||||
Q931SetIEProc(Q931ie_CAUSE, i,Q931Pie_Cause, Q931Uie_Cause);
|
Q931SetIEProc(Q931ie_CAUSE, i, Q931Pie_Cause, Q931Uie_Cause);
|
||||||
Q931SetIEProc(Q931ie_CALL_IDENTITY, i,Q931Pie_CallID, Q931Uie_CallID);
|
Q931SetIEProc(Q931ie_CALL_IDENTITY, i, Q931Pie_CallID, Q931Uie_CallID);
|
||||||
Q931SetIEProc(Q931ie_CALL_STATE, i,Q931Pie_CallState, Q931Uie_CallState);
|
Q931SetIEProc(Q931ie_CALL_STATE, i, Q931Pie_CallState, Q931Uie_CallState);
|
||||||
Q931SetIEProc(Q931ie_CHANNEL_IDENTIFICATION, i,Q931Pie_ChanID, Q931Uie_ChanID);
|
Q931SetIEProc(Q931ie_CHANNEL_IDENTIFICATION, i, Q931Pie_ChanID, Q931Uie_ChanID);
|
||||||
Q931SetIEProc(Q931ie_PROGRESS_INDICATOR, i,Q931Pie_ProgInd, Q931Uie_ProgInd);
|
Q931SetIEProc(Q931ie_PROGRESS_INDICATOR, i, Q931Pie_ProgInd, Q931Uie_ProgInd);
|
||||||
Q931SetIEProc(Q931ie_NETWORK_SPECIFIC_FACILITIES, i,Q931Pie_NetFac, Q931Uie_NetFac);
|
Q931SetIEProc(Q931ie_NETWORK_SPECIFIC_FACILITIES, i, Q931Pie_NetFac, Q931Uie_NetFac);
|
||||||
Q931SetIEProc(Q931ie_NOTIFICATION_INDICATOR, i,Q931Pie_NotifInd, Q931Uie_NotifInd);
|
Q931SetIEProc(Q931ie_NOTIFICATION_INDICATOR, i, Q931Pie_NotifInd, Q931Uie_NotifInd);
|
||||||
Q931SetIEProc(Q931ie_DISPLAY, i,Q931Pie_Display, Q931Uie_Display);
|
Q931SetIEProc(Q931ie_DISPLAY, i, Q931Pie_Display, Q931Uie_Display);
|
||||||
Q931SetIEProc(Q931ie_DATETIME, i,Q931Pie_DateTime, Q931Uie_DateTime);
|
Q931SetIEProc(Q931ie_DATETIME, i, Q931Pie_DateTime, Q931Uie_DateTime);
|
||||||
Q931SetIEProc(Q931ie_KEYPAD_FACILITY, i,Q931Pie_KeypadFac, Q931Uie_KeypadFac);
|
Q931SetIEProc(Q931ie_KEYPAD_FACILITY, i, Q931Pie_KeypadFac, Q931Uie_KeypadFac);
|
||||||
Q931SetIEProc(Q931ie_SIGNAL, i,Q931Pie_Signal, Q931Uie_Signal);
|
Q931SetIEProc(Q931ie_SIGNAL, i, Q931Pie_Signal, Q931Uie_Signal);
|
||||||
Q931SetIEProc(Q931ie_TRANSIT_DELAY_SELECTION_AND_IND, i,Q931Pie_TransNetSel, Q931Uie_TransNetSel);
|
Q931SetIEProc(Q931ie_TRANSIT_DELAY_SELECTION_AND_IND, i, Q931Pie_TransNetSel, Q931Uie_TransNetSel);
|
||||||
Q931SetIEProc(Q931ie_CALLING_PARTY_NUMBER, i,Q931Pie_CallingNum, Q931Uie_CallingNum);
|
Q931SetIEProc(Q931ie_CALLING_PARTY_NUMBER, i, Q931Pie_CallingNum, Q931Uie_CallingNum);
|
||||||
Q931SetIEProc(Q931ie_CALLING_PARTY_SUBADDRESS, i,Q931Pie_CallingSub, Q931Uie_CallingSub);
|
Q931SetIEProc(Q931ie_CALLING_PARTY_SUBADDRESS, i, Q931Pie_CallingSub, Q931Uie_CallingSub);
|
||||||
Q931SetIEProc(Q931ie_CALLED_PARTY_NUMBER, i,Q931Pie_CalledNum, Q931Uie_CalledNum);
|
Q931SetIEProc(Q931ie_CALLED_PARTY_NUMBER, i, Q931Pie_CalledNum, Q931Uie_CalledNum);
|
||||||
Q931SetIEProc(Q931ie_CALLED_PARTY_SUBADDRESS, i,Q931Pie_CalledSub, Q931Uie_CalledSub);
|
Q931SetIEProc(Q931ie_CALLED_PARTY_SUBADDRESS, i, Q931Pie_CalledSub, Q931Uie_CalledSub);
|
||||||
Q931SetIEProc(Q931ie_TRANSIT_NETWORK_SELECTION, i,Q931Pie_TransNetSel, Q931Uie_TransNetSel);
|
Q931SetIEProc(Q931ie_TRANSIT_NETWORK_SELECTION, i, Q931Pie_TransNetSel, Q931Uie_TransNetSel);
|
||||||
Q931SetIEProc(Q931ie_RESTART_INDICATOR, i,Q931Pie_RestartInd, Q931Uie_RestartInd);
|
Q931SetIEProc(Q931ie_RESTART_INDICATOR, i, Q931Pie_RestartInd, Q931Uie_RestartInd);
|
||||||
Q931SetIEProc(Q931ie_LOW_LAYER_COMPATIBILITY, i,Q931Pie_LLComp, Q931Uie_LLComp);
|
Q931SetIEProc(Q931ie_LOW_LAYER_COMPATIBILITY, i, Q931Pie_LLComp, Q931Uie_LLComp);
|
||||||
Q931SetIEProc(Q931ie_HIGH_LAYER_COMPATIBILITY, i,Q931Pie_HLComp, Q931Uie_HLComp);
|
Q931SetIEProc(Q931ie_HIGH_LAYER_COMPATIBILITY, i, Q931Pie_HLComp, Q931Uie_HLComp);
|
||||||
Q931SetIEProc(Q931ie_USER_USER, i,Q931Pie_UserUser, Q931Uie_UserUser);
|
Q931SetIEProc(Q931ie_USER_USER, i, Q931Pie_UserUser, Q931Uie_UserUser);
|
||||||
Q931SetIEProc(Q931ie_GENERIC_DIGITS, i,Q931Pie_GenericDigits, Q931Uie_GenericDigits);
|
Q931SetIEProc(Q931ie_GENERIC_DIGITS, i, Q931Pie_GenericDigits, Q931Uie_GenericDigits);
|
||||||
|
|
||||||
/* The following define a state machine. The point is that the Message */
|
/* The following define a state machine. The point is that the Message */
|
||||||
/* procs can when search this to find out if the message/state */
|
/* procs can when search this to find out if the message/state */
|
||||||
|
|
|
@ -65,149 +65,149 @@ extern L3INT Q931L4HeaderSpace;
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
void DMSCreateTE(L3UCHAR i)
|
void DMSCreateTE(L3UCHAR i)
|
||||||
{
|
{
|
||||||
Q931SetMesProc(Q931mes_ALERTING, i,Q931ProcAlertingTE, Q931Umes_Alerting, Q931Pmes_Alerting);
|
Q931SetMesProc(Q931mes_ALERTING, i, Q931ProcAlertingTE, Q931Umes_Alerting, Q931Pmes_Alerting);
|
||||||
Q931SetMesProc(Q931mes_CALL_PROCEEDING, i,Q931ProcCallProceedingTE, Q931Umes_CallProceeding, Q931Pmes_CallProceeding);
|
Q931SetMesProc(Q931mes_CALL_PROCEEDING, i, Q931ProcCallProceedingTE, Q931Umes_CallProceeding, Q931Pmes_CallProceeding);
|
||||||
Q931SetMesProc(Q931mes_CONNECT, i,DMSProc0x07TE, DMSUmes_0x07, DMSPmes_0x07);
|
Q931SetMesProc(Q931mes_CONNECT, i, DMSProc0x07TE, DMSUmes_0x07, DMSPmes_0x07);
|
||||||
Q931SetMesProc(Q931mes_CONNECT_ACKNOWLEDGE, i,DMSProc0x0fTE, DMSUmes_0x0f, DMSPmes_0x0f);
|
Q931SetMesProc(Q931mes_CONNECT_ACKNOWLEDGE, i, DMSProc0x0fTE, DMSUmes_0x0f, DMSPmes_0x0f);
|
||||||
Q931SetMesProc(Q931mes_PROGRESS, i,Q931ProcProgressTE, Q931Umes_Progress, Q931Pmes_Progress);
|
Q931SetMesProc(Q931mes_PROGRESS, i, Q931ProcProgressTE, Q931Umes_Progress, Q931Pmes_Progress);
|
||||||
Q931SetMesProc(Q931mes_SETUP, i,Q931ProcSetupTE, DMSUmes_Setup, DMSPmes_Setup);
|
Q931SetMesProc(Q931mes_SETUP, i, Q931ProcSetupTE, DMSUmes_Setup, DMSPmes_Setup);
|
||||||
Q931SetMesProc(Q931mes_SETUP_ACKNOWLEDGE, i,Q931ProcSetupAckTE, Q931Umes_SetupAck, Q931Pmes_SetupAck);
|
Q931SetMesProc(Q931mes_SETUP_ACKNOWLEDGE, i, Q931ProcSetupAckTE, Q931Umes_SetupAck, Q931Pmes_SetupAck);
|
||||||
Q931SetMesProc(Q931mes_RESUME, i,Q931ProcResumeTE, Q931Umes_Resume, Q931Pmes_Resume);
|
Q931SetMesProc(Q931mes_RESUME, i, Q931ProcResumeTE, Q931Umes_Resume, Q931Pmes_Resume);
|
||||||
Q931SetMesProc(Q931mes_RESUME_ACKNOWLEDGE, i,Q931ProcResumeAckTE, Q931Umes_ResumeAck, Q931Pmes_ResumeAck);
|
Q931SetMesProc(Q931mes_RESUME_ACKNOWLEDGE, i, Q931ProcResumeAckTE, Q931Umes_ResumeAck, Q931Pmes_ResumeAck);
|
||||||
Q931SetMesProc(Q931mes_RESUME_REJECT, i,Q931ProcResumeRejectTE, Q931Umes_ResumeReject, Q931Pmes_ResumeReject);
|
Q931SetMesProc(Q931mes_RESUME_REJECT, i, Q931ProcResumeRejectTE, Q931Umes_ResumeReject, Q931Pmes_ResumeReject);
|
||||||
Q931SetMesProc(Q931mes_SUSPEND, i,Q931ProcSuspendTE, Q931Umes_Suspend, Q931Pmes_Suspend);
|
Q931SetMesProc(Q931mes_SUSPEND, i, Q931ProcSuspendTE, Q931Umes_Suspend, Q931Pmes_Suspend);
|
||||||
Q931SetMesProc(Q931mes_SUSPEND_ACKNOWLEDGE, i,Q931ProcSuspendAckTE, Q931Umes_SuspendAck, Q931Pmes_SuspendAck);
|
Q931SetMesProc(Q931mes_SUSPEND_ACKNOWLEDGE, i, Q931ProcSuspendAckTE, Q931Umes_SuspendAck, Q931Pmes_SuspendAck);
|
||||||
Q931SetMesProc(Q931mes_SUSPEND_REJECT, i,Q931ProcSuspendRejectTE, Q931Umes_SuspendReject, Q931Pmes_SuspendReject);
|
Q931SetMesProc(Q931mes_SUSPEND_REJECT, i, Q931ProcSuspendRejectTE, Q931Umes_SuspendReject, Q931Pmes_SuspendReject);
|
||||||
Q931SetMesProc(Q931mes_USER_INFORMATION, i,Q931ProcUserInformationTE, Q931Umes_UserInformation, Q931Pmes_UserInformation);
|
Q931SetMesProc(Q931mes_USER_INFORMATION, i, Q931ProcUserInformationTE, Q931Umes_UserInformation, Q931Pmes_UserInformation);
|
||||||
Q931SetMesProc(Q931mes_DISCONNECT, i,Q931ProcDisconnectTE, Q931Umes_Disconnect, Q931Pmes_Disconnect);
|
Q931SetMesProc(Q931mes_DISCONNECT, i, Q931ProcDisconnectTE, Q931Umes_Disconnect, Q931Pmes_Disconnect);
|
||||||
Q931SetMesProc(Q931mes_RELEASE, i,Q931ProcReleaseTE, Q931Umes_Release, Q931Pmes_Release);
|
Q931SetMesProc(Q931mes_RELEASE, i, Q931ProcReleaseTE, Q931Umes_Release, Q931Pmes_Release);
|
||||||
Q931SetMesProc(Q931mes_RELEASE_COMPLETE, i,Q931ProcReleaseCompleteTE, Q931Umes_ReleaseComplete, Q931Pmes_ReleaseComplete);
|
Q931SetMesProc(Q931mes_RELEASE_COMPLETE, i, Q931ProcReleaseCompleteTE, Q931Umes_ReleaseComplete, Q931Pmes_ReleaseComplete);
|
||||||
Q931SetMesProc(Q931mes_RESTART, i,Q931ProcRestartTE, Q931Umes_Restart, Q931Pmes_Restart);
|
Q931SetMesProc(Q931mes_RESTART, i, Q931ProcRestartTE, Q931Umes_Restart, Q931Pmes_Restart);
|
||||||
Q931SetMesProc(Q931mes_RESTART_ACKNOWLEDGE, i,Q931ProcRestartAckTE, Q931Umes_RestartAck, Q931Pmes_RestartAck);
|
Q931SetMesProc(Q931mes_RESTART_ACKNOWLEDGE, i, Q931ProcRestartAckTE, Q931Umes_RestartAck, Q931Pmes_RestartAck);
|
||||||
Q931SetMesProc(Q931mes_CONGESTION_CONTROL, i,Q931ProcCongestionControlTE, Q931Umes_CongestionControl, Q931Pmes_CongestionControl);
|
Q931SetMesProc(Q931mes_CONGESTION_CONTROL, i, Q931ProcCongestionControlTE, Q931Umes_CongestionControl, Q931Pmes_CongestionControl);
|
||||||
Q931SetMesProc(Q931mes_INFORMATION, i,Q931ProcInformationTE, Q931Umes_Information, Q931Pmes_Information);
|
Q931SetMesProc(Q931mes_INFORMATION, i, Q931ProcInformationTE, Q931Umes_Information, Q931Pmes_Information);
|
||||||
Q931SetMesProc(Q931mes_NOTIFY, i,Q931ProcNotifyTE, Q931Umes_Notify, Q931Pmes_Notify);
|
Q931SetMesProc(Q931mes_NOTIFY, i, Q931ProcNotifyTE, Q931Umes_Notify, Q931Pmes_Notify);
|
||||||
Q931SetMesProc(Q931mes_STATUS, i,Q931ProcStatusTE, Q931Umes_Status, Q931Pmes_Status);
|
Q931SetMesProc(Q931mes_STATUS, i, Q931ProcStatusTE, Q931Umes_Status, Q931Pmes_Status);
|
||||||
Q931SetMesProc(Q931mes_STATUS_ENQUIRY, i,Q931ProcStatusEnquiryTE, Q931Umes_StatusEnquiry, Q931Pmes_StatusEnquiry);
|
Q931SetMesProc(Q931mes_STATUS_ENQUIRY, i, Q931ProcStatusEnquiryTE, Q931Umes_StatusEnquiry, Q931Pmes_StatusEnquiry);
|
||||||
Q931SetMesProc(Q931mes_SEGMENT, i,Q931ProcSegmentTE, Q931Umes_Segment, Q931Pmes_Segment);
|
Q931SetMesProc(Q931mes_SEGMENT, i, Q931ProcSegmentTE, Q931Umes_Segment, Q931Pmes_Segment);
|
||||||
|
|
||||||
Q931SetMesProc(Q932mes_FACILITY, i,Q932ProcFacilityTE, Q932Umes_Facility, Q932Pmes_Facility);
|
Q931SetMesProc(Q932mes_FACILITY, i, Q932ProcFacilityTE, Q932Umes_Facility, Q932Pmes_Facility);
|
||||||
Q931SetMesProc(Q932mes_HOLD, i,Q932ProcHoldTE, Q932Umes_Hold, Q932Pmes_Hold);
|
Q931SetMesProc(Q932mes_HOLD, i, Q932ProcHoldTE, Q932Umes_Hold, Q932Pmes_Hold);
|
||||||
Q931SetMesProc(Q932mes_HOLD_ACKNOWLEDGE, i,Q932ProcHoldAckTE, Q932Umes_HoldAck, Q932Pmes_HoldAck);
|
Q931SetMesProc(Q932mes_HOLD_ACKNOWLEDGE, i, Q932ProcHoldAckTE, Q932Umes_HoldAck, Q932Pmes_HoldAck);
|
||||||
Q931SetMesProc(Q932mes_HOLD_REJECT, i,Q932ProcHoldRejectTE, Q932Umes_HoldReject, Q932Pmes_HoldReject);
|
Q931SetMesProc(Q932mes_HOLD_REJECT, i, Q932ProcHoldRejectTE, Q932Umes_HoldReject, Q932Pmes_HoldReject);
|
||||||
Q931SetMesProc(Q932mes_REGISTER, i,Q932ProcRegisterTE, Q932Umes_Register, Q932Pmes_Register);
|
Q931SetMesProc(Q932mes_REGISTER, i, Q932ProcRegisterTE, Q932Umes_Register, Q932Pmes_Register);
|
||||||
Q931SetMesProc(Q932mes_RETRIEVE, i,Q932ProcRetrieveTE, Q932Umes_Retrieve, Q932Pmes_Retrieve);
|
Q931SetMesProc(Q932mes_RETRIEVE, i, Q932ProcRetrieveTE, Q932Umes_Retrieve, Q932Pmes_Retrieve);
|
||||||
Q931SetMesProc(Q932mes_RETRIEVE_ACKNOWLEDGE,i,Q932ProcRetrieveAckTE, Q932Umes_RetrieveAck, Q932Pmes_RetrieveAck);
|
Q931SetMesProc(Q932mes_RETRIEVE_ACKNOWLEDGE, i, Q932ProcRetrieveAckTE, Q932Umes_RetrieveAck, Q932Pmes_RetrieveAck);
|
||||||
Q931SetMesProc(Q932mes_RETRIEVE_REJECT, i,Q932ProcRetrieveRejectTE, Q932Umes_RetrieveReject, Q932Pmes_RetrieveReject);
|
Q931SetMesProc(Q932mes_RETRIEVE_REJECT, i, Q932ProcRetrieveRejectTE, Q932Umes_RetrieveReject, Q932Pmes_RetrieveReject);
|
||||||
|
|
||||||
/* Set up the IE encoder/decoder handle table.*/
|
/* Set up the IE encoder/decoder handle table.*/
|
||||||
Q931SetIEProc(Q931ie_SEGMENTED_MESSAGE, i,Q931Pie_Segment, Q931Uie_Segment);
|
Q931SetIEProc(Q931ie_SEGMENTED_MESSAGE, i, Q931Pie_Segment, Q931Uie_Segment);
|
||||||
Q931SetIEProc(Q931ie_BEARER_CAPABILITY, i,Q931Pie_BearerCap, Q931Uie_BearerCap);
|
Q931SetIEProc(Q931ie_BEARER_CAPABILITY, i, Q931Pie_BearerCap, Q931Uie_BearerCap);
|
||||||
Q931SetIEProc(Q931ie_CAUSE, i,Q931Pie_Cause, Q931Uie_Cause);
|
Q931SetIEProc(Q931ie_CAUSE, i, Q931Pie_Cause, Q931Uie_Cause);
|
||||||
Q931SetIEProc(Q931ie_CALL_IDENTITY, i,Q931Pie_CallID, Q931Uie_CallID);
|
Q931SetIEProc(Q931ie_CALL_IDENTITY, i, Q931Pie_CallID, Q931Uie_CallID);
|
||||||
Q931SetIEProc(Q931ie_CALL_STATE, i,Q931Pie_CallState, Q931Uie_CallState);
|
Q931SetIEProc(Q931ie_CALL_STATE, i, Q931Pie_CallState, Q931Uie_CallState);
|
||||||
Q931SetIEProc(Q931ie_CHANGE_STATUS, i,Q931Pie_ChangeStatus, Q931Uie_ChangeStatus);
|
Q931SetIEProc(Q931ie_CHANGE_STATUS, i, Q931Pie_ChangeStatus, Q931Uie_ChangeStatus);
|
||||||
Q931SetIEProc(Q931ie_CHANNEL_IDENTIFICATION, i,Q931Pie_ChanID, Q931Uie_ChanID);
|
Q931SetIEProc(Q931ie_CHANNEL_IDENTIFICATION, i, Q931Pie_ChanID, Q931Uie_ChanID);
|
||||||
Q931SetIEProc(Q931ie_PROGRESS_INDICATOR, i,Q931Pie_ProgInd, Q931Uie_ProgInd);
|
Q931SetIEProc(Q931ie_PROGRESS_INDICATOR, i, Q931Pie_ProgInd, Q931Uie_ProgInd);
|
||||||
Q931SetIEProc(Q931ie_NETWORK_SPECIFIC_FACILITIES, i,Q931Pie_NetFac, Q931Uie_NetFac);
|
Q931SetIEProc(Q931ie_NETWORK_SPECIFIC_FACILITIES, i, Q931Pie_NetFac, Q931Uie_NetFac);
|
||||||
Q931SetIEProc(Q931ie_NOTIFICATION_INDICATOR, i,Q931Pie_NotifInd, Q931Uie_NotifInd);
|
Q931SetIEProc(Q931ie_NOTIFICATION_INDICATOR, i, Q931Pie_NotifInd, Q931Uie_NotifInd);
|
||||||
Q931SetIEProc(Q931ie_DISPLAY, i,Q931Pie_Display, Q931Uie_Display);
|
Q931SetIEProc(Q931ie_DISPLAY, i, Q931Pie_Display, Q931Uie_Display);
|
||||||
Q931SetIEProc(Q931ie_DATETIME, i,Q931Pie_DateTime, Q931Uie_DateTime);
|
Q931SetIEProc(Q931ie_DATETIME, i, Q931Pie_DateTime, Q931Uie_DateTime);
|
||||||
Q931SetIEProc(Q931ie_KEYPAD_FACILITY, i,Q931Pie_KeypadFac, Q931Uie_KeypadFac);
|
Q931SetIEProc(Q931ie_KEYPAD_FACILITY, i, Q931Pie_KeypadFac, Q931Uie_KeypadFac);
|
||||||
Q931SetIEProc(Q931ie_SIGNAL, i,Q931Pie_Signal, Q931Uie_Signal);
|
Q931SetIEProc(Q931ie_SIGNAL, i, Q931Pie_Signal, Q931Uie_Signal);
|
||||||
Q931SetIEProc(Q931ie_TRANSIT_DELAY_SELECTION_AND_IND, i,Q931Pie_TransNetSel, Q931Uie_TransNetSel);
|
Q931SetIEProc(Q931ie_TRANSIT_DELAY_SELECTION_AND_IND, i, Q931Pie_TransNetSel, Q931Uie_TransNetSel);
|
||||||
Q931SetIEProc(Q931ie_CALLING_PARTY_NUMBER, i,Q931Pie_CallingNum, Q931Uie_CallingNum);
|
Q931SetIEProc(Q931ie_CALLING_PARTY_NUMBER, i, Q931Pie_CallingNum, Q931Uie_CallingNum);
|
||||||
Q931SetIEProc(Q931ie_CALLING_PARTY_SUBADDRESS, i,Q931Pie_CallingSub, Q931Uie_CallingSub);
|
Q931SetIEProc(Q931ie_CALLING_PARTY_SUBADDRESS, i, Q931Pie_CallingSub, Q931Uie_CallingSub);
|
||||||
Q931SetIEProc(Q931ie_CALLED_PARTY_NUMBER, i,Q931Pie_CalledNum, Q931Uie_CalledNum);
|
Q931SetIEProc(Q931ie_CALLED_PARTY_NUMBER, i, Q931Pie_CalledNum, Q931Uie_CalledNum);
|
||||||
Q931SetIEProc(Q931ie_CALLED_PARTY_SUBADDRESS, i,Q931Pie_CalledSub, Q931Uie_CalledSub);
|
Q931SetIEProc(Q931ie_CALLED_PARTY_SUBADDRESS, i, Q931Pie_CalledSub, Q931Uie_CalledSub);
|
||||||
Q931SetIEProc(Q931ie_TRANSIT_NETWORK_SELECTION, i,Q931Pie_TransNetSel, Q931Uie_TransNetSel);
|
Q931SetIEProc(Q931ie_TRANSIT_NETWORK_SELECTION, i, Q931Pie_TransNetSel, Q931Uie_TransNetSel);
|
||||||
Q931SetIEProc(Q931ie_RESTART_INDICATOR, i,Q931Pie_RestartInd, Q931Uie_RestartInd);
|
Q931SetIEProc(Q931ie_RESTART_INDICATOR, i, Q931Pie_RestartInd, Q931Uie_RestartInd);
|
||||||
Q931SetIEProc(Q931ie_LOW_LAYER_COMPATIBILITY, i,Q931Pie_LLComp, Q931Uie_LLComp);
|
Q931SetIEProc(Q931ie_LOW_LAYER_COMPATIBILITY, i, Q931Pie_LLComp, Q931Uie_LLComp);
|
||||||
Q931SetIEProc(Q931ie_HIGH_LAYER_COMPATIBILITY, i,Q931Pie_HLComp, Q931Uie_HLComp);
|
Q931SetIEProc(Q931ie_HIGH_LAYER_COMPATIBILITY, i, Q931Pie_HLComp, Q931Uie_HLComp);
|
||||||
Q931SetIEProc(Q931ie_USER_USER, i,Q931Pie_UserUser, Q931Uie_UserUser);
|
Q931SetIEProc(Q931ie_USER_USER, i, Q931Pie_UserUser, Q931Uie_UserUser);
|
||||||
Q931SetIEProc(Q931ie_GENERIC_DIGITS, i,Q931Pie_GenericDigits, Q931Uie_GenericDigits);
|
Q931SetIEProc(Q931ie_GENERIC_DIGITS, i, Q931Pie_GenericDigits, Q931Uie_GenericDigits);
|
||||||
|
|
||||||
/* The following define a state machine. The point is that the Message */
|
/* The following define a state machine. The point is that the Message */
|
||||||
/* procs can when search this to find out if the message/state */
|
/* procs can when search this to find out if the message/state */
|
||||||
/* combination is legale. If not, the proc for unexpected message apply.*/
|
/* combination is legale. If not, the proc for unexpected message apply.*/
|
||||||
|
|
||||||
/* State 0 Idle */
|
/* State 0 Idle */
|
||||||
Q931AddStateEntry(i,Q931_U0, Q931mes_RESUME, 2);
|
Q931AddStateEntry(i, Q931_U0, Q931mes_RESUME, 2);
|
||||||
Q931AddStateEntry(i,Q931_U0, Q931mes_SETUP, 4);
|
Q931AddStateEntry(i, Q931_U0, Q931mes_SETUP, 4);
|
||||||
Q931AddStateEntry(i,Q931_U0, Q931mes_SETUP, 2);
|
Q931AddStateEntry(i, Q931_U0, Q931mes_SETUP, 2);
|
||||||
Q931AddStateEntry(i,Q931_U0, Q931mes_STATUS, 4);
|
Q931AddStateEntry(i, Q931_U0, Q931mes_STATUS, 4);
|
||||||
Q931AddStateEntry(i,Q931_U0, Q931mes_RELEASE, 4);
|
Q931AddStateEntry(i, Q931_U0, Q931mes_RELEASE, 4);
|
||||||
Q931AddStateEntry(i,Q931_U0, Q931mes_RELEASE_COMPLETE,4);
|
Q931AddStateEntry(i, Q931_U0, Q931mes_RELEASE_COMPLETE, 4);
|
||||||
|
|
||||||
/* State 1 Call Initiating */
|
/* State 1 Call Initiating */
|
||||||
Q931AddStateEntry(i,Q931_U1, Q931mes_DISCONNECT, 2);
|
Q931AddStateEntry(i, Q931_U1, Q931mes_DISCONNECT, 2);
|
||||||
Q931AddStateEntry(i,Q931_U1, Q931mes_SETUP_ACKNOWLEDGE, 4);
|
Q931AddStateEntry(i, Q931_U1, Q931mes_SETUP_ACKNOWLEDGE, 4);
|
||||||
Q931AddStateEntry(i,Q931_U1, Q931mes_RELEASE_COMPLETE,4);
|
Q931AddStateEntry(i, Q931_U1, Q931mes_RELEASE_COMPLETE, 4);
|
||||||
Q931AddStateEntry(i,Q931_U1, Q931mes_CALL_PROCEEDING, 4);
|
Q931AddStateEntry(i, Q931_U1, Q931mes_CALL_PROCEEDING, 4);
|
||||||
Q931AddStateEntry(i,Q931_U1, Q931mes_ALERTING, 4);
|
Q931AddStateEntry(i, Q931_U1, Q931mes_ALERTING, 4);
|
||||||
Q931AddStateEntry(i,Q931_U1, Q931mes_CONNECT, 4);
|
Q931AddStateEntry(i, Q931_U1, Q931mes_CONNECT, 4);
|
||||||
|
|
||||||
/* State 2 Overlap Sending */
|
/* State 2 Overlap Sending */
|
||||||
Q931AddStateEntry(i,Q931_U2, Q931mes_INFORMATION, 2);
|
Q931AddStateEntry(i, Q931_U2, Q931mes_INFORMATION, 2);
|
||||||
Q931AddStateEntry(i,Q931_U2, Q931mes_CALL_PROCEEDING, 4);
|
Q931AddStateEntry(i, Q931_U2, Q931mes_CALL_PROCEEDING, 4);
|
||||||
Q931AddStateEntry(i,Q931_U2, Q931mes_ALERTING, 4);
|
Q931AddStateEntry(i, Q931_U2, Q931mes_ALERTING, 4);
|
||||||
Q931AddStateEntry(i,Q931_U2, Q931mes_PROGRESS, 4);
|
Q931AddStateEntry(i, Q931_U2, Q931mes_PROGRESS, 4);
|
||||||
Q931AddStateEntry(i,Q931_U2, Q931mes_CONNECT, 4);
|
Q931AddStateEntry(i, Q931_U2, Q931mes_CONNECT, 4);
|
||||||
Q931AddStateEntry(i,Q931_U2, Q931mes_RELEASE, 2);
|
Q931AddStateEntry(i, Q931_U2, Q931mes_RELEASE, 2);
|
||||||
|
|
||||||
/* State 3 Outgoing Call Proceeding */
|
/* State 3 Outgoing Call Proceeding */
|
||||||
Q931AddStateEntry(i,Q931_U3, Q931mes_PROGRESS, 4);
|
Q931AddStateEntry(i, Q931_U3, Q931mes_PROGRESS, 4);
|
||||||
Q931AddStateEntry(i,Q931_U3, Q931mes_ALERTING, 4);
|
Q931AddStateEntry(i, Q931_U3, Q931mes_ALERTING, 4);
|
||||||
Q931AddStateEntry(i,Q931_U3, Q931mes_CONNECT, 4);
|
Q931AddStateEntry(i, Q931_U3, Q931mes_CONNECT, 4);
|
||||||
Q931AddStateEntry(i,Q931_U3, Q931mes_RELEASE, 2);
|
Q931AddStateEntry(i, Q931_U3, Q931mes_RELEASE, 2);
|
||||||
|
|
||||||
/* State 4 Call Delivered */
|
/* State 4 Call Delivered */
|
||||||
Q931AddStateEntry(i,Q931_U4, Q931mes_CONNECT, 4);
|
Q931AddStateEntry(i, Q931_U4, Q931mes_CONNECT, 4);
|
||||||
|
|
||||||
/* State 6 Call Precent */
|
/* State 6 Call Precent */
|
||||||
Q931AddStateEntry(i,Q931_U6, Q931mes_INFORMATION, 2);
|
Q931AddStateEntry(i, Q931_U6, Q931mes_INFORMATION, 2);
|
||||||
Q931AddStateEntry(i,Q931_U6, Q931mes_ALERTING, 2);
|
Q931AddStateEntry(i, Q931_U6, Q931mes_ALERTING, 2);
|
||||||
Q931AddStateEntry(i,Q931_U6, Q931mes_CALL_PROCEEDING,2);
|
Q931AddStateEntry(i, Q931_U6, Q931mes_CALL_PROCEEDING, 2);
|
||||||
Q931AddStateEntry(i,Q931_U6, Q931mes_CONNECT, 2);
|
Q931AddStateEntry(i, Q931_U6, Q931mes_CONNECT, 2);
|
||||||
Q931AddStateEntry(i,Q931_U6, Q931mes_RELEASE_COMPLETE,2);
|
Q931AddStateEntry(i, Q931_U6, Q931mes_RELEASE_COMPLETE, 2);
|
||||||
Q931AddStateEntry(i,Q931_U6, Q931mes_RELEASE, 4);
|
Q931AddStateEntry(i, Q931_U6, Q931mes_RELEASE, 4);
|
||||||
Q931AddStateEntry(i,Q931_U6, Q931mes_DISCONNECT, 4);
|
Q931AddStateEntry(i, Q931_U6, Q931mes_DISCONNECT, 4);
|
||||||
|
|
||||||
/* State 7 Call Received */
|
/* State 7 Call Received */
|
||||||
Q931AddStateEntry(i,Q931_U7, Q931mes_CONNECT, 2);
|
Q931AddStateEntry(i, Q931_U7, Q931mes_CONNECT, 2);
|
||||||
|
|
||||||
/* State 8 Connect request */
|
/* State 8 Connect request */
|
||||||
Q931AddStateEntry(i,Q931_U8, Q931mes_CONNECT_ACKNOWLEDGE, 4);
|
Q931AddStateEntry(i, Q931_U8, Q931mes_CONNECT_ACKNOWLEDGE, 4);
|
||||||
|
|
||||||
/* State 9 Incoming Call Proceeding */
|
/* State 9 Incoming Call Proceeding */
|
||||||
Q931AddStateEntry(i,Q931_U9, Q931mes_CONNECT, 2);
|
Q931AddStateEntry(i, Q931_U9, Q931mes_CONNECT, 2);
|
||||||
Q931AddStateEntry(i,Q931_U9, Q931mes_ALERTING, 2);
|
Q931AddStateEntry(i, Q931_U9, Q931mes_ALERTING, 2);
|
||||||
Q931AddStateEntry(i,Q931_U9, Q931mes_PROGRESS, 2);
|
Q931AddStateEntry(i, Q931_U9, Q931mes_PROGRESS, 2);
|
||||||
|
|
||||||
/* State 10 Active */
|
/* State 10 Active */
|
||||||
Q931AddStateEntry(i,Q931_U10, Q931mes_SUSPEND, 2);
|
Q931AddStateEntry(i, Q931_U10, Q931mes_SUSPEND, 2);
|
||||||
Q931AddStateEntry(i,Q931_U10, Q931mes_NOTIFY, 4);
|
Q931AddStateEntry(i, Q931_U10, Q931mes_NOTIFY, 4);
|
||||||
Q931AddStateEntry(i,Q931_U10, Q931mes_NOTIFY, 2);
|
Q931AddStateEntry(i, Q931_U10, Q931mes_NOTIFY, 2);
|
||||||
|
|
||||||
/* State 11 Disconnect Request */
|
/* State 11 Disconnect Request */
|
||||||
Q931AddStateEntry(i,Q931_U11, Q931mes_RELEASE, 4);
|
Q931AddStateEntry(i, Q931_U11, Q931mes_RELEASE, 4);
|
||||||
Q931AddStateEntry(i,Q931_U11, Q931mes_DISCONNECT, 4);
|
Q931AddStateEntry(i, Q931_U11, Q931mes_DISCONNECT, 4);
|
||||||
Q931AddStateEntry(i,Q931_U11, Q931mes_NOTIFY, 4);
|
Q931AddStateEntry(i, Q931_U11, Q931mes_NOTIFY, 4);
|
||||||
|
|
||||||
/* State 12 Disconnect Ind */
|
/* State 12 Disconnect Ind */
|
||||||
Q931AddStateEntry(i,Q931_U12, Q931mes_RELEASE, 4);
|
Q931AddStateEntry(i, Q931_U12, Q931mes_RELEASE, 4);
|
||||||
Q931AddStateEntry(i,Q931_U12, Q931mes_RELEASE, 2);
|
Q931AddStateEntry(i, Q931_U12, Q931mes_RELEASE, 2);
|
||||||
|
|
||||||
/* State 15 Suspend Request */
|
/* State 15 Suspend Request */
|
||||||
Q931AddStateEntry(i,Q931_U15, Q931mes_SUSPEND_ACKNOWLEDGE, 4);
|
Q931AddStateEntry(i, Q931_U15, Q931mes_SUSPEND_ACKNOWLEDGE, 4);
|
||||||
Q931AddStateEntry(i,Q931_U15, Q931mes_SUSPEND_REJECT, 4);
|
Q931AddStateEntry(i, Q931_U15, Q931mes_SUSPEND_REJECT, 4);
|
||||||
Q931AddStateEntry(i,Q931_U15, Q931mes_DISCONNECT, 4);
|
Q931AddStateEntry(i, Q931_U15, Q931mes_DISCONNECT, 4);
|
||||||
Q931AddStateEntry(i,Q931_U15, Q931mes_RELEASE, 4);
|
Q931AddStateEntry(i, Q931_U15, Q931mes_RELEASE, 4);
|
||||||
|
|
||||||
/* TODO
|
/* TODO
|
||||||
Q931AddStateEntry(i,Q931_U17,
|
Q931AddStateEntry(i, Q931_U17,
|
||||||
Q931AddStateEntry(i,Q931_U19,
|
Q931AddStateEntry(i, Q931_U19,
|
||||||
Q931AddStateEntry(i,Q931_U25,
|
Q931AddStateEntry(i, Q931_U25,
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -218,36 +218,32 @@ void DMSCreateTE(L3UCHAR i)
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
L3INT DMSProc0x0fTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom)
|
L3INT DMSProc0x0fTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom)
|
||||||
{
|
{
|
||||||
L3INT callIndex;
|
|
||||||
L3INT ret=Q931E_NO_ERROR;
|
|
||||||
Q931mes_Header *pMes = (Q931mes_Header *)&buf[Q931L4HeaderSpace];
|
Q931mes_Header *pMes = (Q931mes_Header *)&buf[Q931L4HeaderSpace];
|
||||||
|
L3INT callIndex;
|
||||||
|
L3INT ret = Q931E_NO_ERROR;
|
||||||
|
|
||||||
if (pMes->ProtDisc == 8) {
|
if (pMes->ProtDisc == 8) {
|
||||||
/* Find the call using CRV */
|
/* Find the call using CRV */
|
||||||
ret = Q931FindCRV(pTrunk, pMes->CRV, &callIndex);
|
ret = Q931FindCRV(pTrunk, pMes->CRV, &callIndex);
|
||||||
if(ret != Q931E_NO_ERROR)
|
if (ret != Q931E_NO_ERROR)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
|
||||||
/* TODO chack against state table for illegal or unexpected message here*/
|
/* TODO chack against state table for illegal or unexpected message here*/
|
||||||
|
|
||||||
/* TODO - Set correct timer here */
|
/* TODO - Set correct timer here */
|
||||||
Q931StartTimer(pTrunk, callIndex, 303);
|
Q931StartTimer(pTrunk, callIndex, 303);
|
||||||
}
|
}
|
||||||
if(iFrom == 4)
|
if (iFrom == 4) {
|
||||||
{
|
|
||||||
/* TODO Add proc here*/
|
/* TODO Add proc here*/
|
||||||
ret = Q931Tx32Data(pTrunk,0,buf,pMes->Size);
|
ret = Q931Tx32Data(pTrunk, 0, buf, pMes->Size);
|
||||||
}
|
}
|
||||||
else if (iFrom ==2)
|
else if (iFrom == 2) {
|
||||||
{
|
|
||||||
/* TODO Add proc here*/
|
/* TODO Add proc here*/
|
||||||
ret = Q931Tx34(pTrunk,buf,pMes->Size);
|
ret = Q931Tx34(pTrunk, buf, pMes->Size);
|
||||||
|
|
||||||
if (pMes->ProtDisc == 3 && pTrunk->autoServiceAck) {
|
if (pMes->ProtDisc == 3 && pTrunk->autoServiceAck) {
|
||||||
Q931AckService(pTrunk, buf);
|
Q931AckService(pTrunk, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
@ -260,31 +256,28 @@ L3INT DMSProc0x0fTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom)
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
L3INT DMSProc0x07TE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom)
|
L3INT DMSProc0x07TE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom)
|
||||||
{
|
{
|
||||||
L3INT callIndex;
|
|
||||||
L3INT ret=Q931E_NO_ERROR;
|
|
||||||
Q931mes_Header *pMes = (Q931mes_Header *)&buf[Q931L4HeaderSpace];
|
Q931mes_Header *pMes = (Q931mes_Header *)&buf[Q931L4HeaderSpace];
|
||||||
|
L3INT callIndex;
|
||||||
|
L3INT ret = Q931E_NO_ERROR;
|
||||||
|
|
||||||
if (pMes->ProtDisc == 8) {
|
if (pMes->ProtDisc == 8) {
|
||||||
/* Find the call using CRV */
|
/* Find the call using CRV */
|
||||||
ret = Q931FindCRV(pTrunk, pMes->CRV, &callIndex);
|
ret = Q931FindCRV(pTrunk, pMes->CRV, &callIndex);
|
||||||
if(ret != Q931E_NO_ERROR)
|
if (ret != Q931E_NO_ERROR)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
|
||||||
/* TODO chack against state table for illegal or unexpected message here*/
|
/* TODO chack against state table for illegal or unexpected message here*/
|
||||||
|
|
||||||
/* TODO - Set correct timer here */
|
/* TODO - Set correct timer here */
|
||||||
Q931StartTimer(pTrunk, callIndex, 303);
|
Q931StartTimer(pTrunk, callIndex, 303);
|
||||||
}
|
}
|
||||||
if(iFrom == 4)
|
if (iFrom == 4) {
|
||||||
{
|
|
||||||
/* TODO Add proc here*/
|
/* TODO Add proc here*/
|
||||||
ret = Q931Tx32Data(pTrunk,0,buf,pMes->Size);
|
ret = Q931Tx32Data(pTrunk, 0, buf, pMes->Size);
|
||||||
}
|
}
|
||||||
else if (iFrom ==2)
|
else if (iFrom == 2) {
|
||||||
{
|
|
||||||
/* TODO Add proc here*/
|
/* TODO Add proc here*/
|
||||||
ret = Q931Tx34(pTrunk,buf,pMes->Size);
|
ret = Q931Tx34(pTrunk, buf, pMes->Size);
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
|
|
@ -53,14 +53,13 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
L3INT DMSUmes_Setup(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, Q931mes_Generic *mes, L3INT IOff, L3INT Size)
|
L3INT DMSUmes_Setup(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, Q931mes_Generic *mes, L3INT IOff, L3INT Size)
|
||||||
{
|
{
|
||||||
L3INT ir=0;
|
L3INT ir = 0;
|
||||||
L3INT OOff=0;
|
L3INT OOff = 0;
|
||||||
L3INT rc=Q931E_NO_ERROR;
|
L3INT rc = Q931E_NO_ERROR;
|
||||||
L3UCHAR last_codeset = 0, codeset = 0;
|
L3UCHAR last_codeset = 0, codeset = 0;
|
||||||
L3UCHAR shift_lock = 1;
|
L3UCHAR shift_lock = 1;
|
||||||
|
|
||||||
while(IOff < Size)
|
while (IOff < Size) {
|
||||||
{
|
|
||||||
if (!shift_lock) {
|
if (!shift_lock) {
|
||||||
codeset = last_codeset;
|
codeset = last_codeset;
|
||||||
}
|
}
|
||||||
|
@ -75,8 +74,7 @@ L3INT DMSUmes_Setup(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, Q931mes_Generic *me
|
||||||
}
|
}
|
||||||
|
|
||||||
if (codeset == 0) {
|
if (codeset == 0) {
|
||||||
switch(IBuf[IOff])
|
switch (IBuf[IOff]) {
|
||||||
{
|
|
||||||
case Q931ie_SENDING_COMPLETE:
|
case Q931ie_SENDING_COMPLETE:
|
||||||
case Q931ie_BEARER_CAPABILITY:
|
case Q931ie_BEARER_CAPABILITY:
|
||||||
case Q931ie_CHANNEL_IDENTIFICATION:
|
case Q931ie_CHANNEL_IDENTIFICATION:
|
||||||
|
@ -94,11 +92,11 @@ L3INT DMSUmes_Setup(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, Q931mes_Generic *me
|
||||||
case Q931ie_LOW_LAYER_COMPATIBILITY:
|
case Q931ie_LOW_LAYER_COMPATIBILITY:
|
||||||
case Q931ie_HIGH_LAYER_COMPATIBILITY:
|
case Q931ie_HIGH_LAYER_COMPATIBILITY:
|
||||||
rc = Q931Uie[pTrunk->Dialect][IBuf[IOff]](pTrunk, mes, &IBuf[IOff], &mes->buf[OOff], &IOff, &OOff);
|
rc = Q931Uie[pTrunk->Dialect][IBuf[IOff]](pTrunk, mes, &IBuf[IOff], &mes->buf[OOff], &IOff, &OOff);
|
||||||
if(rc != Q931E_NO_ERROR)
|
if (rc != Q931E_NO_ERROR)
|
||||||
return rc;
|
return rc;
|
||||||
break;
|
break;
|
||||||
case Q931ie_REPEAT_INDICATOR:
|
case Q931ie_REPEAT_INDICATOR:
|
||||||
if(ir < 2) {
|
if (ir < 2) {
|
||||||
rc = Q931Uie[pTrunk->Dialect][IBuf[IOff]](pTrunk, mes, &IBuf[IOff], &mes->buf[OOff], &IOff, &OOff);
|
rc = Q931Uie[pTrunk->Dialect][IBuf[IOff]](pTrunk, mes, &IBuf[IOff], &mes->buf[OOff], &IOff, &OOff);
|
||||||
ir++;
|
ir++;
|
||||||
} else {
|
} else {
|
||||||
|
@ -110,11 +108,10 @@ L3INT DMSUmes_Setup(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, Q931mes_Generic *me
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else if (codeset == 6) {
|
} else if (codeset == 6) {
|
||||||
switch(IBuf[IOff])
|
switch (IBuf[IOff]) {
|
||||||
{
|
|
||||||
case Q931ie_GENERIC_DIGITS:
|
case Q931ie_GENERIC_DIGITS:
|
||||||
rc = Q931Uie[pTrunk->Dialect][IBuf[IOff]](pTrunk, mes, &IBuf[IOff], &mes->buf[OOff], &IOff, &OOff);
|
rc = Q931Uie[pTrunk->Dialect][IBuf[IOff]](pTrunk, mes, &IBuf[IOff], &mes->buf[OOff], &IOff, &OOff);
|
||||||
if(rc != Q931E_NO_ERROR)
|
if (rc != Q931E_NO_ERROR)
|
||||||
return rc;
|
return rc;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -158,100 +155,114 @@ L3INT DMSPmes_Setup(Q931_TrunkInfo_t *pTrunk, Q931mes_Generic *IBuf, L3INT ISize
|
||||||
Q931MesgHeader(pTrunk, pMes, OBuf, *OSize, &Octet);
|
Q931MesgHeader(pTrunk, pMes, OBuf, *OSize, &Octet);
|
||||||
|
|
||||||
/* Sending Complete */
|
/* Sending Complete */
|
||||||
if(Q931IsIEPresent(pMes->SendComplete))
|
if (Q931IsIEPresent(pMes->SendComplete)) {
|
||||||
OBuf[Octet++] = (L3UCHAR)(pMes->SendComplete & 0x00ff);
|
OBuf[Octet++] = (L3UCHAR)(pMes->SendComplete & 0x00ff);
|
||||||
|
}
|
||||||
|
|
||||||
/* Repeat Indicator */
|
/* Repeat Indicator */
|
||||||
if(Q931IsIEPresent(pMes->RepeatInd))
|
if (Q931IsIEPresent(pMes->RepeatInd)) {
|
||||||
OBuf[Octet++] = (L3UCHAR)(pMes->RepeatInd & 0x00ff);
|
OBuf[Octet++] = (L3UCHAR)(pMes->RepeatInd & 0x00ff);
|
||||||
|
}
|
||||||
|
|
||||||
/* Bearer capability */
|
/* Bearer capability */
|
||||||
if(Q931IsIEPresent(pMes->BearerCap))
|
if (Q931IsIEPresent(pMes->BearerCap)) {
|
||||||
{
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_BEARER_CAPABILITY](pTrunk, Q931GetIEPtr(pMes->BearerCap,pMes->buf), OBuf, &Octet)) != 0)
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_BEARER_CAPABILITY](pTrunk, Q931GetIEPtr(pMes->BearerCap,pMes->buf), OBuf, &Octet))!=0)
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
} else {
|
||||||
else
|
rc = Q931E_BEARERCAP;
|
||||||
{
|
|
||||||
rc=Q931E_BEARERCAP;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Channel Identification */
|
/* Channel Identification */
|
||||||
if(Q931IsIEPresent(pMes->ChanID))
|
if (Q931IsIEPresent(pMes->ChanID)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_CHANNEL_IDENTIFICATION](pTrunk, Q931GetIEPtr(pMes->ChanID,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_CHANNEL_IDENTIFICATION](pTrunk, Q931GetIEPtr(pMes->ChanID,pMes->buf), OBuf, &Octet)) != 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Progress indicator */
|
/* Progress indicator */
|
||||||
if(Q931IsIEPresent(pMes->ProgInd))
|
if (Q931IsIEPresent(pMes->ProgInd)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_PROGRESS_INDICATOR](pTrunk, Q931GetIEPtr(pMes->ProgInd,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_PROGRESS_INDICATOR](pTrunk, Q931GetIEPtr(pMes->ProgInd,pMes->buf), OBuf, &Octet)) != 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Network spesific facilities */
|
/* Network spesific facilities */
|
||||||
if(Q931IsIEPresent(pMes->NetFac))
|
if (Q931IsIEPresent(pMes->NetFac)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_NETWORK_SPECIFIC_FACILITIES](pTrunk, Q931GetIEPtr(pMes->NetFac,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_NETWORK_SPECIFIC_FACILITIES](pTrunk, Q931GetIEPtr(pMes->NetFac,pMes->buf), OBuf, &Octet)) != 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Display */
|
/* Display */
|
||||||
if(Q931IsIEPresent(pMes->Display))
|
if (Q931IsIEPresent(pMes->Display)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_DISPLAY](pTrunk, Q931GetIEPtr(pMes->Display,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_DISPLAY](pTrunk, Q931GetIEPtr(pMes->Display,pMes->buf), OBuf, &Octet)) != 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Date/Time */
|
/* Date/Time */
|
||||||
if(Q931IsIEPresent(pMes->DateTime))
|
if (Q931IsIEPresent(pMes->DateTime)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_DATETIME](pTrunk, Q931GetIEPtr(pMes->DateTime,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_DATETIME](pTrunk, Q931GetIEPtr(pMes->DateTime,pMes->buf), OBuf, &Octet)) != 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Keypad Facility */
|
/* Keypad Facility */
|
||||||
if(Q931IsIEPresent(pMes->KeypadFac))
|
if (Q931IsIEPresent(pMes->KeypadFac)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_KEYPAD_FACILITY](pTrunk, Q931GetIEPtr(pMes->KeypadFac,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_KEYPAD_FACILITY](pTrunk, Q931GetIEPtr(pMes->KeypadFac,pMes->buf), OBuf, &Octet)) != 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Signal */
|
/* Signal */
|
||||||
if(Q931IsIEPresent(pMes->Signal))
|
if (Q931IsIEPresent(pMes->Signal)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_SIGNAL](pTrunk, Q931GetIEPtr(pMes->Signal,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_SIGNAL](pTrunk, Q931GetIEPtr(pMes->Signal,pMes->buf), OBuf, &Octet)) != 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Calling Party Number */
|
/* Calling Party Number */
|
||||||
if(Q931IsIEPresent(pMes->CallingNum))
|
if (Q931IsIEPresent(pMes->CallingNum)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_CALLING_PARTY_NUMBER](pTrunk, Q931GetIEPtr(pMes->CallingNum,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_CALLING_PARTY_NUMBER](pTrunk, Q931GetIEPtr(pMes->CallingNum,pMes->buf), OBuf, &Octet)) != 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Calling Party Subaddress */
|
/* Calling Party Subaddress */
|
||||||
if(Q931IsIEPresent(pMes->CallingSub))
|
if (Q931IsIEPresent(pMes->CallingSub)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_CALLING_PARTY_SUBADDRESS](pTrunk, Q931GetIEPtr(pMes->CallingSub,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_CALLING_PARTY_SUBADDRESS](pTrunk, Q931GetIEPtr(pMes->CallingSub,pMes->buf), OBuf, &Octet)) != 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Called Party number */
|
/* Called Party number */
|
||||||
if(Q931IsIEPresent(pMes->CalledNum))
|
if (Q931IsIEPresent(pMes->CalledNum)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_CALLED_PARTY_NUMBER](pTrunk, Q931GetIEPtr(pMes->CalledNum,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_CALLED_PARTY_NUMBER](pTrunk, Q931GetIEPtr(pMes->CalledNum,pMes->buf), OBuf, &Octet)) != 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Called party subaddress */
|
/* Called party subaddress */
|
||||||
if(Q931IsIEPresent(pMes->CalledSub))
|
if (Q931IsIEPresent(pMes->CalledSub)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_CALLED_PARTY_SUBADDRESS](pTrunk, Q931GetIEPtr(pMes->CalledSub,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_CALLED_PARTY_SUBADDRESS](pTrunk, Q931GetIEPtr(pMes->CalledSub,pMes->buf), OBuf, &Octet)) != 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Transit network selection */
|
/* Transit network selection */
|
||||||
if(Q931IsIEPresent(pMes->TransNetSel))
|
if (Q931IsIEPresent(pMes->TransNetSel)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_TRANSIT_NETWORK_SELECTION](pTrunk, Q931GetIEPtr(pMes->TransNetSel,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_TRANSIT_NETWORK_SELECTION](pTrunk, Q931GetIEPtr(pMes->TransNetSel,pMes->buf), OBuf, &Octet)) != 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Repeat Indicator */
|
/* Repeat Indicator */
|
||||||
if(Q931IsIEPresent(pMes->LLRepeatInd))
|
if (Q931IsIEPresent(pMes->LLRepeatInd)) {
|
||||||
rc = Q931E_UNKNOWN_IE;/* TODO */
|
rc = Q931E_UNKNOWN_IE;/* TODO */
|
||||||
|
}
|
||||||
|
|
||||||
/* Low Layer Compatibility */
|
/* Low Layer Compatibility */
|
||||||
if(Q931IsIEPresent(pMes->LLComp))
|
if (Q931IsIEPresent(pMes->LLComp)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_LOW_LAYER_COMPATIBILITY](pTrunk, Q931GetIEPtr(pMes->LLComp,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_LOW_LAYER_COMPATIBILITY](pTrunk, Q931GetIEPtr(pMes->LLComp,pMes->buf), OBuf, &Octet)) != 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* High Layer Compatibility */
|
/* High Layer Compatibility */
|
||||||
if(Q931IsIEPresent(pMes->HLComp))
|
if (Q931IsIEPresent(pMes->HLComp)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_HIGH_LAYER_COMPATIBILITY](pTrunk, Q931GetIEPtr(pMes->HLComp,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_HIGH_LAYER_COMPATIBILITY](pTrunk, Q931GetIEPtr(pMes->HLComp,pMes->buf), OBuf, &Octet)) != 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
*OSize = Octet;
|
*OSize = Octet;
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,5 +42,3 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "Q931.h"
|
#include "Q931.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -71,11 +71,7 @@ q931pie_func_t *Q931Pie[Q931MAXDLCT][Q931MAXIE];
|
||||||
q931timeout_func_t *Q931Timeout[Q931MAXDLCT][Q931MAXTIMER];
|
q931timeout_func_t *Q931Timeout[Q931MAXDLCT][Q931MAXTIMER];
|
||||||
q931timer_t Q931Timer[Q931MAXDLCT][Q931MAXTIMER];
|
q931timer_t Q931Timer[Q931MAXDLCT][Q931MAXTIMER];
|
||||||
|
|
||||||
void (*Q931CreateDialectCB[Q931MAXDLCT]) (L3UCHAR iDialect)=
|
void (*Q931CreateDialectCB[Q931MAXDLCT])(L3UCHAR iDialect) = { NULL, NULL };
|
||||||
{
|
|
||||||
NULL,
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
Q931State Q931st[Q931MAXSTATE];
|
Q931State Q931st[Q931MAXSTATE];
|
||||||
|
|
||||||
|
@ -96,9 +92,7 @@ L3INT Q931L2HeaderSpace = {4}; /* Q921 header space, sapi, tei etc */
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
Q931ErrorCB_t Q931ErrorProc;
|
Q931ErrorCB_t Q931ErrorProc; /* callback for error messages. */
|
||||||
/* callback for error messages. */
|
|
||||||
|
|
||||||
L3ULONG (*Q931GetTimeProc) (void) = NULL; /* callback for func reading time in ms */
|
L3ULONG (*Q931GetTimeProc) (void) = NULL; /* callback for func reading time in ms */
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -237,57 +231,53 @@ void Q931Initialize()
|
||||||
/* Secure the callbacks to default procs */
|
/* Secure the callbacks to default procs */
|
||||||
Q931ErrorProc = Q931ErrorDummy;
|
Q931ErrorProc = Q931ErrorDummy;
|
||||||
|
|
||||||
/* The user will only add the message handlers and IE handlers he need, */
|
/* The user will only add the message handlers and IE handlers he need,
|
||||||
/* so we need to initialize every single entry to a default function */
|
* so we need to initialize every single entry to a default function
|
||||||
/* that will throw an appropriate error if they are ever called. */
|
* that will throw an appropriate error if they are ever called.
|
||||||
for(x=0; x < Q931MAXDLCT; x++)
|
*/
|
||||||
{
|
for (x = 0; x < Q931MAXDLCT; x++) {
|
||||||
for(y=0; y < Q931MAXMES; y++)
|
for (y = 0; y < Q931MAXMES; y++) {
|
||||||
{
|
|
||||||
Q931Proc[x][y] = Q931ProcDummy;
|
Q931Proc[x][y] = Q931ProcDummy;
|
||||||
Q931Umes[x][y] = Q931UmesDummy;
|
Q931Umes[x][y] = Q931UmesDummy;
|
||||||
Q931Pmes[x][y] = Q931PmesDummy;
|
Q931Pmes[x][y] = Q931PmesDummy;
|
||||||
}
|
}
|
||||||
for(y=0; y < Q931MAXIE; y++)
|
for (y = 0; y < Q931MAXIE; y++) {
|
||||||
{
|
|
||||||
Q931Pie[x][y] = Q931PieDummy;
|
Q931Pie[x][y] = Q931PieDummy;
|
||||||
Q931Uie[x][y] = Q931UieDummy;
|
Q931Uie[x][y] = Q931UieDummy;
|
||||||
}
|
}
|
||||||
for(y=0; y < Q931MAXTIMER; y++) {
|
for (y = 0; y < Q931MAXTIMER; y++) {
|
||||||
Q931Timeout[x][y] = Q931TimeoutDummy;
|
Q931Timeout[x][y] = Q931TimeoutDummy;
|
||||||
Q931Timer[x][y] = 0;
|
Q931Timer[x][y] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Q931CreateDialectCB[Q931_Dialect_Q931 + Q931_TE] == NULL)
|
if (Q931CreateDialectCB[Q931_Dialect_Q931 + Q931_TE] == NULL)
|
||||||
Q931AddDialect(Q931_Dialect_Q931 + Q931_TE, Q931CreateTE);
|
Q931AddDialect(Q931_Dialect_Q931 + Q931_TE, Q931CreateTE);
|
||||||
|
|
||||||
if(Q931CreateDialectCB[Q931_Dialect_Q931 + Q931_NT] == NULL)
|
if (Q931CreateDialectCB[Q931_Dialect_Q931 + Q931_NT] == NULL)
|
||||||
Q931AddDialect(Q931_Dialect_Q931 + Q931_NT, Q931CreateNT);
|
Q931AddDialect(Q931_Dialect_Q931 + Q931_NT, Q931CreateNT);
|
||||||
|
|
||||||
if(Q931CreateDialectCB[Q931_Dialect_National + Q931_TE] == NULL)
|
if (Q931CreateDialectCB[Q931_Dialect_National + Q931_TE] == NULL)
|
||||||
Q931AddDialect(Q931_Dialect_National + Q931_TE, nationalCreateTE);
|
Q931AddDialect(Q931_Dialect_National + Q931_TE, nationalCreateTE);
|
||||||
|
|
||||||
if(Q931CreateDialectCB[Q931_Dialect_National + Q931_NT] == NULL)
|
if (Q931CreateDialectCB[Q931_Dialect_National + Q931_NT] == NULL)
|
||||||
Q931AddDialect(Q931_Dialect_National + Q931_NT, nationalCreateNT);
|
Q931AddDialect(Q931_Dialect_National + Q931_NT, nationalCreateNT);
|
||||||
|
|
||||||
if(Q931CreateDialectCB[Q931_Dialect_DMS + Q931_TE] == NULL)
|
if (Q931CreateDialectCB[Q931_Dialect_DMS + Q931_TE] == NULL)
|
||||||
Q931AddDialect(Q931_Dialect_DMS + Q931_TE, DMSCreateTE);
|
Q931AddDialect(Q931_Dialect_DMS + Q931_TE, DMSCreateTE);
|
||||||
|
|
||||||
if(Q931CreateDialectCB[Q931_Dialect_DMS + Q931_NT] == NULL)
|
if (Q931CreateDialectCB[Q931_Dialect_DMS + Q931_NT] == NULL)
|
||||||
Q931AddDialect(Q931_Dialect_DMS + Q931_NT, DMSCreateNT);
|
Q931AddDialect(Q931_Dialect_DMS + Q931_NT, DMSCreateNT);
|
||||||
|
|
||||||
if(Q931CreateDialectCB[Q931_Dialect_5ESS + Q931_TE] == NULL)
|
if (Q931CreateDialectCB[Q931_Dialect_5ESS + Q931_TE] == NULL)
|
||||||
Q931AddDialect(Q931_Dialect_5ESS + Q931_TE, ATT5ESSCreateTE);
|
Q931AddDialect(Q931_Dialect_5ESS + Q931_TE, ATT5ESSCreateTE);
|
||||||
|
|
||||||
if(Q931CreateDialectCB[Q931_Dialect_5ESS + Q931_NT] == NULL)
|
if (Q931CreateDialectCB[Q931_Dialect_5ESS + Q931_NT] == NULL)
|
||||||
Q931AddDialect(Q931_Dialect_5ESS + Q931_NT, ATT5ESSCreateNT);
|
Q931AddDialect(Q931_Dialect_5ESS + Q931_NT, ATT5ESSCreateNT);
|
||||||
|
|
||||||
/* The last step we do is to call the callbacks to create the dialects */
|
/* The last step we do is to call the callbacks to create the dialects */
|
||||||
for(x=0; x < Q931MAXDLCT; x++)
|
for (x = 0; x < Q931MAXDLCT; x++) {
|
||||||
{
|
if (Q931CreateDialectCB[x] != NULL) {
|
||||||
if(Q931CreateDialectCB[x] != NULL)
|
|
||||||
{
|
|
||||||
Q931CreateDialectCB[x]((L3UCHAR)x);
|
Q931CreateDialectCB[x]((L3UCHAR)x);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -311,13 +301,13 @@ void Q931TimerTick(Q931_TrunkInfo_t *pTrunk)
|
||||||
*/
|
*/
|
||||||
now = Q931GetTime();
|
now = Q931GetTime();
|
||||||
|
|
||||||
for(x = 0; x < Q931MAXCALLPERTRUNK; x++) {
|
for (x = 0; x < Q931MAXCALLPERTRUNK; x++) {
|
||||||
call = &pTrunk->call[x];
|
call = &pTrunk->call[x];
|
||||||
|
|
||||||
if(!call->InUse || !call->Timer || !call->TimerID)
|
if (!call->InUse || !call->Timer || !call->TimerID)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(call->Timer <= now) {
|
if (call->Timer <= now) {
|
||||||
/* Stop Timer */
|
/* Stop Timer */
|
||||||
Q931StopTimer(pTrunk, x, call->TimerID);
|
Q931StopTimer(pTrunk, x, call->TimerID);
|
||||||
|
|
||||||
|
@ -357,7 +347,7 @@ L3INT Q931Rx23(Q931_TrunkInfo_t *pTrunk, L3INT ind, L3UCHAR tei, L3UCHAR * buf,
|
||||||
L3INT IOff = 0;
|
L3INT IOff = 0;
|
||||||
L3INT L2HSize = Q931L2HeaderSpace;
|
L3INT L2HSize = Q931L2HeaderSpace;
|
||||||
|
|
||||||
switch(ind) {
|
switch (ind) {
|
||||||
case Q921_DL_UNIT_DATA: /* DL-UNITDATA indication (UI frame, 3 byte header) */
|
case Q921_DL_UNIT_DATA: /* DL-UNITDATA indication (UI frame, 3 byte header) */
|
||||||
L2HSize = 3;
|
L2HSize = 3;
|
||||||
|
|
||||||
|
@ -382,12 +372,12 @@ L3INT Q931Rx23(Q931_TrunkInfo_t *pTrunk, L3INT ind, L3UCHAR tei, L3UCHAR * buf,
|
||||||
* a) doing Q.921 work in the lower levels (extracting the TEI ourselves)
|
* a) doing Q.921 work in the lower levels (extracting the TEI ourselves)
|
||||||
* b) adding a tei parameter to _all_ Proc functions
|
* b) adding a tei parameter to _all_ Proc functions
|
||||||
*/
|
*/
|
||||||
if(tei) {
|
if (tei) {
|
||||||
L3INT callIndex = 0;
|
L3INT callIndex = 0;
|
||||||
|
|
||||||
/* Find the call using CRV */
|
/* Find the call using CRV */
|
||||||
RetCode = Q931FindCRV(pTrunk, m->CRV, &callIndex);
|
RetCode = Q931FindCRV(pTrunk, m->CRV, &callIndex);
|
||||||
if(RetCode == Q931E_NO_ERROR && !pTrunk->call[callIndex].Tei) {
|
if (RetCode == Q931E_NO_ERROR && !pTrunk->call[callIndex].Tei) {
|
||||||
pTrunk->call[callIndex].Tei = tei;
|
pTrunk->call[callIndex].Tei = tei;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -396,8 +386,7 @@ L3INT Q931Rx23(Q931_TrunkInfo_t *pTrunk, L3INT ind, L3UCHAR tei, L3UCHAR * buf,
|
||||||
m->MesType, m->CRVFlag, m->CRVFlag ? "Terminator" : "Originator", m->CRV, pTrunk->Dialect);
|
m->MesType, m->CRVFlag, m->CRVFlag ? "Terminator" : "Originator", m->CRV, pTrunk->Dialect);
|
||||||
|
|
||||||
RetCode = Q931Umes[pTrunk->Dialect][m->MesType](pTrunk, Mes, (Q931mes_Generic *)pTrunk->L3Buf, IOff, Size - L2HSize);
|
RetCode = Q931Umes[pTrunk->Dialect][m->MesType](pTrunk, Mes, (Q931mes_Generic *)pTrunk->L3Buf, IOff, Size - L2HSize);
|
||||||
if(RetCode >= Q931E_NO_ERROR)
|
if (RetCode >= Q931E_NO_ERROR) {
|
||||||
{
|
|
||||||
RetCode = Q931Proc[pTrunk->Dialect][m->MesType](pTrunk, pTrunk->L3Buf, 2);
|
RetCode = Q931Proc[pTrunk->Dialect][m->MesType](pTrunk, pTrunk->L3Buf, 2);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -491,15 +480,14 @@ L3INT Q931Tx32Data(Q931_TrunkInfo_t *pTrunk, L3UCHAR bcast, L3UCHAR * Mes, L3INT
|
||||||
|
|
||||||
/* Call pack function through table. */
|
/* Call pack function through table. */
|
||||||
RetCode = Q931Pmes[iDialect][ptr->MesType](pTrunk, (Q931mes_Generic *)Mes, Size, &pTrunk->L2Buf[Offset], &OSize);
|
RetCode = Q931Pmes[iDialect][ptr->MesType](pTrunk, (Q931mes_Generic *)Mes, Size, &pTrunk->L2Buf[Offset], &OSize);
|
||||||
if(RetCode >= Q931E_NO_ERROR)
|
if (RetCode >= Q931E_NO_ERROR) {
|
||||||
{
|
|
||||||
L3INT callIndex;
|
L3INT callIndex;
|
||||||
L3UCHAR tei = 0;
|
L3UCHAR tei = 0;
|
||||||
|
|
||||||
if(ptr->CRV) {
|
if (ptr->CRV) {
|
||||||
/* Find the call using CRV */
|
/* Find the call using CRV */
|
||||||
RetCode = Q931FindCRV(pTrunk, ptr->CRV, &callIndex);
|
RetCode = Q931FindCRV(pTrunk, ptr->CRV, &callIndex);
|
||||||
if(RetCode != Q931E_NO_ERROR)
|
if (RetCode != Q931E_NO_ERROR)
|
||||||
return RetCode;
|
return RetCode;
|
||||||
|
|
||||||
tei = pTrunk->call[callIndex].Tei;
|
tei = pTrunk->call[callIndex].Tei;
|
||||||
|
@ -555,8 +543,7 @@ void Q931SetDefaultErrorCB(Q931ErrorCB_t Q931ErrorPar)
|
||||||
|
|
||||||
Return Value: Error Code. 0 = No Error, < 0 :error, > 0 : Warning
|
Return Value: Error Code. 0 = No Error, < 0 :error, > 0 : Warning
|
||||||
see q931errors.h for details.
|
see q931errors.h for details.
|
||||||
|
****************************************************************************/
|
||||||
*****************************************************************************/
|
|
||||||
L3INT Q931CreateCRV(Q931_TrunkInfo_t *pTrunk, L3INT * callIndex)
|
L3INT Q931CreateCRV(Q931_TrunkInfo_t *pTrunk, L3INT * callIndex)
|
||||||
{
|
{
|
||||||
L3INT CRV = Q931GetUniqueCRV(pTrunk);
|
L3INT CRV = Q931GetUniqueCRV(pTrunk);
|
||||||
|
@ -595,10 +582,8 @@ L3INT Q931ReleaseCRV(Q931_TrunkInfo_t *pTrunk, L3INT CRV)
|
||||||
L3INT Q931AllocateCRV(Q931_TrunkInfo_t *pTrunk, L3INT iCRV, L3INT * callIndex)
|
L3INT Q931AllocateCRV(Q931_TrunkInfo_t *pTrunk, L3INT iCRV, L3INT * callIndex)
|
||||||
{
|
{
|
||||||
L3INT x;
|
L3INT x;
|
||||||
for(x=0; x < Q931MAXCALLPERTRUNK; x++)
|
for (x = 0; x < Q931MAXCALLPERTRUNK; x++) {
|
||||||
{
|
if (!pTrunk->call[x].InUse) {
|
||||||
if(!pTrunk->call[x].InUse)
|
|
||||||
{
|
|
||||||
pTrunk->call[x].CRV = iCRV;
|
pTrunk->call[x].CRV = iCRV;
|
||||||
pTrunk->call[x].BChan = 255;
|
pTrunk->call[x].BChan = 255;
|
||||||
pTrunk->call[x].State = 0; /* null state - idle */
|
pTrunk->call[x].State = 0; /* null state - idle */
|
||||||
|
@ -628,12 +613,9 @@ L3INT Q931AllocateCRV(Q931_TrunkInfo_t *pTrunk, L3INT iCRV, L3INT * callIndex)
|
||||||
L3INT Q931GetCallState(Q931_TrunkInfo_t *pTrunk, L3INT iCRV)
|
L3INT Q931GetCallState(Q931_TrunkInfo_t *pTrunk, L3INT iCRV)
|
||||||
{
|
{
|
||||||
L3INT x;
|
L3INT x;
|
||||||
for(x=0; x < Q931MAXCALLPERTRUNK; x++)
|
for (x = 0; x < Q931MAXCALLPERTRUNK; x++) {
|
||||||
{
|
if (pTrunk->call[x].InUse) {
|
||||||
if(pTrunk->call[x].InUse)
|
if (pTrunk->call[x].CRV == iCRV) {
|
||||||
{
|
|
||||||
if(pTrunk->call[x].CRV == iCRV)
|
|
||||||
{
|
|
||||||
return pTrunk->call[x].State;
|
return pTrunk->call[x].State;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -653,11 +635,10 @@ L3INT Q931StartTimer(Q931_TrunkInfo_t *pTrunk, L3INT callIndex, L3USHORT iTimerI
|
||||||
{
|
{
|
||||||
L3ULONG duration = Q931Timer[pTrunk->Dialect][iTimerID];
|
L3ULONG duration = Q931Timer[pTrunk->Dialect][iTimerID];
|
||||||
|
|
||||||
if(duration) {
|
if (duration) {
|
||||||
pTrunk->call[callIndex].Timer = Q931GetTime() + duration;
|
pTrunk->call[callIndex].Timer = Q931GetTime() + duration;
|
||||||
pTrunk->call[callIndex].TimerID = iTimerID;
|
pTrunk->call[callIndex].TimerID = iTimerID;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -671,7 +652,7 @@ L3INT Q931StartTimer(Q931_TrunkInfo_t *pTrunk, L3INT callIndex, L3USHORT iTimerI
|
||||||
*/
|
*/
|
||||||
L3INT Q931StopTimer(Q931_TrunkInfo_t *pTrunk, L3INT callindex, L3USHORT iTimerID)
|
L3INT Q931StopTimer(Q931_TrunkInfo_t *pTrunk, L3INT callindex, L3USHORT iTimerID)
|
||||||
{
|
{
|
||||||
if(pTrunk->call[callindex].TimerID == iTimerID)
|
if (pTrunk->call[callindex].TimerID == iTimerID)
|
||||||
pTrunk->call[callindex].TimerID = 0;
|
pTrunk->call[callindex].TimerID = 0;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -689,11 +670,9 @@ L3ULONG Q931GetTime()
|
||||||
L3ULONG tNow = 0;
|
L3ULONG tNow = 0;
|
||||||
static L3ULONG tLast = 0;
|
static L3ULONG tLast = 0;
|
||||||
|
|
||||||
if(Q931GetTimeProc != NULL)
|
if (Q931GetTimeProc != NULL) {
|
||||||
{
|
|
||||||
tNow = Q931GetTimeProc();
|
tNow = Q931GetTimeProc();
|
||||||
if(tNow < tLast) /* wrapped */
|
if (tNow < tLast) { /* wrapped */
|
||||||
{
|
|
||||||
/* TODO */
|
/* TODO */
|
||||||
}
|
}
|
||||||
tLast = tNow;
|
tLast = tNow;
|
||||||
|
@ -709,12 +688,9 @@ void Q931SetGetTimeCB(L3ULONG (*callback)(void))
|
||||||
L3INT Q931FindCRV(Q931_TrunkInfo_t *pTrunk, L3INT crv, L3INT *callindex)
|
L3INT Q931FindCRV(Q931_TrunkInfo_t *pTrunk, L3INT crv, L3INT *callindex)
|
||||||
{
|
{
|
||||||
L3INT x;
|
L3INT x;
|
||||||
for(x=0; x < Q931MAXCALLPERTRUNK; x++)
|
for (x = 0; x < Q931MAXCALLPERTRUNK; x++) {
|
||||||
{
|
if (pTrunk->call[x].InUse) {
|
||||||
if(pTrunk->call[x].InUse)
|
if (pTrunk->call[x].CRV == crv) {
|
||||||
{
|
|
||||||
if(pTrunk->call[x].CRV == crv)
|
|
||||||
{
|
|
||||||
*callindex = x;
|
*callindex = x;
|
||||||
return Q931E_NO_ERROR;
|
return Q931E_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
@ -726,8 +702,7 @@ L3INT Q931FindCRV(Q931_TrunkInfo_t *pTrunk, L3INT crv, L3INT *callindex)
|
||||||
|
|
||||||
void Q931AddDialect(L3UCHAR i, void (*callback)(L3UCHAR iD ))
|
void Q931AddDialect(L3UCHAR i, void (*callback)(L3UCHAR iD ))
|
||||||
{
|
{
|
||||||
if(i < Q931MAXDLCT)
|
if (i < Q931MAXDLCT) {
|
||||||
{
|
|
||||||
Q931CreateDialectCB[i] = callback;
|
Q931CreateDialectCB[i] = callback;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -741,10 +716,8 @@ void Q931AddDialect(L3UCHAR i, void (*callback)(L3UCHAR iD ))
|
||||||
void Q931AddStateEntry(L3UCHAR iD, L3INT iState, L3INT iMes, L3UCHAR cDir)
|
void Q931AddStateEntry(L3UCHAR iD, L3INT iState, L3INT iMes, L3UCHAR cDir)
|
||||||
{
|
{
|
||||||
int x;
|
int x;
|
||||||
for(x=0; x < Q931MAXSTATE; x++)
|
for (x = 0; x < Q931MAXSTATE; x++) {
|
||||||
{
|
if (Q931st[x].Message == 0) {
|
||||||
if(Q931st[x].Message == 0)
|
|
||||||
{
|
|
||||||
Q931st[x].State = iState;
|
Q931st[x].State = iState;
|
||||||
Q931st[x].Message = iMes;
|
Q931st[x].Message = iMes;
|
||||||
Q931st[x].Direction = cDir;
|
Q931st[x].Direction = cDir;
|
||||||
|
@ -767,12 +740,9 @@ L3BOOL Q931IsEventLegal(L3UCHAR iD, L3INT iState, L3INT iMes, L3UCHAR cDir)
|
||||||
{
|
{
|
||||||
int x;
|
int x;
|
||||||
/* TODO Sort table and use bsearch */
|
/* TODO Sort table and use bsearch */
|
||||||
for(x=0; x < Q931MAXSTATE; x++)
|
for (x = 0; x < Q931MAXSTATE; x++) {
|
||||||
{
|
if (Q931st[x].State == iState && Q931st[x].Message == iMes &&
|
||||||
if( Q931st[x].State == iState
|
Q931st[x].Direction == cDir) {
|
||||||
&& Q931st[x].Message == iMes
|
|
||||||
&& Q931st[x].Direction == cDir)
|
|
||||||
{
|
|
||||||
return L3TRUE;
|
return L3TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -848,20 +818,20 @@ L3INT Q931Log(Q931_TrunkInfo_t *trunk, Q931LogLevel_t level, const char *fmt, ..
|
||||||
L3INT len;
|
L3INT len;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
if(!trunk->Q931LogCBProc)
|
if (!trunk->Q931LogCBProc)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if(trunk->loglevel < level)
|
if (trunk->loglevel < level)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
|
|
||||||
len = vsnprintf(buf, sizeof(buf)-1, fmt, ap);
|
len = vsnprintf(buf, sizeof(buf)-1, fmt, ap);
|
||||||
if(len <= 0) {
|
if (len <= 0) {
|
||||||
/* TODO: error handling */
|
/* TODO: error handling */
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if(len >= sizeof(buf))
|
if (len >= sizeof(buf))
|
||||||
len = sizeof(buf) - 1;
|
len = sizeof(buf) - 1;
|
||||||
|
|
||||||
buf[len] = '\0';
|
buf[len] = '\0';
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -45,7 +45,7 @@
|
||||||
|
|
||||||
L3INT Q932Umes_Facility(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, Q931mes_Generic *mes, L3INT IOff, L3INT Size)
|
L3INT Q932Umes_Facility(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, Q931mes_Generic *mes, L3INT IOff, L3INT Size)
|
||||||
{
|
{
|
||||||
L3INT OOff=0;
|
L3INT OOff = 0;
|
||||||
|
|
||||||
/* TODO */
|
/* TODO */
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ L3INT Q932Pmes_Facility(Q931_TrunkInfo_t *pTrunk, Q931mes_Generic *IBuf, L3INT I
|
||||||
|
|
||||||
L3INT Q932Umes_Hold(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, Q931mes_Generic *mes, L3INT IOff, L3INT Size)
|
L3INT Q932Umes_Hold(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, Q931mes_Generic *mes, L3INT IOff, L3INT Size)
|
||||||
{
|
{
|
||||||
L3INT OOff=0;
|
L3INT OOff = 0;
|
||||||
|
|
||||||
/* TODO */
|
/* TODO */
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ L3INT Q932Pmes_Hold(Q931_TrunkInfo_t *pTrunk, Q931mes_Generic *IBuf, L3INT ISize
|
||||||
|
|
||||||
L3INT Q932Umes_HoldAck(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, Q931mes_Generic *mes, L3INT IOff, L3INT Size)
|
L3INT Q932Umes_HoldAck(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, Q931mes_Generic *mes, L3INT IOff, L3INT Size)
|
||||||
{
|
{
|
||||||
L3INT OOff=0;
|
L3INT OOff = 0;
|
||||||
|
|
||||||
/* TODO */
|
/* TODO */
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ L3INT Q932Pmes_HoldAck(Q931_TrunkInfo_t *pTrunk, Q931mes_Generic *IBuf, L3INT IS
|
||||||
|
|
||||||
L3INT Q932Umes_HoldReject(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, Q931mes_Generic *mes, L3INT IOff, L3INT Size)
|
L3INT Q932Umes_HoldReject(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, Q931mes_Generic *mes, L3INT IOff, L3INT Size)
|
||||||
{
|
{
|
||||||
L3INT OOff=0;
|
L3INT OOff = 0;
|
||||||
|
|
||||||
/* TODO */
|
/* TODO */
|
||||||
|
|
||||||
|
@ -169,7 +169,7 @@ L3INT Q932Pmes_HoldReject(Q931_TrunkInfo_t *pTrunk, Q931mes_Generic *IBuf, L3INT
|
||||||
|
|
||||||
L3INT Q932Umes_Register(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, Q931mes_Generic *mes, L3INT IOff, L3INT Size)
|
L3INT Q932Umes_Register(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, Q931mes_Generic *mes, L3INT IOff, L3INT Size)
|
||||||
{
|
{
|
||||||
L3INT OOff=0;
|
L3INT OOff = 0;
|
||||||
|
|
||||||
/* TODO */
|
/* TODO */
|
||||||
|
|
||||||
|
@ -200,7 +200,7 @@ L3INT Q932Pmes_Register(Q931_TrunkInfo_t *pTrunk, Q931mes_Generic *IBuf, L3INT I
|
||||||
|
|
||||||
L3INT Q932Umes_Retrieve(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, Q931mes_Generic *mes, L3INT IOff, L3INT Size)
|
L3INT Q932Umes_Retrieve(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, Q931mes_Generic *mes, L3INT IOff, L3INT Size)
|
||||||
{
|
{
|
||||||
L3INT OOff=0;
|
L3INT OOff = 0;
|
||||||
|
|
||||||
/* TODO */
|
/* TODO */
|
||||||
|
|
||||||
|
@ -231,7 +231,7 @@ L3INT Q932Pmes_Retrieve(Q931_TrunkInfo_t *pTrunk, Q931mes_Generic *IBuf, L3INT I
|
||||||
|
|
||||||
L3INT Q932Umes_RetrieveAck(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, Q931mes_Generic *mes, L3INT IOff, L3INT Size)
|
L3INT Q932Umes_RetrieveAck(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, Q931mes_Generic *mes, L3INT IOff, L3INT Size)
|
||||||
{
|
{
|
||||||
L3INT OOff=0;
|
L3INT OOff = 0;
|
||||||
|
|
||||||
/* TODO */
|
/* TODO */
|
||||||
|
|
||||||
|
@ -262,7 +262,7 @@ L3INT Q932Pmes_RetrieveAck(Q931_TrunkInfo_t *pTrunk, Q931mes_Generic *IBuf, L3IN
|
||||||
|
|
||||||
L3INT Q932Umes_RetrieveReject(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, Q931mes_Generic *mes, L3INT IOff, L3INT Size)
|
L3INT Q932Umes_RetrieveReject(Q931_TrunkInfo_t *pTrunk,L3UCHAR *IBuf, Q931mes_Generic *mes, L3INT IOff, L3INT Size)
|
||||||
{
|
{
|
||||||
L3INT OOff=0;
|
L3INT OOff = 0;
|
||||||
|
|
||||||
/* TODO */
|
/* TODO */
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
Contents: Header and definition for the National ISDN dialect. The
|
Contents: Header and definition for the National ISDN dialect. The
|
||||||
header contents the following parts:
|
header contents the following parts:
|
||||||
|
|
||||||
- Definition of codes
|
- Definition of codes
|
||||||
- Definition of information elements (nationalie_).
|
- Definition of information elements (nationalie_).
|
||||||
- Definition of messages (nationalmes_).
|
- Definition of messages (nationalmes_).
|
||||||
|
@ -77,8 +76,6 @@ L3INT DMSPmes_0x07(Q931_TrunkInfo_t *pTrunk, Q931mes_Generic *IBuf, L3INT ISize,
|
||||||
L3INT DMSUmes_0x0f(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, Q931mes_Generic *mes, L3INT IOff, L3INT Size);
|
L3INT DMSUmes_0x0f(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, Q931mes_Generic *mes, L3INT IOff, L3INT Size);
|
||||||
L3INT DMSPmes_0x0f(Q931_TrunkInfo_t *pTrunk, Q931mes_Generic *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize);
|
L3INT DMSPmes_0x0f(Q931_TrunkInfo_t *pTrunk, Q931mes_Generic *IBuf, L3INT ISize, L3UCHAR *OBuf, L3INT *OSize);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
Q.931 Process Function Prototyping. Implemented in nationalStateTE.c
|
Q.931 Process Function Prototyping. Implemented in nationalStateTE.c
|
||||||
|
@ -88,7 +85,6 @@ L3INT DMSPmes_0x0f(Q931_TrunkInfo_t *pTrunk, Q931mes_Generic *IBuf, L3INT ISize,
|
||||||
L3INT DMSProc0x0fTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom);
|
L3INT DMSProc0x0fTE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom);
|
||||||
L3INT DMSProc0x07TE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom);
|
L3INT DMSProc0x07TE(Q931_TrunkInfo_t *pTrunk, L3UCHAR * buf, L3INT iFrom);
|
||||||
|
|
||||||
|
|
||||||
void DMSCreateTE(L3UCHAR i);
|
void DMSCreateTE(L3UCHAR i);
|
||||||
void DMSCreateNT(L3UCHAR i);
|
void DMSCreateNT(L3UCHAR i);
|
||||||
|
|
||||||
|
|
|
@ -157,7 +157,6 @@
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|
||||||
Q931E_NO_ERROR = 0,
|
Q931E_NO_ERROR = 0,
|
||||||
|
|
||||||
Q931E_UNKNOWN_MESSAGE = -3001,
|
Q931E_UNKNOWN_MESSAGE = -3001,
|
||||||
|
@ -190,7 +189,6 @@ typedef enum {
|
||||||
Q931E_SEGMENT = -3028,
|
Q931E_SEGMENT = -3028,
|
||||||
Q931E_SIGNAL = -3029,
|
Q931E_SIGNAL = -3029,
|
||||||
Q931E_GENERIC_DIGITS = -3030
|
Q931E_GENERIC_DIGITS = -3030
|
||||||
|
|
||||||
} q931_error_t;
|
} q931_error_t;
|
||||||
|
|
||||||
/* The q931_error_t enum should be kept in sync with the q931_error_names array in Q931.c */
|
/* The q931_error_t enum should be kept in sync with the q931_error_names array in Q931.c */
|
||||||
|
@ -617,7 +615,7 @@ typedef struct
|
||||||
|
|
||||||
L3UCHAR buf[1]; /* Buffer for IE's */
|
L3UCHAR buf[1]; /* Buffer for IE's */
|
||||||
|
|
||||||
}Q931mes_Generic;
|
} Q931mes_Generic;
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -779,7 +777,7 @@ struct Q931_TrunkInfo
|
||||||
|
|
||||||
L3INT CRV; /* Associated CRV */
|
L3INT CRV; /* Associated CRV */
|
||||||
|
|
||||||
}ch[Q931MAXCHPERTRUNK];
|
} ch[Q931MAXCHPERTRUNK];
|
||||||
|
|
||||||
/* Active Call information indentified by CRV. See Q931AllocateCRV for */
|
/* Active Call information indentified by CRV. See Q931AllocateCRV for */
|
||||||
/* initialization of call table. */
|
/* initialization of call table. */
|
||||||
|
@ -802,7 +800,7 @@ typedef struct
|
||||||
L3INT State;
|
L3INT State;
|
||||||
L3INT Message;
|
L3INT Message;
|
||||||
L3UCHAR Direction;
|
L3UCHAR Direction;
|
||||||
}Q931State;
|
} Q931State;
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
|
@ -844,7 +842,7 @@ extern q931timer_t Q931Timer[Q931MAXDLCT][Q931MAXTIMER];
|
||||||
size of 'header'.
|
size of 'header'.
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#define Q931GetIETotSize(ie) (((ie.InfoID & 0x80) !=0) ? 1:ie.LenIE)+2)
|
#define Q931GetIETotSize(ie) (((ie.InfoID & 0x80) != 0) ? 1 : ie.LenIE) + 2)
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
|
@ -894,7 +892,7 @@ extern q931timer_t Q931Timer[Q931MAXDLCT][Q931MAXTIMER];
|
||||||
Description: Set an information element.
|
Description: Set an information element.
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#define Q931SetIE(x,o) {x = (ie)(o) | 0x8000;}
|
#define Q931SetIE(x,o) { x = (ie)(o) | 0x8000; }
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
|
@ -906,7 +904,7 @@ extern q931timer_t Q931Timer[Q931MAXDLCT][Q931MAXTIMER];
|
||||||
that the octet is extended.
|
that the octet is extended.
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#define IsQ931Ext(x) ((x&0x80)==0)
|
#define IsQ931Ext(x) ((x & 0x80) == 0)
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
|
@ -933,7 +931,7 @@ extern q931timer_t Q931Timer[Q931MAXDLCT][Q931MAXTIMER];
|
||||||
warning for the initial empty functions.
|
warning for the initial empty functions.
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#define NoWarning(x) (x=x)
|
#define NoWarning(x) (x = x)
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,6 @@ typedef enum {
|
||||||
#define Q931ie_ESCAPE_FOR_EX 0x7f /* 0111 1111 */
|
#define Q931ie_ESCAPE_FOR_EX 0x7f /* 0111 1111 */
|
||||||
|
|
||||||
/* Variable Length Codeset 6 Information Elements */
|
/* Variable Length Codeset 6 Information Elements */
|
||||||
|
|
||||||
#define Q931ie_GENERIC_DIGITS 0x37 /* 0011 0111 */
|
#define Q931ie_GENERIC_DIGITS 0x37 /* 0011 0111 */
|
||||||
|
|
||||||
/* Variable Length Information Element to shut up BRI testing */
|
/* Variable Length Information Element to shut up BRI testing */
|
||||||
|
@ -114,10 +113,9 @@ typedef enum {
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
L3UCHAR IEId; /* 00000100 for Bearer Capability */
|
|
||||||
|
|
||||||
|
L3UCHAR IEId; /* 00000100 for Bearer Capability */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
|
|
||||||
L3UCHAR CodStand; /* Coding Standard. */
|
L3UCHAR CodStand; /* Coding Standard. */
|
||||||
|
@ -286,7 +284,8 @@ typedef struct
|
||||||
L3UCHAR AL3Info1; /* additional layer 3 info 1 */
|
L3UCHAR AL3Info1; /* additional layer 3 info 1 */
|
||||||
|
|
||||||
L3UCHAR AL3Info2; /* additional layer 3 info 2 */
|
L3UCHAR AL3Info2; /* additional layer 3 info 2 */
|
||||||
}Q931ie_BearerCap;
|
|
||||||
|
} Q931ie_BearerCap;
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
|
@ -295,12 +294,13 @@ typedef struct
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
L3UCHAR IEId; /* 00010000 */
|
L3UCHAR IEId; /* 00010000 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
L3UCHAR CallId[1]; /* Call identity */
|
L3UCHAR CallId[1]; /* Call identity */
|
||||||
}Q931ie_CallID;
|
|
||||||
|
} Q931ie_CallID;
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
|
@ -309,13 +309,14 @@ typedef struct
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
L3UCHAR IEId; /* 00010100 */
|
L3UCHAR IEId; /* 00010100 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
L3UCHAR CodStand; /* Coding Standard */
|
L3UCHAR CodStand; /* Coding Standard */
|
||||||
L3UCHAR CallState; /* Call State Value */
|
L3UCHAR CallState; /* Call State Value */
|
||||||
}Q931ie_CallState;
|
|
||||||
|
} Q931ie_CallState;
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
|
@ -324,8 +325,8 @@ typedef struct
|
||||||
Description: Cause IE as described in Q.850
|
Description: Cause IE as described in Q.850
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
L3UCHAR IEId; /* 00010100 */
|
L3UCHAR IEId; /* 00010100 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
L3UCHAR CodStand; /* Coding Standard */
|
L3UCHAR CodStand; /* Coding Standard */
|
||||||
|
@ -333,21 +334,23 @@ typedef struct
|
||||||
L3UCHAR Recom; /* Recommendation */
|
L3UCHAR Recom; /* Recommendation */
|
||||||
L3UCHAR Value; /* Cause Value */
|
L3UCHAR Value; /* Cause Value */
|
||||||
L3UCHAR Diag[1]; /* Optional Diagnostics Field */
|
L3UCHAR Diag[1]; /* Optional Diagnostics Field */
|
||||||
}Q931ie_Cause;
|
|
||||||
|
} Q931ie_Cause;
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
Struct: Q931ie_CalledNum
|
Struct: Q931ie_CalledNum
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
L3UCHAR IEId; /* 01110000 */
|
L3UCHAR IEId; /* 01110000 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
L3UCHAR TypNum; /* Type of Number */
|
L3UCHAR TypNum; /* Type of Number */
|
||||||
L3UCHAR NumPlanID; /* Numbering plan identification */
|
L3UCHAR NumPlanID; /* Numbering plan identification */
|
||||||
L3UCHAR Digit[1]; /* Digit (IA5) */
|
L3UCHAR Digit[1]; /* Digit (IA5) */
|
||||||
}Q931ie_CalledNum;
|
|
||||||
|
} Q931ie_CalledNum;
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
|
@ -357,14 +360,15 @@ typedef struct
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
L3UCHAR IEId; /* 01110001 */
|
L3UCHAR IEId; /* 01110001 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
L3UCHAR TypNum; /* Type of subaddress */
|
L3UCHAR TypNum; /* Type of subaddress */
|
||||||
L3UCHAR OddEvenInd; /* Odd/Even indicator */
|
L3UCHAR OddEvenInd; /* Odd/Even indicator */
|
||||||
L3UCHAR Digit[1]; /* digits */
|
L3UCHAR Digit[1]; /* digits */
|
||||||
}Q931ie_CalledSub;
|
|
||||||
|
} Q931ie_CalledSub;
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
|
@ -374,8 +378,8 @@ typedef struct
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
L3UCHAR IEId; /* 01101100 */
|
L3UCHAR IEId; /* 01101100 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
L3UCHAR TypNum; /* Type of number */
|
L3UCHAR TypNum; /* Type of number */
|
||||||
|
@ -383,7 +387,8 @@ typedef struct
|
||||||
L3UCHAR PresInd; /* Presentation indicator */
|
L3UCHAR PresInd; /* Presentation indicator */
|
||||||
L3UCHAR ScreenInd; /* Screening indicator */
|
L3UCHAR ScreenInd; /* Screening indicator */
|
||||||
L3UCHAR Digit[1]; /* Number digits (IA5) */
|
L3UCHAR Digit[1]; /* Number digits (IA5) */
|
||||||
}Q931ie_CallingNum;
|
|
||||||
|
} Q931ie_CallingNum;
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
|
@ -393,14 +398,15 @@ typedef struct
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
L3UCHAR IEId; /* 01101101 */
|
L3UCHAR IEId; /* 01101101 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
L3UCHAR TypNum; /* Type of subaddress */
|
L3UCHAR TypNum; /* Type of subaddress */
|
||||||
L3UCHAR OddEvenInd; /* Odd/Even indicator */
|
L3UCHAR OddEvenInd; /* Odd/Even indicator */
|
||||||
L3UCHAR Digit[1]; /* digits */
|
L3UCHAR Digit[1]; /* digits */
|
||||||
}Q931ie_CallingSub;
|
|
||||||
|
} Q931ie_CallingSub;
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
|
@ -418,8 +424,8 @@ typedef struct
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
L3UCHAR IEId; /* 00011000 */
|
L3UCHAR IEId; /* 00011000 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
L3UCHAR IntIDPresent; /* Int. id. present */
|
L3UCHAR IntIDPresent; /* Int. id. present */
|
||||||
|
@ -460,7 +466,8 @@ typedef struct
|
||||||
/* 1001 : H12 channel units */
|
/* 1001 : H12 channel units */
|
||||||
|
|
||||||
L3UCHAR ChanSlot; /* Channel number */
|
L3UCHAR ChanSlot; /* Channel number */
|
||||||
}Q931ie_ChanID;
|
|
||||||
|
} Q931ie_ChanID;
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
|
@ -470,8 +477,8 @@ typedef struct
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
L3UCHAR IEId; /* 00101001 */
|
L3UCHAR IEId; /* 00101001 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
L3UCHAR Year; /* Year */
|
L3UCHAR Year; /* Year */
|
||||||
|
@ -485,7 +492,7 @@ typedef struct
|
||||||
/* 1 : Hour present */
|
/* 1 : Hour present */
|
||||||
/* 2 : Hour and Minute present */
|
/* 2 : Hour and Minute present */
|
||||||
/* 3 : Hour, Minute and Second present */
|
/* 3 : Hour, Minute and Second present */
|
||||||
}Q931ie_DateTime;
|
} Q931ie_DateTime;
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
|
@ -495,12 +502,13 @@ typedef struct
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
L3UCHAR IEId; /* 00101000 */
|
L3UCHAR IEId; /* 00101000 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
L3UCHAR Display[1]; /* Display information (IA5) */
|
L3UCHAR Display[1]; /* Display information (IA5) */
|
||||||
}Q931ie_Display;
|
|
||||||
|
} Q931ie_Display;
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
|
@ -510,8 +518,8 @@ typedef struct
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
L3UCHAR IEId; /* 01111101 */
|
L3UCHAR IEId; /* 01111101 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
L3UCHAR CodStand; /* Coding standard */
|
L3UCHAR CodStand; /* Coding standard */
|
||||||
|
@ -520,7 +528,8 @@ typedef struct
|
||||||
L3UCHAR HLCharID; /* High layer characteristics id. */
|
L3UCHAR HLCharID; /* High layer characteristics id. */
|
||||||
L3UCHAR EHLCharID; /* Extended high layer character. id. */
|
L3UCHAR EHLCharID; /* Extended high layer character. id. */
|
||||||
L3UCHAR EVideoTlfCharID; /* Ext. videotelephony char. id. */
|
L3UCHAR EVideoTlfCharID; /* Ext. videotelephony char. id. */
|
||||||
}Q931ie_HLComp;
|
|
||||||
|
} Q931ie_HLComp;
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
|
@ -530,12 +539,12 @@ typedef struct
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
L3UCHAR IEId; /* 00101100 */
|
L3UCHAR IEId; /* 00101100 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
L3UCHAR KeypadFac[1]; /* dynamic buffer */
|
L3UCHAR KeypadFac[1]; /* dynamic buffer */
|
||||||
}Q931ie_KeypadFac;
|
|
||||||
|
} Q931ie_KeypadFac;
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
|
@ -545,8 +554,8 @@ typedef struct
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
L3UCHAR IEId; /* 01111100 */
|
L3UCHAR IEId; /* 01111100 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
L3UCHAR CodStand; /* Coding standard */
|
L3UCHAR CodStand; /* Coding standard */
|
||||||
|
@ -750,7 +759,8 @@ typedef struct
|
||||||
L3UCHAR PackWinSize; /* Packet window size */
|
L3UCHAR PackWinSize; /* Packet window size */
|
||||||
|
|
||||||
L3UCHAR AddL3Info; /* Additional Layer 3 protocol info */
|
L3UCHAR AddL3Info; /* Additional Layer 3 protocol info */
|
||||||
}Q931ie_LLComp;
|
|
||||||
|
} Q931ie_LLComp;
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
|
@ -760,8 +770,8 @@ typedef struct
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
L3UCHAR IEId; /* 00100000 */
|
L3UCHAR IEId; /* 00100000 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
L3UCHAR LenNetID; /* Length of network facilities id. */
|
L3UCHAR LenNetID; /* Length of network facilities id. */
|
||||||
|
@ -769,7 +779,8 @@ typedef struct
|
||||||
L3UCHAR NetIDPlan; /* Network identification plan. */
|
L3UCHAR NetIDPlan; /* Network identification plan. */
|
||||||
L3UCHAR NetFac; /* Network specific facility spec. */
|
L3UCHAR NetFac; /* Network specific facility spec. */
|
||||||
L3UCHAR NetID[1]; /* Network id. (IA5) */
|
L3UCHAR NetID[1]; /* Network id. (IA5) */
|
||||||
}Q931ie_NetFac;
|
|
||||||
|
} Q931ie_NetFac;
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
|
@ -779,12 +790,13 @@ typedef struct
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
L3UCHAR IEId; /* 00100000 */
|
L3UCHAR IEId; /* 00100000 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
L3UCHAR Notification; /* Notification descriptor */
|
L3UCHAR Notification; /* Notification descriptor */
|
||||||
}Q931ie_NotifInd;
|
|
||||||
|
} Q931ie_NotifInd;
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
|
@ -794,14 +806,15 @@ typedef struct
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
L3UCHAR IEId; /* 00011110 */
|
L3UCHAR IEId; /* 00011110 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
L3UCHAR CodStand; /* Coding standard */
|
L3UCHAR CodStand; /* Coding standard */
|
||||||
L3UCHAR Location; /* Location */
|
L3UCHAR Location; /* Location */
|
||||||
L3UCHAR ProgDesc; /* Progress description */
|
L3UCHAR ProgDesc; /* Progress description */
|
||||||
}Q931ie_ProgInd;
|
|
||||||
|
} Q931ie_ProgInd;
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
|
@ -811,20 +824,23 @@ typedef struct
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
L3UCHAR IEId; /* 00000000 */
|
L3UCHAR IEId; /* 00000000 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
L3UCHAR FSI; /* First segment indicator */
|
L3UCHAR FSI; /* First segment indicator */
|
||||||
L3UCHAR NumSegRem; /* Number of segments remaining */
|
L3UCHAR NumSegRem; /* Number of segments remaining */
|
||||||
L3UCHAR SegType; /* Segment message type */
|
L3UCHAR SegType; /* Segment message type */
|
||||||
}Q931ie_Segment;
|
|
||||||
|
|
||||||
typedef struct
|
} Q931ie_Segment;
|
||||||
{
|
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
|
||||||
L3UCHAR IEId; /* 00000000 */
|
L3UCHAR IEId; /* 00000000 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
}Q931ie_SendComplete;
|
|
||||||
|
} Q931ie_SendComplete;
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
|
@ -834,8 +850,8 @@ typedef struct
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
L3UCHAR IEId; /* 00000000 */
|
L3UCHAR IEId; /* 00000000 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
L3UCHAR Signal; /* Signal value */
|
L3UCHAR Signal; /* Signal value */
|
||||||
|
@ -859,7 +875,7 @@ typedef struct
|
||||||
/* 01000110 Alerting on - pattern 6 */
|
/* 01000110 Alerting on - pattern 6 */
|
||||||
/* 01000111 Alerting on - pattern 7 */
|
/* 01000111 Alerting on - pattern 7 */
|
||||||
/* 01001111 Alerting off */
|
/* 01001111 Alerting off */
|
||||||
}Q931ie_Signal;
|
} Q931ie_Signal;
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
|
@ -869,12 +885,13 @@ typedef struct
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifdef Q931_X25_SUPPORT
|
#ifdef Q931_X25_SUPPORT
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
L3UCHAR IEId; /* 00000000 */
|
L3UCHAR IEId; /* 00000000 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
L3ULONG TxDSIValue; /* Trans. delay sel. & ind. value */
|
L3ULONG TxDSIValue; /* Trans. delay sel. & ind. value */
|
||||||
}Q931ie_TransDelSelInd;
|
|
||||||
|
} Q931ie_TransDelSelInd;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -885,14 +902,15 @@ typedef struct
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
L3UCHAR IEId; /* 01111000 */
|
L3UCHAR IEId; /* 01111000 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
L3UCHAR Type; /* Type of network identifier */
|
L3UCHAR Type; /* Type of network identifier */
|
||||||
L3UCHAR NetIDPlan; /* Network idetification plan */
|
L3UCHAR NetIDPlan; /* Network idetification plan */
|
||||||
L3UCHAR NetID[1]; /* Network identification(IA5) */
|
L3UCHAR NetID[1]; /* Network identification(IA5) */
|
||||||
}Q931ie_TransNetSel;
|
|
||||||
|
} Q931ie_TransNetSel;
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
|
@ -902,13 +920,14 @@ typedef struct
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
L3UCHAR IEId; /* 01111110 */
|
L3UCHAR IEId; /* 01111110 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
L3UCHAR ProtDisc; /* Protocol discriminator */
|
L3UCHAR ProtDisc; /* Protocol discriminator */
|
||||||
L3UCHAR User[1]; /* User information */
|
L3UCHAR User[1]; /* User information */
|
||||||
}Q931ie_UserUser;
|
|
||||||
|
} Q931ie_UserUser;
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
|
@ -918,13 +937,14 @@ typedef struct
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifdef Q931_X25_SUPPORT
|
#ifdef Q931_X25_SUPPORT
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
L3UCHAR IEId; /* 01000111 */
|
L3UCHAR IEId; /* 01000111 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
L3UCHAR CUGInd; /* CUG indication */
|
L3UCHAR CUGInd; /* CUG indication */
|
||||||
L3UCHAR CUG[1]; /* CUG index code (IA5) */
|
L3UCHAR CUG[1]; /* CUG index code (IA5) */
|
||||||
}Q931ie_ClosedUserGrp;
|
|
||||||
|
} Q931ie_ClosedUserGrp;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -934,12 +954,13 @@ typedef struct
|
||||||
Description: Congestion Level
|
Description: Congestion Level
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
L3UCHAR IEId; /* 01000111 */
|
L3UCHAR IEId; /* 01000111 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
L3UCHAR CongLevel; /* Conguestion Level */
|
L3UCHAR CongLevel; /* Conguestion Level */
|
||||||
}Q931ie_CongLevel;
|
|
||||||
|
} Q931ie_CongLevel;
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
|
@ -949,14 +970,15 @@ typedef struct
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifdef Q931_X25_SUPPORT
|
#ifdef Q931_X25_SUPPORT
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
L3UCHAR IEId; /* 01000010 */
|
L3UCHAR IEId; /* 01000010 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
L3ULONG CumTxDelay; /* Cumulative transit delay value */
|
L3ULONG CumTxDelay; /* Cumulative transit delay value */
|
||||||
L3ULONG ReqTxDelay; /* Requested end to end transit delay */
|
L3ULONG ReqTxDelay; /* Requested end to end transit delay */
|
||||||
L3ULONG MaxTxDelay; /* Maximum transit delay */
|
L3ULONG MaxTxDelay; /* Maximum transit delay */
|
||||||
}Q931ie_EndEndTxDelay;
|
|
||||||
|
} Q931ie_EndEndTxDelay;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -967,15 +989,16 @@ typedef struct
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifdef Q931_X25_SUPPORT
|
#ifdef Q931_X25_SUPPORT
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
L3UCHAR IEId; /* 01100000 */
|
L3UCHAR IEId; /* 01100000 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
L3UCHAR InInfoRate; /* Incoming information rate */
|
L3UCHAR InInfoRate; /* Incoming information rate */
|
||||||
L3UCHAR OutInfoRate; /* Outgoing information rate */
|
L3UCHAR OutInfoRate; /* Outgoing information rate */
|
||||||
L3UCHAR MinInInfoRate; /* Minimum incoming information rate */
|
L3UCHAR MinInInfoRate; /* Minimum incoming information rate */
|
||||||
L3UCHAR MinOutInfoRate; /* Minimum outgoing information rate */
|
L3UCHAR MinOutInfoRate; /* Minimum outgoing information rate */
|
||||||
}Q931ie_InfoRate;
|
|
||||||
|
} Q931ie_InfoRate;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -986,15 +1009,16 @@ typedef struct
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifdef Q931_X25_SUPPORT
|
#ifdef Q931_X25_SUPPORT
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
L3UCHAR IEId; /* 01000100 */
|
L3UCHAR IEId; /* 01000100 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
L3UCHAR FastSel; /* Fast selected */
|
L3UCHAR FastSel; /* Fast selected */
|
||||||
L3UCHAR ExpData; /* Exp. data */
|
L3UCHAR ExpData; /* Exp. data */
|
||||||
L3UCHAR DelConf; /* Delivery conf */
|
L3UCHAR DelConf; /* Delivery conf */
|
||||||
L3UCHAR Modulus; /* Modulus */
|
L3UCHAR Modulus; /* Modulus */
|
||||||
}Q931ie_PackParam;
|
|
||||||
|
} Q931ie_PackParam;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -1005,13 +1029,14 @@ typedef struct
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifdef Q931_X25_SUPPORT
|
#ifdef Q931_X25_SUPPORT
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
L3UCHAR IEId; /* 01000101 */
|
L3UCHAR IEId; /* 01000101 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
L3UCHAR ForwardValue; /* Forward value */
|
L3UCHAR ForwardValue; /* Forward value */
|
||||||
L3UCHAR BackwardValue; /* Backward value */
|
L3UCHAR BackwardValue; /* Backward value */
|
||||||
}Q931ie_PackWinSize;
|
|
||||||
|
} Q931ie_PackWinSize;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -1022,13 +1047,14 @@ typedef struct
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifdef Q931_X25_SUPPORT
|
#ifdef Q931_X25_SUPPORT
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
L3UCHAR IEId; /* 01000110 */
|
L3UCHAR IEId; /* 01000110 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
L3UCHAR ForwardValue; /* Forward value */
|
L3UCHAR ForwardValue; /* Forward value */
|
||||||
L3UCHAR BackwardValue; /* Backward value */
|
L3UCHAR BackwardValue; /* Backward value */
|
||||||
}Q931ie_PackSize;
|
|
||||||
|
} Q931ie_PackSize;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -1039,8 +1065,8 @@ typedef struct
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#ifdef Q931_X25_SUPPORT
|
#ifdef Q931_X25_SUPPORT
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
L3UCHAR IEId; /* 01110100 */
|
L3UCHAR IEId; /* 01110100 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
L3UCHAR TypeNum; /* Type of number */
|
L3UCHAR TypeNum; /* Type of number */
|
||||||
|
@ -1049,19 +1075,20 @@ typedef struct
|
||||||
L3UCHAR ScreenInd; /* Screening indicator */
|
L3UCHAR ScreenInd; /* Screening indicator */
|
||||||
L3UCHAR Reason; /* Reason for redirection */
|
L3UCHAR Reason; /* Reason for redirection */
|
||||||
L3UCHAR Digit[1]; /* Number digits (IA5) */
|
L3UCHAR Digit[1]; /* Number digits (IA5) */
|
||||||
}Q931ie_RedirNum;
|
|
||||||
|
} Q931ie_RedirNum;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
L3UCHAR IEId; /* 01110100 */
|
L3UCHAR IEId; /* 01110100 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
L3UCHAR RepeatInd; /* 0010 Prioritized list for selecting */
|
L3UCHAR RepeatInd; /* 0010 Prioritized list for selecting */
|
||||||
/* one possible. */
|
/* one possible. */
|
||||||
}Q931ie_RepeatInd;
|
} Q931ie_RepeatInd;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
L3UCHAR IEId; /* 01110100 */
|
L3UCHAR IEId; /* 01110100 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
L3UCHAR Spare; /* Spare */
|
L3UCHAR Spare; /* Spare */
|
||||||
|
@ -1069,10 +1096,10 @@ typedef struct
|
||||||
/* 000 Indicate channels */
|
/* 000 Indicate channels */
|
||||||
/* 110 Single interface */
|
/* 110 Single interface */
|
||||||
/* 111 All interfaces */
|
/* 111 All interfaces */
|
||||||
}Q931ie_RestartInd;
|
} Q931ie_RestartInd;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
L3UCHAR IEId; /* 01110100 */
|
L3UCHAR IEId; /* 01110100 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
L3UCHAR Preference; /* Preference 0 = reserved, 1 = channel */
|
L3UCHAR Preference; /* Preference 0 = reserved, 1 = channel */
|
||||||
|
@ -1081,7 +1108,7 @@ typedef struct
|
||||||
/* 000 In service */
|
/* 000 In service */
|
||||||
/* 001 Maintenance */
|
/* 001 Maintenance */
|
||||||
/* 010 Out of service */
|
/* 010 Out of service */
|
||||||
}Q931ie_ChangeStatus;
|
} Q931ie_ChangeStatus;
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
|
@ -1090,13 +1117,14 @@ typedef struct
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
L3UCHAR IEId; /* 00110111 */
|
L3UCHAR IEId; /* 00110111 */
|
||||||
L3UCHAR Size; /* Length of Information Element */
|
L3UCHAR Size; /* Length of Information Element */
|
||||||
L3UCHAR Type; /* Type of number */
|
L3UCHAR Type; /* Type of number */
|
||||||
L3UCHAR Encoding; /* Encoding of number */
|
L3UCHAR Encoding; /* Encoding of number */
|
||||||
L3UCHAR Digit[1]; /* Number digits (IA5) */
|
L3UCHAR Digit[1]; /* Number digits (IA5) */
|
||||||
|
|
||||||
} Q931ie_GenericDigits;
|
} Q931ie_GenericDigits;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -44,11 +44,10 @@
|
||||||
Description: Message Index used to index a dynamic size Message FIFO.
|
Description: Message Index used to index a dynamic size Message FIFO.
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
typedef struct _mindex
|
typedef struct _mindex {
|
||||||
{
|
|
||||||
int offset; /* offset to message in buf */
|
int offset; /* offset to message in buf */
|
||||||
int size; /* size of message in bytes */
|
int size; /* size of message in bytes */
|
||||||
}MINDEX;
|
} MINDEX;
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
|
@ -58,8 +57,7 @@ typedef struct _mindex
|
||||||
queue.
|
queue.
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
typedef struct
|
typedef struct {
|
||||||
{
|
|
||||||
int first; /* first out */
|
int first; /* first out */
|
||||||
int last; /* last in + 1 */
|
int last; /* last in + 1 */
|
||||||
int bsize; /* buffer size */
|
int bsize; /* buffer size */
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
Contents: Header and definition for the National ISDN dialect. The
|
Contents: Header and definition for the National ISDN dialect. The
|
||||||
header contents the following parts:
|
header contents the following parts:
|
||||||
|
|
||||||
- Definition of codes
|
- Definition of codes
|
||||||
- Definition of information elements (nationalie_).
|
- Definition of information elements (nationalie_).
|
||||||
- Definition of messages (nationalmes_).
|
- Definition of messages (nationalmes_).
|
||||||
|
@ -75,15 +74,12 @@ L3INT nationalPmes_Setup(Q931_TrunkInfo_t *pTrunk, Q931mes_Generic *IBuf, L3INT
|
||||||
|
|
||||||
#include "DMS.h"
|
#include "DMS.h"
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|
||||||
Q.931 Process Function Prototyping. Implemented in nationalStateTE.c
|
Q.931 Process Function Prototyping. Implemented in nationalStateTE.c
|
||||||
|
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void nationalCreateTE(L3UCHAR i);
|
void nationalCreateTE(L3UCHAR i);
|
||||||
void nationalCreateNT(L3UCHAR i);
|
void nationalCreateNT(L3UCHAR i);
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,7 @@ int MFIFOCreate(unsigned char *buf, int size, int index)
|
||||||
mf->ixsize = index;
|
mf->ixsize = index;
|
||||||
mf->buf = &buf[sizeof(MFIFO) + (sizeof(MINDEX) * index)];
|
mf->buf = &buf[sizeof(MFIFO) + (sizeof(MINDEX) * index)];
|
||||||
|
|
||||||
if(mf->buf > &buf[size])
|
if (mf->buf > &buf[size])
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
mf->bsize = size - sizeof(MFIFO) - (sizeof(MINDEX) * index);
|
mf->bsize = size - sizeof(MFIFO) - (sizeof(MINDEX) * index);
|
||||||
|
@ -131,7 +131,7 @@ int MFIFOGetLBOffset(unsigned char *buf)
|
||||||
{
|
{
|
||||||
MFIFO *mf = (MFIFO *)buf;
|
MFIFO *mf = (MFIFO *)buf;
|
||||||
|
|
||||||
if(mf->last != mf->first)
|
if (mf->last != mf->first)
|
||||||
return mf->ix[mf->last].offset;
|
return mf->ix[mf->last].offset;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -155,12 +155,12 @@ int MFIFOGetFBOffset(unsigned char *buf)
|
||||||
MFIFO *mf = (MFIFO *)buf;
|
MFIFO *mf = (MFIFO *)buf;
|
||||||
int x;
|
int x;
|
||||||
|
|
||||||
if(mf->last == mf->first)
|
if (mf->last == mf->first)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
x = mf->first - 1;
|
x = mf->first - 1;
|
||||||
|
|
||||||
if(x < 0)
|
if (x < 0)
|
||||||
x = mf->ixsize - 1;
|
x = mf->ixsize - 1;
|
||||||
|
|
||||||
return mf->ix[x].offset + mf->ix[x].size;
|
return mf->ix[x].offset + mf->ix[x].size;
|
||||||
|
@ -194,7 +194,7 @@ void MFIFOWriteIX(unsigned char *buf, unsigned char *mes, int size, int ix, int
|
||||||
|
|
||||||
x = mf->first + 1;
|
x = mf->first + 1;
|
||||||
|
|
||||||
if(x >= mf->ixsize)
|
if (x >= mf->ixsize)
|
||||||
x = 0;
|
x = 0;
|
||||||
|
|
||||||
mf->first = x;
|
mf->first = x;
|
||||||
|
@ -218,36 +218,31 @@ int MFIFOWriteMes(unsigned char *buf, unsigned char *mes, int size)
|
||||||
|
|
||||||
x = mf->first + 1;
|
x = mf->first + 1;
|
||||||
|
|
||||||
if(x >= mf->ixsize)
|
if (x >= mf->ixsize)
|
||||||
x = 0;
|
x = 0;
|
||||||
|
|
||||||
if(x == mf->last)
|
if (x == mf->last)
|
||||||
return 0; /* full queue */
|
return 0; /* full queue */
|
||||||
|
|
||||||
of = MFIFOGetFBOffset(buf);
|
of = MFIFOGetFBOffset(buf);
|
||||||
ol = MFIFOGetLBOffset(buf);
|
ol = MFIFOGetLBOffset(buf);
|
||||||
if(mf->last == mf->first) /* empty queue */
|
if (mf->last == mf->first) { /* empty queue */
|
||||||
{
|
|
||||||
mf->first = mf->last = 0; /* optimize */
|
mf->first = mf->last = 0; /* optimize */
|
||||||
|
|
||||||
MFIFOWriteIX(buf, mes, size, mf->first, 0);
|
MFIFOWriteIX(buf, mes, size, mf->first, 0);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else if(of > ol)
|
else if (of > ol) {
|
||||||
{
|
if (mf->bsize - of >= size) {
|
||||||
if(mf->bsize - of >= size)
|
|
||||||
{
|
|
||||||
MFIFOWriteIX(buf, mes, size, mf->first, of);
|
MFIFOWriteIX(buf, mes, size, mf->first, of);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else if(ol > size)
|
else if (ol > size) {
|
||||||
{
|
|
||||||
MFIFOWriteIX(buf, mes, size, mf->first, ol);
|
MFIFOWriteIX(buf, mes, size, mf->first, ol);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(ol - of > size)
|
else if (ol - of > size) {
|
||||||
{
|
|
||||||
MFIFOWriteIX(buf, mes, size, mf->first, of);
|
MFIFOWriteIX(buf, mes, size, mf->first, of);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -270,7 +265,7 @@ unsigned char * MFIFOGetMesPtr(unsigned char *buf, int *size)
|
||||||
{
|
{
|
||||||
MFIFO *mf = (MFIFO *)buf;
|
MFIFO *mf = (MFIFO *)buf;
|
||||||
|
|
||||||
if(mf->first == mf->last) {
|
if (mf->first == mf->last) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -294,10 +289,9 @@ void MFIFOKillNext(unsigned char *buf)
|
||||||
MFIFO *mf = (MFIFO *)buf;
|
MFIFO *mf = (MFIFO *)buf;
|
||||||
int x;
|
int x;
|
||||||
|
|
||||||
if(mf->first != mf->last)
|
if (mf->first != mf->last) {
|
||||||
{
|
|
||||||
x = mf->last + 1;
|
x = mf->last + 1;
|
||||||
if(x >= mf->ixsize) {
|
if (x >= mf->ixsize) {
|
||||||
x = 0;
|
x = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -319,16 +313,16 @@ unsigned char * MFIFOGetMesPtrOffset(unsigned char *buf, int *size, const int po
|
||||||
MFIFO *mf = (MFIFO *)buf;
|
MFIFO *mf = (MFIFO *)buf;
|
||||||
int x;
|
int x;
|
||||||
|
|
||||||
if(mf->first == mf->last) {
|
if (mf->first == mf->last) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(pos < 0 || pos >= mf->ixsize) {
|
if (pos < 0 || pos >= mf->ixsize) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
x = pos - mf->last;
|
x = pos - mf->last;
|
||||||
if(x < 0) {
|
if (x < 0) {
|
||||||
x += (mf->ixsize - 1);
|
x += (mf->ixsize - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -345,10 +339,10 @@ int MFIFOGetMesCount(unsigned char *buf)
|
||||||
{
|
{
|
||||||
MFIFO *mf = (MFIFO *)buf;
|
MFIFO *mf = (MFIFO *)buf;
|
||||||
|
|
||||||
if(mf->first == mf->last) {
|
if (mf->first == mf->last) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else if(mf->first > mf->last) {
|
else if (mf->first > mf->last) {
|
||||||
return mf->first - mf->last;
|
return mf->first - mf->last;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -367,42 +361,37 @@ int MFIFOWriteMesOverwrite(unsigned char *buf, unsigned char *mes, int size)
|
||||||
|
|
||||||
x = mf->first + 1;
|
x = mf->first + 1;
|
||||||
|
|
||||||
if(x >= mf->ixsize)
|
if (x >= mf->ixsize)
|
||||||
x = 0;
|
x = 0;
|
||||||
|
|
||||||
if(x == mf->last) {
|
if (x == mf->last) {
|
||||||
/* advance last pointer */
|
/* advance last pointer */
|
||||||
mf->last++;
|
mf->last++;
|
||||||
|
|
||||||
if(mf->last >= mf->ixsize)
|
if (mf->last >= mf->ixsize)
|
||||||
mf->last = 0;
|
mf->last = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
of = MFIFOGetFBOffset(buf);
|
of = MFIFOGetFBOffset(buf);
|
||||||
ol = MFIFOGetLBOffset(buf);
|
ol = MFIFOGetLBOffset(buf);
|
||||||
|
|
||||||
if(mf->last == mf->first) /* empty queue */
|
if (mf->last == mf->first) { /* empty queue */
|
||||||
{
|
|
||||||
mf->first = mf->last = 0; /* optimize */
|
mf->first = mf->last = 0; /* optimize */
|
||||||
|
|
||||||
MFIFOWriteIX(buf, mes, size, mf->first, 0);
|
MFIFOWriteIX(buf, mes, size, mf->first, 0);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else if(of > ol)
|
else if (of > ol) {
|
||||||
{
|
if (mf->bsize - of >= size) {
|
||||||
if(mf->bsize - of >= size)
|
|
||||||
{
|
|
||||||
MFIFOWriteIX(buf, mes, size, mf->first, of);
|
MFIFOWriteIX(buf, mes, size, mf->first, of);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else if(ol > size)
|
else if (ol > size) {
|
||||||
{
|
|
||||||
MFIFOWriteIX(buf, mes, size, mf->first, ol);
|
MFIFOWriteIX(buf, mes, size, mf->first, ol);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(ol - of > size)
|
else if (ol - of > size) {
|
||||||
{
|
|
||||||
MFIFOWriteIX(buf, mes, size, mf->first, of);
|
MFIFOWriteIX(buf, mes, size, mf->first, of);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,66 +57,66 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
void nationalCreateNT(L3UCHAR i)
|
void nationalCreateNT(L3UCHAR i)
|
||||||
{
|
{
|
||||||
Q931SetMesProc(Q931mes_ALERTING, i,Q931ProcAlertingNT, Q931Umes_Alerting, Q931Pmes_Alerting);
|
Q931SetMesProc(Q931mes_ALERTING, i, Q931ProcAlertingNT, Q931Umes_Alerting, Q931Pmes_Alerting);
|
||||||
Q931SetMesProc(Q931mes_CALL_PROCEEDING, i,Q931ProcCallProceedingNT, Q931Umes_CallProceeding, Q931Pmes_CallProceeding);
|
Q931SetMesProc(Q931mes_CALL_PROCEEDING, i, Q931ProcCallProceedingNT, Q931Umes_CallProceeding, Q931Pmes_CallProceeding);
|
||||||
Q931SetMesProc(Q931mes_CONNECT, i,Q931ProcConnectNT, Q931Umes_Connect, Q931Pmes_Connect);
|
Q931SetMesProc(Q931mes_CONNECT, i, Q931ProcConnectNT, Q931Umes_Connect, Q931Pmes_Connect);
|
||||||
Q931SetMesProc(Q931mes_CONNECT_ACKNOWLEDGE, i,Q931ProcConnectAckNT, Q931Umes_ConnectAck, Q931Pmes_ConnectAck);
|
Q931SetMesProc(Q931mes_CONNECT_ACKNOWLEDGE, i, Q931ProcConnectAckNT, Q931Umes_ConnectAck, Q931Pmes_ConnectAck);
|
||||||
Q931SetMesProc(Q931mes_PROGRESS, i,Q931ProcProgressNT, Q931Umes_Progress, Q931Pmes_Progress);
|
Q931SetMesProc(Q931mes_PROGRESS, i, Q931ProcProgressNT, Q931Umes_Progress, Q931Pmes_Progress);
|
||||||
Q931SetMesProc(Q931mes_SETUP, i,Q931ProcSetupNT, nationalUmes_Setup, nationalPmes_Setup);
|
Q931SetMesProc(Q931mes_SETUP, i, Q931ProcSetupNT, nationalUmes_Setup, nationalPmes_Setup);
|
||||||
Q931SetMesProc(Q931mes_SETUP_ACKNOWLEDGE, i,Q931ProcSetupAckNT, Q931Umes_SetupAck, Q931Pmes_SetupAck);
|
Q931SetMesProc(Q931mes_SETUP_ACKNOWLEDGE, i, Q931ProcSetupAckNT, Q931Umes_SetupAck, Q931Pmes_SetupAck);
|
||||||
Q931SetMesProc(Q931mes_RESUME, i,Q931ProcResumeNT, Q931Umes_Resume, Q931Pmes_Resume);
|
Q931SetMesProc(Q931mes_RESUME, i, Q931ProcResumeNT, Q931Umes_Resume, Q931Pmes_Resume);
|
||||||
Q931SetMesProc(Q931mes_RESUME_ACKNOWLEDGE, i,Q931ProcResumeAckNT, Q931Umes_ResumeAck, Q931Pmes_ResumeAck);
|
Q931SetMesProc(Q931mes_RESUME_ACKNOWLEDGE, i, Q931ProcResumeAckNT, Q931Umes_ResumeAck, Q931Pmes_ResumeAck);
|
||||||
Q931SetMesProc(Q931mes_RESUME_REJECT, i,Q931ProcResumeRejectNT, Q931Umes_ResumeReject, Q931Pmes_ResumeReject);
|
Q931SetMesProc(Q931mes_RESUME_REJECT, i, Q931ProcResumeRejectNT, Q931Umes_ResumeReject, Q931Pmes_ResumeReject);
|
||||||
Q931SetMesProc(Q931mes_SUSPEND, i,Q931ProcSuspendNT, Q931Umes_Suspend, Q931Pmes_Suspend);
|
Q931SetMesProc(Q931mes_SUSPEND, i, Q931ProcSuspendNT, Q931Umes_Suspend, Q931Pmes_Suspend);
|
||||||
Q931SetMesProc(Q931mes_SUSPEND_ACKNOWLEDGE, i,Q931ProcSuspendAckNT, Q931Umes_SuspendAck, Q931Pmes_SuspendAck);
|
Q931SetMesProc(Q931mes_SUSPEND_ACKNOWLEDGE, i, Q931ProcSuspendAckNT, Q931Umes_SuspendAck, Q931Pmes_SuspendAck);
|
||||||
Q931SetMesProc(Q931mes_SUSPEND_REJECT, i,Q931ProcSuspendRejectNT, Q931Umes_SuspendReject, Q931Pmes_SuspendReject);
|
Q931SetMesProc(Q931mes_SUSPEND_REJECT, i, Q931ProcSuspendRejectNT, Q931Umes_SuspendReject, Q931Pmes_SuspendReject);
|
||||||
Q931SetMesProc(Q931mes_USER_INFORMATION, i,Q931ProcUserInformationNT, Q931Umes_UserInformation, Q931Pmes_UserInformation);
|
Q931SetMesProc(Q931mes_USER_INFORMATION, i, Q931ProcUserInformationNT, Q931Umes_UserInformation, Q931Pmes_UserInformation);
|
||||||
Q931SetMesProc(Q931mes_DISCONNECT, i,Q931ProcDisconnectNT, Q931Umes_Disconnect, Q931Pmes_Disconnect);
|
Q931SetMesProc(Q931mes_DISCONNECT, i, Q931ProcDisconnectNT, Q931Umes_Disconnect, Q931Pmes_Disconnect);
|
||||||
Q931SetMesProc(Q931mes_RELEASE, i,Q931ProcReleaseNT, Q931Umes_Release, Q931Pmes_Release);
|
Q931SetMesProc(Q931mes_RELEASE, i, Q931ProcReleaseNT, Q931Umes_Release, Q931Pmes_Release);
|
||||||
Q931SetMesProc(Q931mes_RELEASE_COMPLETE, i,Q931ProcReleaseCompleteNT, Q931Umes_ReleaseComplete, Q931Pmes_ReleaseComplete);
|
Q931SetMesProc(Q931mes_RELEASE_COMPLETE, i, Q931ProcReleaseCompleteNT, Q931Umes_ReleaseComplete, Q931Pmes_ReleaseComplete);
|
||||||
Q931SetMesProc(Q931mes_RESTART, i,Q931ProcRestartNT, Q931Umes_Restart, Q931Pmes_Restart);
|
Q931SetMesProc(Q931mes_RESTART, i, Q931ProcRestartNT, Q931Umes_Restart, Q931Pmes_Restart);
|
||||||
Q931SetMesProc(Q931mes_RESTART_ACKNOWLEDGE, i,Q931ProcRestartAckNT, Q931Umes_RestartAck, Q931Pmes_RestartAck);
|
Q931SetMesProc(Q931mes_RESTART_ACKNOWLEDGE, i, Q931ProcRestartAckNT, Q931Umes_RestartAck, Q931Pmes_RestartAck);
|
||||||
Q931SetMesProc(Q931mes_CONGESTION_CONTROL, i,Q931ProcCongestionControlNT, Q931Umes_CongestionControl, Q931Pmes_CongestionControl);
|
Q931SetMesProc(Q931mes_CONGESTION_CONTROL, i, Q931ProcCongestionControlNT, Q931Umes_CongestionControl, Q931Pmes_CongestionControl);
|
||||||
Q931SetMesProc(Q931mes_INFORMATION, i,Q931ProcInformationNT, Q931Umes_Information, Q931Pmes_Information);
|
Q931SetMesProc(Q931mes_INFORMATION, i, Q931ProcInformationNT, Q931Umes_Information, Q931Pmes_Information);
|
||||||
Q931SetMesProc(Q931mes_NOTIFY, i,Q931ProcNotifyNT, Q931Umes_Notify, Q931Pmes_Notify);
|
Q931SetMesProc(Q931mes_NOTIFY, i, Q931ProcNotifyNT, Q931Umes_Notify, Q931Pmes_Notify);
|
||||||
Q931SetMesProc(Q931mes_STATUS, i,Q931ProcStatusNT, Q931Umes_Status, Q931Pmes_Status);
|
Q931SetMesProc(Q931mes_STATUS, i, Q931ProcStatusNT, Q931Umes_Status, Q931Pmes_Status);
|
||||||
Q931SetMesProc(Q931mes_STATUS_ENQUIRY, i,Q931ProcStatusEnquiryNT, Q931Umes_StatusEnquiry, Q931Pmes_StatusEnquiry);
|
Q931SetMesProc(Q931mes_STATUS_ENQUIRY, i, Q931ProcStatusEnquiryNT, Q931Umes_StatusEnquiry, Q931Pmes_StatusEnquiry);
|
||||||
Q931SetMesProc(Q931mes_SEGMENT, i,Q931ProcSegmentNT, Q931Umes_Segment, Q931Pmes_Segment);
|
Q931SetMesProc(Q931mes_SEGMENT, i, Q931ProcSegmentNT, Q931Umes_Segment, Q931Pmes_Segment);
|
||||||
|
|
||||||
Q931SetMesProc(Q932mes_FACILITY, i,Q932ProcFacilityNT, Q932Umes_Facility, Q932Pmes_Facility);
|
Q931SetMesProc(Q932mes_FACILITY, i, Q932ProcFacilityNT, Q932Umes_Facility, Q932Pmes_Facility);
|
||||||
Q931SetMesProc(Q932mes_HOLD, i,Q932ProcHoldNT, Q932Umes_Hold, Q932Pmes_Hold);
|
Q931SetMesProc(Q932mes_HOLD, i, Q932ProcHoldNT, Q932Umes_Hold, Q932Pmes_Hold);
|
||||||
Q931SetMesProc(Q932mes_HOLD_ACKNOWLEDGE, i,Q932ProcHoldAckNT, Q932Umes_HoldAck, Q932Pmes_HoldAck);
|
Q931SetMesProc(Q932mes_HOLD_ACKNOWLEDGE, i, Q932ProcHoldAckNT, Q932Umes_HoldAck, Q932Pmes_HoldAck);
|
||||||
Q931SetMesProc(Q932mes_HOLD_REJECT, i,Q932ProcHoldRejectNT, Q932Umes_HoldReject, Q932Pmes_HoldReject);
|
Q931SetMesProc(Q932mes_HOLD_REJECT, i, Q932ProcHoldRejectNT, Q932Umes_HoldReject, Q932Pmes_HoldReject);
|
||||||
Q931SetMesProc(Q932mes_REGISTER, i,Q932ProcRegisterNT, Q932Umes_Register, Q932Pmes_Register);
|
Q931SetMesProc(Q932mes_REGISTER, i, Q932ProcRegisterNT, Q932Umes_Register, Q932Pmes_Register);
|
||||||
Q931SetMesProc(Q932mes_RETRIEVE, i,Q932ProcRetrieveNT, Q932Umes_Retrieve, Q932Pmes_Retrieve);
|
Q931SetMesProc(Q932mes_RETRIEVE, i, Q932ProcRetrieveNT, Q932Umes_Retrieve, Q932Pmes_Retrieve);
|
||||||
Q931SetMesProc(Q932mes_RETRIEVE_ACKNOWLEDGE,i,Q932ProcRetrieveAckNT, Q932Umes_RetrieveAck, Q932Pmes_RetrieveAck);
|
Q931SetMesProc(Q932mes_RETRIEVE_ACKNOWLEDGE, i, Q932ProcRetrieveAckNT, Q932Umes_RetrieveAck, Q932Pmes_RetrieveAck);
|
||||||
Q931SetMesProc(Q932mes_RETRIEVE_REJECT, i,Q932ProcRetrieveRejectNT, Q932Umes_RetrieveReject, Q932Pmes_RetrieveReject);
|
Q931SetMesProc(Q932mes_RETRIEVE_REJECT, i, Q932ProcRetrieveRejectNT, Q932Umes_RetrieveReject, Q932Pmes_RetrieveReject);
|
||||||
|
|
||||||
/* Set up the IE encoder/decoder handle table.*/
|
/* Set up the IE encoder/decoder handle table.*/
|
||||||
Q931SetIEProc(Q931ie_SEGMENTED_MESSAGE, i,Q931Pie_Segment, Q931Uie_Segment);
|
Q931SetIEProc(Q931ie_SEGMENTED_MESSAGE, i, Q931Pie_Segment, Q931Uie_Segment);
|
||||||
Q931SetIEProc(Q931ie_BEARER_CAPABILITY, i,Q931Pie_BearerCap, Q931Uie_BearerCap);
|
Q931SetIEProc(Q931ie_BEARER_CAPABILITY, i, Q931Pie_BearerCap, Q931Uie_BearerCap);
|
||||||
Q931SetIEProc(Q931ie_CAUSE, i,Q931Pie_Cause, Q931Uie_Cause);
|
Q931SetIEProc(Q931ie_CAUSE, i, Q931Pie_Cause, Q931Uie_Cause);
|
||||||
Q931SetIEProc(Q931ie_CALL_IDENTITY, i,Q931Pie_CallID, Q931Uie_CallID);
|
Q931SetIEProc(Q931ie_CALL_IDENTITY, i, Q931Pie_CallID, Q931Uie_CallID);
|
||||||
Q931SetIEProc(Q931ie_CALL_STATE, i,Q931Pie_CallState, Q931Uie_CallState);
|
Q931SetIEProc(Q931ie_CALL_STATE, i, Q931Pie_CallState, Q931Uie_CallState);
|
||||||
Q931SetIEProc(Q931ie_CHANNEL_IDENTIFICATION, i,Q931Pie_ChanID, Q931Uie_ChanID);
|
Q931SetIEProc(Q931ie_CHANNEL_IDENTIFICATION, i, Q931Pie_ChanID, Q931Uie_ChanID);
|
||||||
Q931SetIEProc(Q931ie_PROGRESS_INDICATOR, i,Q931Pie_ProgInd, Q931Uie_ProgInd);
|
Q931SetIEProc(Q931ie_PROGRESS_INDICATOR, i, Q931Pie_ProgInd, Q931Uie_ProgInd);
|
||||||
Q931SetIEProc(Q931ie_NETWORK_SPECIFIC_FACILITIES, i,Q931Pie_NetFac, Q931Uie_NetFac);
|
Q931SetIEProc(Q931ie_NETWORK_SPECIFIC_FACILITIES, i, Q931Pie_NetFac, Q931Uie_NetFac);
|
||||||
Q931SetIEProc(Q931ie_NOTIFICATION_INDICATOR, i,Q931Pie_NotifInd, Q931Uie_NotifInd);
|
Q931SetIEProc(Q931ie_NOTIFICATION_INDICATOR, i, Q931Pie_NotifInd, Q931Uie_NotifInd);
|
||||||
Q931SetIEProc(Q931ie_DISPLAY, i,Q931Pie_Display, Q931Uie_Display);
|
Q931SetIEProc(Q931ie_DISPLAY, i, Q931Pie_Display, Q931Uie_Display);
|
||||||
Q931SetIEProc(Q931ie_DATETIME, i,Q931Pie_DateTime, Q931Uie_DateTime);
|
Q931SetIEProc(Q931ie_DATETIME, i, Q931Pie_DateTime, Q931Uie_DateTime);
|
||||||
Q931SetIEProc(Q931ie_KEYPAD_FACILITY, i,Q931Pie_KeypadFac, Q931Uie_KeypadFac);
|
Q931SetIEProc(Q931ie_KEYPAD_FACILITY, i, Q931Pie_KeypadFac, Q931Uie_KeypadFac);
|
||||||
Q931SetIEProc(Q931ie_SIGNAL, i,Q931Pie_Signal, Q931Uie_Signal);
|
Q931SetIEProc(Q931ie_SIGNAL, i, Q931Pie_Signal, Q931Uie_Signal);
|
||||||
Q931SetIEProc(Q931ie_TRANSIT_DELAY_SELECTION_AND_IND, i,Q931Pie_TransNetSel, Q931Uie_TransNetSel);
|
Q931SetIEProc(Q931ie_TRANSIT_DELAY_SELECTION_AND_IND, i, Q931Pie_TransNetSel, Q931Uie_TransNetSel);
|
||||||
Q931SetIEProc(Q931ie_CALLING_PARTY_NUMBER, i,Q931Pie_CallingNum, Q931Uie_CallingNum);
|
Q931SetIEProc(Q931ie_CALLING_PARTY_NUMBER, i, Q931Pie_CallingNum, Q931Uie_CallingNum);
|
||||||
Q931SetIEProc(Q931ie_CALLING_PARTY_SUBADDRESS, i,Q931Pie_CallingSub, Q931Uie_CallingSub);
|
Q931SetIEProc(Q931ie_CALLING_PARTY_SUBADDRESS, i, Q931Pie_CallingSub, Q931Uie_CallingSub);
|
||||||
Q931SetIEProc(Q931ie_CALLED_PARTY_NUMBER, i,Q931Pie_CalledNum, Q931Uie_CalledNum);
|
Q931SetIEProc(Q931ie_CALLED_PARTY_NUMBER, i, Q931Pie_CalledNum, Q931Uie_CalledNum);
|
||||||
Q931SetIEProc(Q931ie_CALLED_PARTY_SUBADDRESS, i,Q931Pie_CalledSub, Q931Uie_CalledSub);
|
Q931SetIEProc(Q931ie_CALLED_PARTY_SUBADDRESS, i, Q931Pie_CalledSub, Q931Uie_CalledSub);
|
||||||
Q931SetIEProc(Q931ie_TRANSIT_NETWORK_SELECTION, i,Q931Pie_TransNetSel, Q931Uie_TransNetSel);
|
Q931SetIEProc(Q931ie_TRANSIT_NETWORK_SELECTION, i, Q931Pie_TransNetSel, Q931Uie_TransNetSel);
|
||||||
Q931SetIEProc(Q931ie_RESTART_INDICATOR, i,Q931Pie_RestartInd, Q931Uie_RestartInd);
|
Q931SetIEProc(Q931ie_RESTART_INDICATOR, i, Q931Pie_RestartInd, Q931Uie_RestartInd);
|
||||||
Q931SetIEProc(Q931ie_LOW_LAYER_COMPATIBILITY, i,Q931Pie_LLComp, Q931Uie_LLComp);
|
Q931SetIEProc(Q931ie_LOW_LAYER_COMPATIBILITY, i, Q931Pie_LLComp, Q931Uie_LLComp);
|
||||||
Q931SetIEProc(Q931ie_HIGH_LAYER_COMPATIBILITY, i,Q931Pie_HLComp, Q931Uie_HLComp);
|
Q931SetIEProc(Q931ie_HIGH_LAYER_COMPATIBILITY, i, Q931Pie_HLComp, Q931Uie_HLComp);
|
||||||
Q931SetIEProc(Q931ie_USER_USER, i,Q931Pie_UserUser, Q931Uie_UserUser);
|
Q931SetIEProc(Q931ie_USER_USER, i, Q931Pie_UserUser, Q931Uie_UserUser);
|
||||||
Q931SetIEProc(Q931ie_GENERIC_DIGITS, i,Q931Pie_GenericDigits, Q931Uie_GenericDigits);
|
Q931SetIEProc(Q931ie_GENERIC_DIGITS, i, Q931Pie_GenericDigits, Q931Uie_GenericDigits);
|
||||||
|
|
||||||
/* The following define a state machine. The point is that the Message */
|
/* The following define a state machine. The point is that the Message */
|
||||||
/* procs can when search this to find out if the message/state */
|
/* procs can when search this to find out if the message/state */
|
||||||
|
|
|
@ -65,152 +65,152 @@ extern L3INT Q931L4HeaderSpace;
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
void nationalCreateTE(L3UCHAR i)
|
void nationalCreateTE(L3UCHAR i)
|
||||||
{
|
{
|
||||||
Q931SetMesProc(Q931mes_ALERTING, i,Q931ProcAlertingTE, Q931Umes_Alerting, Q931Pmes_Alerting);
|
Q931SetMesProc(Q931mes_ALERTING, i, Q931ProcAlertingTE, Q931Umes_Alerting, Q931Pmes_Alerting);
|
||||||
Q931SetMesProc(Q931mes_CALL_PROCEEDING, i,Q931ProcCallProceedingTE, Q931Umes_CallProceeding, Q931Pmes_CallProceeding);
|
Q931SetMesProc(Q931mes_CALL_PROCEEDING, i, Q931ProcCallProceedingTE, Q931Umes_CallProceeding, Q931Pmes_CallProceeding);
|
||||||
Q931SetMesProc(Q931mes_CONNECT, i,DMSProc0x07TE, DMSUmes_0x07, DMSPmes_0x07);
|
Q931SetMesProc(Q931mes_CONNECT, i, DMSProc0x07TE, DMSUmes_0x07, DMSPmes_0x07);
|
||||||
Q931SetMesProc(Q931mes_CONNECT_ACKNOWLEDGE, i,DMSProc0x0fTE, DMSUmes_0x0f, DMSPmes_0x0f);
|
Q931SetMesProc(Q931mes_CONNECT_ACKNOWLEDGE, i, DMSProc0x0fTE, DMSUmes_0x0f, DMSPmes_0x0f);
|
||||||
Q931SetMesProc(Q931mes_PROGRESS, i,Q931ProcProgressTE, Q931Umes_Progress, Q931Pmes_Progress);
|
Q931SetMesProc(Q931mes_PROGRESS, i, Q931ProcProgressTE, Q931Umes_Progress, Q931Pmes_Progress);
|
||||||
Q931SetMesProc(Q931mes_SETUP, i,Q931ProcSetupTE, nationalUmes_Setup, nationalPmes_Setup);
|
Q931SetMesProc(Q931mes_SETUP, i, Q931ProcSetupTE, nationalUmes_Setup, nationalPmes_Setup);
|
||||||
Q931SetMesProc(Q931mes_SETUP_ACKNOWLEDGE, i,Q931ProcSetupAckTE, Q931Umes_SetupAck, Q931Pmes_SetupAck);
|
Q931SetMesProc(Q931mes_SETUP_ACKNOWLEDGE, i, Q931ProcSetupAckTE, Q931Umes_SetupAck, Q931Pmes_SetupAck);
|
||||||
Q931SetMesProc(Q931mes_RESUME, i,Q931ProcResumeTE, Q931Umes_Resume, Q931Pmes_Resume);
|
Q931SetMesProc(Q931mes_RESUME, i, Q931ProcResumeTE, Q931Umes_Resume, Q931Pmes_Resume);
|
||||||
Q931SetMesProc(Q931mes_RESUME_ACKNOWLEDGE, i,Q931ProcResumeAckTE, Q931Umes_ResumeAck, Q931Pmes_ResumeAck);
|
Q931SetMesProc(Q931mes_RESUME_ACKNOWLEDGE, i, Q931ProcResumeAckTE, Q931Umes_ResumeAck, Q931Pmes_ResumeAck);
|
||||||
Q931SetMesProc(Q931mes_RESUME_REJECT, i,Q931ProcResumeRejectTE, Q931Umes_ResumeReject, Q931Pmes_ResumeReject);
|
Q931SetMesProc(Q931mes_RESUME_REJECT, i, Q931ProcResumeRejectTE, Q931Umes_ResumeReject, Q931Pmes_ResumeReject);
|
||||||
Q931SetMesProc(Q931mes_SUSPEND, i,Q931ProcSuspendTE, Q931Umes_Suspend, Q931Pmes_Suspend);
|
Q931SetMesProc(Q931mes_SUSPEND, i, Q931ProcSuspendTE, Q931Umes_Suspend, Q931Pmes_Suspend);
|
||||||
Q931SetMesProc(Q931mes_SUSPEND_ACKNOWLEDGE, i,Q931ProcSuspendAckTE, Q931Umes_SuspendAck, Q931Pmes_SuspendAck);
|
Q931SetMesProc(Q931mes_SUSPEND_ACKNOWLEDGE, i, Q931ProcSuspendAckTE, Q931Umes_SuspendAck, Q931Pmes_SuspendAck);
|
||||||
Q931SetMesProc(Q931mes_SUSPEND_REJECT, i,Q931ProcSuspendRejectTE, Q931Umes_SuspendReject, Q931Pmes_SuspendReject);
|
Q931SetMesProc(Q931mes_SUSPEND_REJECT, i, Q931ProcSuspendRejectTE, Q931Umes_SuspendReject, Q931Pmes_SuspendReject);
|
||||||
Q931SetMesProc(Q931mes_USER_INFORMATION, i,Q931ProcUserInformationTE, Q931Umes_UserInformation, Q931Pmes_UserInformation);
|
Q931SetMesProc(Q931mes_USER_INFORMATION, i, Q931ProcUserInformationTE, Q931Umes_UserInformation, Q931Pmes_UserInformation);
|
||||||
Q931SetMesProc(Q931mes_DISCONNECT, i,Q931ProcDisconnectTE, Q931Umes_Disconnect, Q931Pmes_Disconnect);
|
Q931SetMesProc(Q931mes_DISCONNECT, i, Q931ProcDisconnectTE, Q931Umes_Disconnect, Q931Pmes_Disconnect);
|
||||||
Q931SetMesProc(Q931mes_RELEASE, i,Q931ProcReleaseTE, Q931Umes_Release, Q931Pmes_Release);
|
Q931SetMesProc(Q931mes_RELEASE, i, Q931ProcReleaseTE, Q931Umes_Release, Q931Pmes_Release);
|
||||||
Q931SetMesProc(Q931mes_RELEASE_COMPLETE, i,Q931ProcReleaseCompleteTE, Q931Umes_ReleaseComplete, Q931Pmes_ReleaseComplete);
|
Q931SetMesProc(Q931mes_RELEASE_COMPLETE, i, Q931ProcReleaseCompleteTE, Q931Umes_ReleaseComplete, Q931Pmes_ReleaseComplete);
|
||||||
Q931SetMesProc(Q931mes_RESTART, i,Q931ProcRestartTE, Q931Umes_Restart, Q931Pmes_Restart);
|
Q931SetMesProc(Q931mes_RESTART, i, Q931ProcRestartTE, Q931Umes_Restart, Q931Pmes_Restart);
|
||||||
Q931SetMesProc(Q931mes_RESTART_ACKNOWLEDGE, i,Q931ProcRestartAckTE, Q931Umes_RestartAck, Q931Pmes_RestartAck);
|
Q931SetMesProc(Q931mes_RESTART_ACKNOWLEDGE, i, Q931ProcRestartAckTE, Q931Umes_RestartAck, Q931Pmes_RestartAck);
|
||||||
Q931SetMesProc(Q931mes_CONGESTION_CONTROL, i,Q931ProcCongestionControlTE, Q931Umes_CongestionControl, Q931Pmes_CongestionControl);
|
Q931SetMesProc(Q931mes_CONGESTION_CONTROL, i, Q931ProcCongestionControlTE, Q931Umes_CongestionControl, Q931Pmes_CongestionControl);
|
||||||
Q931SetMesProc(Q931mes_INFORMATION, i,Q931ProcInformationTE, Q931Umes_Information, Q931Pmes_Information);
|
Q931SetMesProc(Q931mes_INFORMATION, i, Q931ProcInformationTE, Q931Umes_Information, Q931Pmes_Information);
|
||||||
Q931SetMesProc(Q931mes_NOTIFY, i,Q931ProcNotifyTE, Q931Umes_Notify, Q931Pmes_Notify);
|
Q931SetMesProc(Q931mes_NOTIFY, i, Q931ProcNotifyTE, Q931Umes_Notify, Q931Pmes_Notify);
|
||||||
Q931SetMesProc(Q931mes_STATUS, i,Q931ProcStatusTE, Q931Umes_Status, Q931Pmes_Status);
|
Q931SetMesProc(Q931mes_STATUS, i, Q931ProcStatusTE, Q931Umes_Status, Q931Pmes_Status);
|
||||||
Q931SetMesProc(Q931mes_STATUS_ENQUIRY, i,Q931ProcStatusEnquiryTE, Q931Umes_StatusEnquiry, Q931Pmes_StatusEnquiry);
|
Q931SetMesProc(Q931mes_STATUS_ENQUIRY, i, Q931ProcStatusEnquiryTE, Q931Umes_StatusEnquiry, Q931Pmes_StatusEnquiry);
|
||||||
Q931SetMesProc(Q931mes_SEGMENT, i,Q931ProcSegmentTE, Q931Umes_Segment, Q931Pmes_Segment);
|
Q931SetMesProc(Q931mes_SEGMENT, i, Q931ProcSegmentTE, Q931Umes_Segment, Q931Pmes_Segment);
|
||||||
|
|
||||||
Q931SetMesProc(Q932mes_FACILITY, i,Q932ProcFacilityTE, Q932Umes_Facility, Q932Pmes_Facility);
|
Q931SetMesProc(Q932mes_FACILITY, i, Q932ProcFacilityTE, Q932Umes_Facility, Q932Pmes_Facility);
|
||||||
Q931SetMesProc(Q932mes_HOLD, i,Q932ProcHoldTE, Q932Umes_Hold, Q932Pmes_Hold);
|
Q931SetMesProc(Q932mes_HOLD, i, Q932ProcHoldTE, Q932Umes_Hold, Q932Pmes_Hold);
|
||||||
Q931SetMesProc(Q932mes_HOLD_ACKNOWLEDGE, i,Q932ProcHoldAckTE, Q932Umes_HoldAck, Q932Pmes_HoldAck);
|
Q931SetMesProc(Q932mes_HOLD_ACKNOWLEDGE, i, Q932ProcHoldAckTE, Q932Umes_HoldAck, Q932Pmes_HoldAck);
|
||||||
Q931SetMesProc(Q932mes_HOLD_REJECT, i,Q932ProcHoldRejectTE, Q932Umes_HoldReject, Q932Pmes_HoldReject);
|
Q931SetMesProc(Q932mes_HOLD_REJECT, i, Q932ProcHoldRejectTE, Q932Umes_HoldReject, Q932Pmes_HoldReject);
|
||||||
Q931SetMesProc(Q932mes_REGISTER, i,Q932ProcRegisterTE, Q932Umes_Register, Q932Pmes_Register);
|
Q931SetMesProc(Q932mes_REGISTER, i, Q932ProcRegisterTE, Q932Umes_Register, Q932Pmes_Register);
|
||||||
Q931SetMesProc(Q932mes_RETRIEVE, i,Q932ProcRetrieveTE, Q932Umes_Retrieve, Q932Pmes_Retrieve);
|
Q931SetMesProc(Q932mes_RETRIEVE, i, Q932ProcRetrieveTE, Q932Umes_Retrieve, Q932Pmes_Retrieve);
|
||||||
Q931SetMesProc(Q932mes_RETRIEVE_ACKNOWLEDGE,i,Q932ProcRetrieveAckTE, Q932Umes_RetrieveAck, Q932Pmes_RetrieveAck);
|
Q931SetMesProc(Q932mes_RETRIEVE_ACKNOWLEDGE, i, Q932ProcRetrieveAckTE, Q932Umes_RetrieveAck, Q932Pmes_RetrieveAck);
|
||||||
Q931SetMesProc(Q932mes_RETRIEVE_REJECT, i,Q932ProcRetrieveRejectTE, Q932Umes_RetrieveReject, Q932Pmes_RetrieveReject);
|
Q931SetMesProc(Q932mes_RETRIEVE_REJECT, i, Q932ProcRetrieveRejectTE, Q932Umes_RetrieveReject, Q932Pmes_RetrieveReject);
|
||||||
|
|
||||||
/* Set up the IE encoder/decoder handle table.*/
|
/* Set up the IE encoder/decoder handle table.*/
|
||||||
Q931SetIEProc(Q931ie_SEGMENTED_MESSAGE, i,Q931Pie_Segment, Q931Uie_Segment);
|
Q931SetIEProc(Q931ie_SEGMENTED_MESSAGE, i, Q931Pie_Segment, Q931Uie_Segment);
|
||||||
Q931SetIEProc(Q931ie_BEARER_CAPABILITY, i,Q931Pie_BearerCap, Q931Uie_BearerCap);
|
Q931SetIEProc(Q931ie_BEARER_CAPABILITY, i, Q931Pie_BearerCap, Q931Uie_BearerCap);
|
||||||
Q931SetIEProc(Q931ie_CAUSE, i,Q931Pie_Cause, Q931Uie_Cause);
|
Q931SetIEProc(Q931ie_CAUSE, i, Q931Pie_Cause, Q931Uie_Cause);
|
||||||
Q931SetIEProc(Q931ie_CALL_IDENTITY, i,Q931Pie_CallID, Q931Uie_CallID);
|
Q931SetIEProc(Q931ie_CALL_IDENTITY, i, Q931Pie_CallID, Q931Uie_CallID);
|
||||||
Q931SetIEProc(Q931ie_CALL_STATE, i,Q931Pie_CallState, Q931Uie_CallState);
|
Q931SetIEProc(Q931ie_CALL_STATE, i, Q931Pie_CallState, Q931Uie_CallState);
|
||||||
Q931SetIEProc(Q931ie_CHANGE_STATUS, i,Q931Pie_ChangeStatus, Q931Uie_ChangeStatus);
|
Q931SetIEProc(Q931ie_CHANGE_STATUS, i, Q931Pie_ChangeStatus, Q931Uie_ChangeStatus);
|
||||||
Q931SetIEProc(Q931ie_CHANNEL_IDENTIFICATION, i,Q931Pie_ChanID, Q931Uie_ChanID);
|
Q931SetIEProc(Q931ie_CHANNEL_IDENTIFICATION, i, Q931Pie_ChanID, Q931Uie_ChanID);
|
||||||
Q931SetIEProc(Q931ie_PROGRESS_INDICATOR, i,Q931Pie_ProgInd, Q931Uie_ProgInd);
|
Q931SetIEProc(Q931ie_PROGRESS_INDICATOR, i, Q931Pie_ProgInd, Q931Uie_ProgInd);
|
||||||
Q931SetIEProc(Q931ie_NETWORK_SPECIFIC_FACILITIES, i,Q931Pie_NetFac, Q931Uie_NetFac);
|
Q931SetIEProc(Q931ie_NETWORK_SPECIFIC_FACILITIES, i, Q931Pie_NetFac, Q931Uie_NetFac);
|
||||||
Q931SetIEProc(Q931ie_NOTIFICATION_INDICATOR, i,Q931Pie_NotifInd, Q931Uie_NotifInd);
|
Q931SetIEProc(Q931ie_NOTIFICATION_INDICATOR, i, Q931Pie_NotifInd, Q931Uie_NotifInd);
|
||||||
Q931SetIEProc(Q931ie_DISPLAY, i,Q931Pie_Display, Q931Uie_Display);
|
Q931SetIEProc(Q931ie_DISPLAY, i, Q931Pie_Display, Q931Uie_Display);
|
||||||
Q931SetIEProc(Q931ie_DATETIME, i,Q931Pie_DateTime, Q931Uie_DateTime);
|
Q931SetIEProc(Q931ie_DATETIME, i, Q931Pie_DateTime, Q931Uie_DateTime);
|
||||||
Q931SetIEProc(Q931ie_KEYPAD_FACILITY, i,Q931Pie_KeypadFac, Q931Uie_KeypadFac);
|
Q931SetIEProc(Q931ie_KEYPAD_FACILITY, i, Q931Pie_KeypadFac, Q931Uie_KeypadFac);
|
||||||
Q931SetIEProc(Q931ie_SIGNAL, i,Q931Pie_Signal, Q931Uie_Signal);
|
Q931SetIEProc(Q931ie_SIGNAL, i, Q931Pie_Signal, Q931Uie_Signal);
|
||||||
Q931SetIEProc(Q931ie_TRANSIT_DELAY_SELECTION_AND_IND, i,Q931Pie_TransNetSel, Q931Uie_TransNetSel);
|
Q931SetIEProc(Q931ie_TRANSIT_DELAY_SELECTION_AND_IND, i, Q931Pie_TransNetSel, Q931Uie_TransNetSel);
|
||||||
Q931SetIEProc(Q931ie_CALLING_PARTY_NUMBER, i,Q931Pie_CallingNum, Q931Uie_CallingNum);
|
Q931SetIEProc(Q931ie_CALLING_PARTY_NUMBER, i, Q931Pie_CallingNum, Q931Uie_CallingNum);
|
||||||
Q931SetIEProc(Q931ie_CALLING_PARTY_SUBADDRESS, i,Q931Pie_CallingSub, Q931Uie_CallingSub);
|
Q931SetIEProc(Q931ie_CALLING_PARTY_SUBADDRESS, i, Q931Pie_CallingSub, Q931Uie_CallingSub);
|
||||||
Q931SetIEProc(Q931ie_CALLED_PARTY_NUMBER, i,Q931Pie_CalledNum, Q931Uie_CalledNum);
|
Q931SetIEProc(Q931ie_CALLED_PARTY_NUMBER, i, Q931Pie_CalledNum, Q931Uie_CalledNum);
|
||||||
Q931SetIEProc(Q931ie_CALLED_PARTY_SUBADDRESS, i,Q931Pie_CalledSub, Q931Uie_CalledSub);
|
Q931SetIEProc(Q931ie_CALLED_PARTY_SUBADDRESS, i, Q931Pie_CalledSub, Q931Uie_CalledSub);
|
||||||
Q931SetIEProc(Q931ie_TRANSIT_NETWORK_SELECTION, i,Q931Pie_TransNetSel, Q931Uie_TransNetSel);
|
Q931SetIEProc(Q931ie_TRANSIT_NETWORK_SELECTION, i, Q931Pie_TransNetSel, Q931Uie_TransNetSel);
|
||||||
Q931SetIEProc(Q931ie_RESTART_INDICATOR, i,Q931Pie_RestartInd, Q931Uie_RestartInd);
|
Q931SetIEProc(Q931ie_RESTART_INDICATOR, i, Q931Pie_RestartInd, Q931Uie_RestartInd);
|
||||||
Q931SetIEProc(Q931ie_LOW_LAYER_COMPATIBILITY, i,Q931Pie_LLComp, Q931Uie_LLComp);
|
Q931SetIEProc(Q931ie_LOW_LAYER_COMPATIBILITY, i, Q931Pie_LLComp, Q931Uie_LLComp);
|
||||||
Q931SetIEProc(Q931ie_HIGH_LAYER_COMPATIBILITY, i,Q931Pie_HLComp, Q931Uie_HLComp);
|
Q931SetIEProc(Q931ie_HIGH_LAYER_COMPATIBILITY, i, Q931Pie_HLComp, Q931Uie_HLComp);
|
||||||
Q931SetIEProc(Q931ie_USER_USER, i,Q931Pie_UserUser, Q931Uie_UserUser);
|
Q931SetIEProc(Q931ie_USER_USER, i, Q931Pie_UserUser, Q931Uie_UserUser);
|
||||||
Q931SetIEProc(Q931ie_GENERIC_DIGITS, i,Q931Pie_GenericDigits, Q931Uie_GenericDigits);
|
Q931SetIEProc(Q931ie_GENERIC_DIGITS, i, Q931Pie_GenericDigits, Q931Uie_GenericDigits);
|
||||||
|
|
||||||
Q931SetIEProc(Q931ie_CONNECTED_NUMBER, i, Q931Pie_Generic, Q931Uie_Generic);
|
Q931SetIEProc(Q931ie_CONNECTED_NUMBER, i, Q931Pie_Generic, Q931Uie_Generic);
|
||||||
Q931SetIEProc(Q931ie_FACILITY, i, Q931Pie_Generic, Q931Uie_Generic);
|
Q931SetIEProc(Q931ie_FACILITY, i, Q931Pie_Generic, Q931Uie_Generic);
|
||||||
|
|
||||||
/* The following define a state machine. The point is that the Message */
|
/* The following define a state machine. The point is that the Message
|
||||||
/* procs can when search this to find out if the message/state */
|
* procs can when search this to find out if the message/state
|
||||||
/* combination is legale. If not, the proc for unexpected message apply.*/
|
* combination is legale. If not, the proc for unexpected message apply.
|
||||||
|
*/
|
||||||
|
|
||||||
/* State 0 Idle */
|
/* State 0 Idle */
|
||||||
Q931AddStateEntry(i,Q931_U0, Q931mes_RESUME, 2);
|
Q931AddStateEntry(i, Q931_U0, Q931mes_RESUME, 2);
|
||||||
Q931AddStateEntry(i,Q931_U0, Q931mes_SETUP, 4);
|
Q931AddStateEntry(i, Q931_U0, Q931mes_SETUP, 4);
|
||||||
Q931AddStateEntry(i,Q931_U0, Q931mes_SETUP, 2);
|
Q931AddStateEntry(i, Q931_U0, Q931mes_SETUP, 2);
|
||||||
Q931AddStateEntry(i,Q931_U0, Q931mes_STATUS, 4);
|
Q931AddStateEntry(i, Q931_U0, Q931mes_STATUS, 4);
|
||||||
Q931AddStateEntry(i,Q931_U0, Q931mes_RELEASE, 4);
|
Q931AddStateEntry(i, Q931_U0, Q931mes_RELEASE, 4);
|
||||||
Q931AddStateEntry(i,Q931_U0, Q931mes_RELEASE_COMPLETE,4);
|
Q931AddStateEntry(i, Q931_U0, Q931mes_RELEASE_COMPLETE, 4);
|
||||||
|
|
||||||
/* State 1 Call Initiating */
|
/* State 1 Call Initiating */
|
||||||
Q931AddStateEntry(i,Q931_U1, Q931mes_DISCONNECT, 2);
|
Q931AddStateEntry(i, Q931_U1, Q931mes_DISCONNECT, 2);
|
||||||
Q931AddStateEntry(i,Q931_U1, Q931mes_SETUP_ACKNOWLEDGE, 4);
|
Q931AddStateEntry(i, Q931_U1, Q931mes_SETUP_ACKNOWLEDGE, 4);
|
||||||
Q931AddStateEntry(i,Q931_U1, Q931mes_RELEASE_COMPLETE,4);
|
Q931AddStateEntry(i, Q931_U1, Q931mes_RELEASE_COMPLETE, 4);
|
||||||
Q931AddStateEntry(i,Q931_U1, Q931mes_CALL_PROCEEDING, 4);
|
Q931AddStateEntry(i, Q931_U1, Q931mes_CALL_PROCEEDING, 4);
|
||||||
Q931AddStateEntry(i,Q931_U1, Q931mes_ALERTING, 4);
|
Q931AddStateEntry(i, Q931_U1, Q931mes_ALERTING, 4);
|
||||||
Q931AddStateEntry(i,Q931_U1, Q931mes_CONNECT, 4);
|
Q931AddStateEntry(i, Q931_U1, Q931mes_CONNECT, 4);
|
||||||
|
|
||||||
/* State 2 Overlap Sending */
|
/* State 2 Overlap Sending */
|
||||||
Q931AddStateEntry(i,Q931_U2, Q931mes_INFORMATION, 2);
|
Q931AddStateEntry(i, Q931_U2, Q931mes_INFORMATION, 2);
|
||||||
Q931AddStateEntry(i,Q931_U2, Q931mes_CALL_PROCEEDING, 4);
|
Q931AddStateEntry(i, Q931_U2, Q931mes_CALL_PROCEEDING, 4);
|
||||||
Q931AddStateEntry(i,Q931_U2, Q931mes_ALERTING, 4);
|
Q931AddStateEntry(i, Q931_U2, Q931mes_ALERTING, 4);
|
||||||
Q931AddStateEntry(i,Q931_U2, Q931mes_PROGRESS, 4);
|
Q931AddStateEntry(i, Q931_U2, Q931mes_PROGRESS, 4);
|
||||||
Q931AddStateEntry(i,Q931_U2, Q931mes_CONNECT, 4);
|
Q931AddStateEntry(i, Q931_U2, Q931mes_CONNECT, 4);
|
||||||
Q931AddStateEntry(i,Q931_U2, Q931mes_RELEASE, 2);
|
Q931AddStateEntry(i, Q931_U2, Q931mes_RELEASE, 2);
|
||||||
|
|
||||||
/* State 3 Outgoing Call Proceeding */
|
/* State 3 Outgoing Call Proceeding */
|
||||||
Q931AddStateEntry(i,Q931_U3, Q931mes_PROGRESS, 4);
|
Q931AddStateEntry(i, Q931_U3, Q931mes_PROGRESS, 4);
|
||||||
Q931AddStateEntry(i,Q931_U3, Q931mes_ALERTING, 4);
|
Q931AddStateEntry(i, Q931_U3, Q931mes_ALERTING, 4);
|
||||||
Q931AddStateEntry(i,Q931_U3, Q931mes_CONNECT, 4);
|
Q931AddStateEntry(i, Q931_U3, Q931mes_CONNECT, 4);
|
||||||
Q931AddStateEntry(i,Q931_U3, Q931mes_RELEASE, 2);
|
Q931AddStateEntry(i, Q931_U3, Q931mes_RELEASE, 2);
|
||||||
|
|
||||||
/* State 4 Call Delivered */
|
/* State 4 Call Delivered */
|
||||||
Q931AddStateEntry(i,Q931_U4, Q931mes_CONNECT, 4);
|
Q931AddStateEntry(i, Q931_U4, Q931mes_CONNECT, 4);
|
||||||
|
|
||||||
/* State 6 Call Precent */
|
/* State 6 Call Precent */
|
||||||
Q931AddStateEntry(i,Q931_U6, Q931mes_INFORMATION, 2);
|
Q931AddStateEntry(i, Q931_U6, Q931mes_INFORMATION, 2);
|
||||||
Q931AddStateEntry(i,Q931_U6, Q931mes_ALERTING, 2);
|
Q931AddStateEntry(i, Q931_U6, Q931mes_ALERTING, 2);
|
||||||
Q931AddStateEntry(i,Q931_U6, Q931mes_CALL_PROCEEDING,2);
|
Q931AddStateEntry(i, Q931_U6, Q931mes_CALL_PROCEEDING, 2);
|
||||||
Q931AddStateEntry(i,Q931_U6, Q931mes_CONNECT, 2);
|
Q931AddStateEntry(i, Q931_U6, Q931mes_CONNECT, 2);
|
||||||
Q931AddStateEntry(i,Q931_U6, Q931mes_RELEASE_COMPLETE,2);
|
Q931AddStateEntry(i, Q931_U6, Q931mes_RELEASE_COMPLETE, 2);
|
||||||
Q931AddStateEntry(i,Q931_U6, Q931mes_RELEASE, 4);
|
Q931AddStateEntry(i, Q931_U6, Q931mes_RELEASE, 4);
|
||||||
Q931AddStateEntry(i,Q931_U6, Q931mes_DISCONNECT, 4);
|
Q931AddStateEntry(i, Q931_U6, Q931mes_DISCONNECT, 4);
|
||||||
|
|
||||||
/* State 7 Call Received */
|
/* State 7 Call Received */
|
||||||
Q931AddStateEntry(i,Q931_U7, Q931mes_CONNECT, 2);
|
Q931AddStateEntry(i, Q931_U7, Q931mes_CONNECT, 2);
|
||||||
|
|
||||||
/* State 8 Connect request */
|
/* State 8 Connect request */
|
||||||
Q931AddStateEntry(i,Q931_U8, Q931mes_CONNECT_ACKNOWLEDGE, 4);
|
Q931AddStateEntry(i, Q931_U8, Q931mes_CONNECT_ACKNOWLEDGE, 4);
|
||||||
|
|
||||||
/* State 9 Incoming Call Proceeding */
|
/* State 9 Incoming Call Proceeding */
|
||||||
Q931AddStateEntry(i,Q931_U9, Q931mes_CONNECT, 2);
|
Q931AddStateEntry(i, Q931_U9, Q931mes_CONNECT, 2);
|
||||||
Q931AddStateEntry(i,Q931_U9, Q931mes_ALERTING, 2);
|
Q931AddStateEntry(i, Q931_U9, Q931mes_ALERTING, 2);
|
||||||
Q931AddStateEntry(i,Q931_U9, Q931mes_PROGRESS, 2);
|
Q931AddStateEntry(i, Q931_U9, Q931mes_PROGRESS, 2);
|
||||||
|
|
||||||
/* State 10 Active */
|
/* State 10 Active */
|
||||||
Q931AddStateEntry(i,Q931_U10, Q931mes_SUSPEND, 2);
|
Q931AddStateEntry(i, Q931_U10, Q931mes_SUSPEND, 2);
|
||||||
Q931AddStateEntry(i,Q931_U10, Q931mes_NOTIFY, 4);
|
Q931AddStateEntry(i, Q931_U10, Q931mes_NOTIFY, 4);
|
||||||
Q931AddStateEntry(i,Q931_U10, Q931mes_NOTIFY, 2);
|
Q931AddStateEntry(i, Q931_U10, Q931mes_NOTIFY, 2);
|
||||||
|
|
||||||
/* State 11 Disconnect Request */
|
/* State 11 Disconnect Request */
|
||||||
Q931AddStateEntry(i,Q931_U11, Q931mes_RELEASE, 4);
|
Q931AddStateEntry(i, Q931_U11, Q931mes_RELEASE, 4);
|
||||||
Q931AddStateEntry(i,Q931_U11, Q931mes_DISCONNECT, 4);
|
Q931AddStateEntry(i, Q931_U11, Q931mes_DISCONNECT, 4);
|
||||||
Q931AddStateEntry(i,Q931_U11, Q931mes_NOTIFY, 4);
|
Q931AddStateEntry(i, Q931_U11, Q931mes_NOTIFY, 4);
|
||||||
|
|
||||||
/* State 12 Disconnect Ind */
|
/* State 12 Disconnect Ind */
|
||||||
Q931AddStateEntry(i,Q931_U12, Q931mes_RELEASE, 4);
|
Q931AddStateEntry(i, Q931_U12, Q931mes_RELEASE, 4);
|
||||||
Q931AddStateEntry(i,Q931_U12, Q931mes_RELEASE, 2);
|
Q931AddStateEntry(i, Q931_U12, Q931mes_RELEASE, 2);
|
||||||
|
|
||||||
/* State 15 Suspend Request */
|
/* State 15 Suspend Request */
|
||||||
Q931AddStateEntry(i,Q931_U15, Q931mes_SUSPEND_ACKNOWLEDGE, 4);
|
Q931AddStateEntry(i, Q931_U15, Q931mes_SUSPEND_ACKNOWLEDGE, 4);
|
||||||
Q931AddStateEntry(i,Q931_U15, Q931mes_SUSPEND_REJECT, 4);
|
Q931AddStateEntry(i, Q931_U15, Q931mes_SUSPEND_REJECT, 4);
|
||||||
Q931AddStateEntry(i,Q931_U15, Q931mes_DISCONNECT, 4);
|
Q931AddStateEntry(i, Q931_U15, Q931mes_DISCONNECT, 4);
|
||||||
Q931AddStateEntry(i,Q931_U15, Q931mes_RELEASE, 4);
|
Q931AddStateEntry(i, Q931_U15, Q931mes_RELEASE, 4);
|
||||||
|
|
||||||
/* TODO
|
/* TODO
|
||||||
Q931AddStateEntry(i,Q931_U17,
|
Q931AddStateEntry(i, Q931_U17,
|
||||||
Q931AddStateEntry(i,Q931_U19,
|
Q931AddStateEntry(i, Q931_U19,
|
||||||
Q931AddStateEntry(i,Q931_U25,
|
Q931AddStateEntry(i, Q931_U25,
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,14 +53,13 @@
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
L3INT nationalUmes_Setup(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, Q931mes_Generic *mes, L3INT IOff, L3INT Size)
|
L3INT nationalUmes_Setup(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, Q931mes_Generic *mes, L3INT IOff, L3INT Size)
|
||||||
{
|
{
|
||||||
L3INT ir=0;
|
L3INT ir = 0;
|
||||||
L3INT OOff=0;
|
L3INT OOff = 0;
|
||||||
L3INT rc=Q931E_NO_ERROR;
|
L3INT rc = Q931E_NO_ERROR;
|
||||||
L3UCHAR last_codeset = 0, codeset = 0;
|
L3UCHAR last_codeset = 0, codeset = 0;
|
||||||
L3UCHAR shift_lock = 1;
|
L3UCHAR shift_lock = 1;
|
||||||
|
|
||||||
while(IOff < Size)
|
while (IOff < Size) {
|
||||||
{
|
|
||||||
if (!shift_lock) {
|
if (!shift_lock) {
|
||||||
codeset = last_codeset;
|
codeset = last_codeset;
|
||||||
}
|
}
|
||||||
|
@ -75,8 +74,7 @@ L3INT nationalUmes_Setup(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, Q931mes_Generi
|
||||||
}
|
}
|
||||||
|
|
||||||
if (codeset == 0) {
|
if (codeset == 0) {
|
||||||
switch(IBuf[IOff])
|
switch (IBuf[IOff]) {
|
||||||
{
|
|
||||||
case Q931ie_SENDING_COMPLETE:
|
case Q931ie_SENDING_COMPLETE:
|
||||||
case Q931ie_BEARER_CAPABILITY:
|
case Q931ie_BEARER_CAPABILITY:
|
||||||
case Q931ie_CHANNEL_IDENTIFICATION:
|
case Q931ie_CHANNEL_IDENTIFICATION:
|
||||||
|
@ -94,11 +92,11 @@ L3INT nationalUmes_Setup(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, Q931mes_Generi
|
||||||
case Q931ie_LOW_LAYER_COMPATIBILITY:
|
case Q931ie_LOW_LAYER_COMPATIBILITY:
|
||||||
case Q931ie_HIGH_LAYER_COMPATIBILITY:
|
case Q931ie_HIGH_LAYER_COMPATIBILITY:
|
||||||
rc = Q931Uie[pTrunk->Dialect][IBuf[IOff]](pTrunk, mes, &IBuf[IOff], &mes->buf[OOff], &IOff, &OOff);
|
rc = Q931Uie[pTrunk->Dialect][IBuf[IOff]](pTrunk, mes, &IBuf[IOff], &mes->buf[OOff], &IOff, &OOff);
|
||||||
if(rc != Q931E_NO_ERROR)
|
if (rc != Q931E_NO_ERROR)
|
||||||
return rc;
|
return rc;
|
||||||
break;
|
break;
|
||||||
case Q931ie_REPEAT_INDICATOR:
|
case Q931ie_REPEAT_INDICATOR:
|
||||||
if(ir < 2) {
|
if (ir < 2) {
|
||||||
rc = Q931Uie[pTrunk->Dialect][IBuf[IOff]](pTrunk, mes, &IBuf[IOff], &mes->buf[OOff], &IOff, &OOff);
|
rc = Q931Uie[pTrunk->Dialect][IBuf[IOff]](pTrunk, mes, &IBuf[IOff], &mes->buf[OOff], &IOff, &OOff);
|
||||||
ir++;
|
ir++;
|
||||||
} else {
|
} else {
|
||||||
|
@ -110,11 +108,10 @@ L3INT nationalUmes_Setup(Q931_TrunkInfo_t *pTrunk, L3UCHAR *IBuf, Q931mes_Generi
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else if (codeset == 6) {
|
} else if (codeset == 6) {
|
||||||
switch(IBuf[IOff])
|
switch (IBuf[IOff]) {
|
||||||
{
|
|
||||||
case Q931ie_GENERIC_DIGITS:
|
case Q931ie_GENERIC_DIGITS:
|
||||||
rc = Q931Uie[pTrunk->Dialect][IBuf[IOff]](pTrunk, mes, &IBuf[IOff], &mes->buf[OOff], &IOff, &OOff);
|
rc = Q931Uie[pTrunk->Dialect][IBuf[IOff]](pTrunk, mes, &IBuf[IOff], &mes->buf[OOff], &IOff, &OOff);
|
||||||
if(rc != Q931E_NO_ERROR)
|
if (rc != Q931E_NO_ERROR)
|
||||||
return rc;
|
return rc;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -158,101 +155,113 @@ L3INT nationalPmes_Setup(Q931_TrunkInfo_t *pTrunk, Q931mes_Generic *IBuf, L3INT
|
||||||
Q931MesgHeader(pTrunk, pMes, OBuf, *OSize, &Octet);
|
Q931MesgHeader(pTrunk, pMes, OBuf, *OSize, &Octet);
|
||||||
|
|
||||||
/* Sending Complete */
|
/* Sending Complete */
|
||||||
if(Q931IsIEPresent(pMes->SendComplete))
|
if (Q931IsIEPresent(pMes->SendComplete)) {
|
||||||
OBuf[Octet++] = (L3UCHAR)(pMes->SendComplete & 0x00ff);
|
OBuf[Octet++] = (L3UCHAR)(pMes->SendComplete & 0x00ff);
|
||||||
|
}
|
||||||
|
|
||||||
/* Repeat Indicator */
|
/* Repeat Indicator */
|
||||||
if(Q931IsIEPresent(pMes->RepeatInd))
|
if (Q931IsIEPresent(pMes->RepeatInd)) {
|
||||||
OBuf[Octet++] = (L3UCHAR)(pMes->RepeatInd & 0x00ff);
|
OBuf[Octet++] = (L3UCHAR)(pMes->RepeatInd & 0x00ff);
|
||||||
|
}
|
||||||
|
|
||||||
/* Bearer capability */
|
/* Bearer capability */
|
||||||
if(Q931IsIEPresent(pMes->BearerCap))
|
if (Q931IsIEPresent(pMes->BearerCap)) {
|
||||||
{
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_BEARER_CAPABILITY](pTrunk, Q931GetIEPtr(pMes->BearerCap,pMes->buf), OBuf, &Octet)) != 0)
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_BEARER_CAPABILITY](pTrunk, Q931GetIEPtr(pMes->BearerCap,pMes->buf), OBuf, &Octet))!=0)
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
rc = Q931E_BEARERCAP;
|
||||||
rc=Q931E_BEARERCAP;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Channel Identification */
|
/* Channel Identification */
|
||||||
if(Q931IsIEPresent(pMes->ChanID))
|
if (Q931IsIEPresent(pMes->ChanID)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_CHANNEL_IDENTIFICATION](pTrunk, Q931GetIEPtr(pMes->ChanID,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_CHANNEL_IDENTIFICATION](pTrunk, Q931GetIEPtr(pMes->ChanID,pMes->buf), OBuf, &Octet)) != 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Progress indicator */
|
/* Progress indicator */
|
||||||
if(Q931IsIEPresent(pMes->ProgInd))
|
if (Q931IsIEPresent(pMes->ProgInd)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_PROGRESS_INDICATOR](pTrunk, Q931GetIEPtr(pMes->ProgInd,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_PROGRESS_INDICATOR](pTrunk, Q931GetIEPtr(pMes->ProgInd,pMes->buf), OBuf, &Octet)) != 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Network spesific facilities */
|
/* Network spesific facilities */
|
||||||
if(Q931IsIEPresent(pMes->NetFac))
|
if (Q931IsIEPresent(pMes->NetFac)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_NETWORK_SPECIFIC_FACILITIES](pTrunk, Q931GetIEPtr(pMes->NetFac,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_NETWORK_SPECIFIC_FACILITIES](pTrunk, Q931GetIEPtr(pMes->NetFac,pMes->buf), OBuf, &Octet)) != 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Display */
|
/* Display */
|
||||||
if(Q931IsIEPresent(pMes->Display))
|
if (Q931IsIEPresent(pMes->Display)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_DISPLAY](pTrunk, Q931GetIEPtr(pMes->Display,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_DISPLAY](pTrunk, Q931GetIEPtr(pMes->Display,pMes->buf), OBuf, &Octet)) != 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Date/Time */
|
/* Date/Time */
|
||||||
if(Q931IsIEPresent(pMes->DateTime))
|
if (Q931IsIEPresent(pMes->DateTime)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_DATETIME](pTrunk, Q931GetIEPtr(pMes->DateTime,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_DATETIME](pTrunk, Q931GetIEPtr(pMes->DateTime,pMes->buf), OBuf, &Octet)) != 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Keypad Facility */
|
/* Keypad Facility */
|
||||||
if(Q931IsIEPresent(pMes->KeypadFac))
|
if (Q931IsIEPresent(pMes->KeypadFac)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_KEYPAD_FACILITY](pTrunk, Q931GetIEPtr(pMes->KeypadFac,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_KEYPAD_FACILITY](pTrunk, Q931GetIEPtr(pMes->KeypadFac,pMes->buf), OBuf, &Octet)) != 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Signal */
|
/* Signal */
|
||||||
if(Q931IsIEPresent(pMes->Signal))
|
if (Q931IsIEPresent(pMes->Signal)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_SIGNAL](pTrunk, Q931GetIEPtr(pMes->Signal,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_SIGNAL](pTrunk, Q931GetIEPtr(pMes->Signal,pMes->buf), OBuf, &Octet)) != 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Calling Party Number */
|
/* Calling Party Number */
|
||||||
if(Q931IsIEPresent(pMes->CallingNum))
|
if (Q931IsIEPresent(pMes->CallingNum)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_CALLING_PARTY_NUMBER](pTrunk, Q931GetIEPtr(pMes->CallingNum,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_CALLING_PARTY_NUMBER](pTrunk, Q931GetIEPtr(pMes->CallingNum,pMes->buf), OBuf, &Octet)) != 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Calling Party Subaddress */
|
/* Calling Party Subaddress */
|
||||||
if(Q931IsIEPresent(pMes->CallingSub))
|
if (Q931IsIEPresent(pMes->CallingSub)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_CALLING_PARTY_SUBADDRESS](pTrunk, Q931GetIEPtr(pMes->CallingSub,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_CALLING_PARTY_SUBADDRESS](pTrunk, Q931GetIEPtr(pMes->CallingSub,pMes->buf), OBuf, &Octet)) != 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Called Party number */
|
/* Called Party number */
|
||||||
if(Q931IsIEPresent(pMes->CalledNum))
|
if (Q931IsIEPresent(pMes->CalledNum)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_CALLED_PARTY_NUMBER](pTrunk, Q931GetIEPtr(pMes->CalledNum,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_CALLED_PARTY_NUMBER](pTrunk, Q931GetIEPtr(pMes->CalledNum,pMes->buf), OBuf, &Octet)) != 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Called party subaddress */
|
/* Called party subaddress */
|
||||||
if(Q931IsIEPresent(pMes->CalledSub))
|
if (Q931IsIEPresent(pMes->CalledSub)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_CALLED_PARTY_SUBADDRESS](pTrunk, Q931GetIEPtr(pMes->CalledSub,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_CALLED_PARTY_SUBADDRESS](pTrunk, Q931GetIEPtr(pMes->CalledSub,pMes->buf), OBuf, &Octet)) != 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Transit network selection */
|
/* Transit network selection */
|
||||||
if(Q931IsIEPresent(pMes->TransNetSel))
|
if (Q931IsIEPresent(pMes->TransNetSel)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_TRANSIT_NETWORK_SELECTION](pTrunk, Q931GetIEPtr(pMes->TransNetSel,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_TRANSIT_NETWORK_SELECTION](pTrunk, Q931GetIEPtr(pMes->TransNetSel,pMes->buf), OBuf, &Octet)) != 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* Repeat Indicator */
|
/* Repeat Indicator */
|
||||||
if(Q931IsIEPresent(pMes->LLRepeatInd))
|
if (Q931IsIEPresent(pMes->LLRepeatInd)) {
|
||||||
rc = Q931E_UNKNOWN_IE;/* TODO */
|
rc = Q931E_UNKNOWN_IE;/* TODO */
|
||||||
|
}
|
||||||
|
|
||||||
/* Low Layer Compatibility */
|
/* Low Layer Compatibility */
|
||||||
if(Q931IsIEPresent(pMes->LLComp))
|
if (Q931IsIEPresent(pMes->LLComp)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_LOW_LAYER_COMPATIBILITY](pTrunk, Q931GetIEPtr(pMes->LLComp,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_LOW_LAYER_COMPATIBILITY](pTrunk, Q931GetIEPtr(pMes->LLComp,pMes->buf), OBuf, &Octet)) != 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* High Layer Compatibility */
|
/* High Layer Compatibility */
|
||||||
if(Q931IsIEPresent(pMes->HLComp))
|
if (Q931IsIEPresent(pMes->HLComp)) {
|
||||||
if((rc=Q931Pie[pTrunk->Dialect][Q931ie_HIGH_LAYER_COMPATIBILITY](pTrunk, Q931GetIEPtr(pMes->HLComp,pMes->buf), OBuf, &Octet))!=0)
|
if ((rc = Q931Pie[pTrunk->Dialect][Q931ie_HIGH_LAYER_COMPATIBILITY](pTrunk, Q931GetIEPtr(pMes->HLComp,pMes->buf), OBuf, &Octet)) != 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
*OSize = Octet;
|
*OSize = Octet;
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue