作者:asd54w464wq_212 | 来源:互联网 | 2023-10-11 15:36
/**////
/// 语音资源操作类型
///
public enum VoiceOperatorType
{
/**////
/// //没有语音操作
///
OP_NoOperator = 0,
/**////
/// //普通放音
///
OP_Play = 1,
/**////
/// //循环放音
///
OP_LoopPlay = 2,
};
/**////
/// 用户状态类型
///
public enum USER_STATE
{
/**////
/// 未摘机
///
USR_OFFHOOK=0,
/**////
/// 等待拨号
///
USR_WAITDIAL=1,
/**////
/// 拨号
///
USR_DIAL=2,
/**////
/// 结束
///
USR_ENDSESSION=3,
/**////
/// 等待语音
///
USR_WAITONHOOK=4,
/**////
/// 振铃
///
USR_RING=5,
/**////
/// 通话
///
USR_CONNECT=6,
/**////
/// 摘机中
///
USR_ONHOOK = 50,
/**////
/// 取消振铃
///
USR_EXRING=51,
/**////
/// 退出通话
///
USR_EXCONNECT=52
};
/**////
/// 中继信道状态
///
public enum TRUNK_ST
{
/**////
/// 空闲状态
///
TRK_FREE=0, //free state
/**////
/// 准备状态
///
TRK_READY=1, //mfc stop state
/**////
/// 振铃状态
///
TRK_RING=2, //ring user
/**////
/// 拨号状态
///
TRK_CALLOUT=3, //user dial over, callout
/**////
/// 等待摘机
///
TRK_WAITUSEROFFHOOK=4, //ring user, wait offhok
/**////
/// 摘机状态
///
TRK_WAITUSERONHOOK=5,
/**////
/// 结束谈话
///
TRK_ENDSESSION=6, //end a talk
/**////
/// 链接状态
///
TRK_CONNECT=7,
/**////
/// 为初始化状态
///
TRK_NULLSTATE=8,
/**////
/// 播放状态
///
TRK_PLAY=9,
/**////
/// 呼入状态
///
TRK_CALLIN=10,
/**////
/// 摘机状态
///
TRK_ONHOOK=11,
/**////
/// 挂机状态
///
TRK_HANGUP=12,
};
/**////
/// 用户状态
///
public struct UR_ST
{
public int ConnUrID;
public USER_STATE ST;
public int ConnTrID;
}
/**////
/// 对收到的ISUP消息,获取其中的原因值
///
public enum CAUSE_VALUE:int
{
/**////
/// 中继通道的范围越界
///
RSN_PCMNULL_CALLER=-1,
/**////
/// 收到的消息中不含有原因指示码,或没有新的ISUP消息到达
///
RSN_UNKOWNNUM_ISUP=0,
/**////
/// //空号
///
RSN_UNALLOCATED_NUMBER = 0x01,
/**////
/// //正常的呼叫清除
///
RSN_NORMAL_CALL_CLEARING = 0x10,
/**////
/// //用户忙
///
RSN_USER_BUSY = 0x11,
/**////
/// //无用户响应
///
RSN_NO_USER_RESPONDING = 0x12,
/**////
/// //被叫无应答,超时未摘机
///
RSN_USER_ALERTING_NO_ANSWER = 0x13,
/**////
/// //呼叫拒绝
///
RSN_CALL_REJECTED = 0x15,
/**////
/// //不完整的号码
///
RSN_INCOMPLETE_NUMBER = 0x1c,
/**////
/// //正常,未规定
///
RSN_NORMAL_NO_SET = 0x1f,
/**////
/// //无可用的电路
///
RSN_NO_CIRCUIT_CHANNELAVAILABLE = 0x22,
/**////
/// //请求的电路不可用
///
RSN_REQUESTEDCIRCUIT_CHANNEL_NOTAVAILABLE = 0x2c,
/**////
/// //定时器超时恢复
///
RSN_RECOVERY_ON_TIME_EXPIRY = 0x66,
/**////
/// //本地释放电路
///
RSN_LOCAL_RLC = 0x20,
/**////
/// //电路复原
///
RSN_RECEIVE_RSC = 0x21,
};
/**////
/// 信道状态
///
public struct TRK_ST
{
public TRUNK_ST ST;
public int ConnUrID;
public int ConnTrID;
public string DialNum;
}
public struct PR
{
[MarshalAs(UnmanagedType.ByValArray,SizeConst=32)]
public char[] TelarrChar;
public char[] CallarrChar;
}
public struct TelNum
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
public byte[] arrTelNum;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
public byte[] arrCallNum;
}
}
原作地址:http://www.cnblogs.com/cnherman/archive/2008/07/08/1237937.html