eXosip中Event事件学习笔记

eXosip中Event事件学习笔记

文章目录

  • eXosip中Event事件学习笔记
    • SIP Method
    • eXosip_event_type_t 事件类型枚举
    • eXosip_event_t 结构体

SIP Method

  1. REGISTER
  2. OPTIONS
  3. INVITE
  4. PUBLISH
  5. SUBSCRIBE
  6. MESSAGE
  7. NOTIFY
  8. ACK
  9. BYE
  10. CANCEL

eXosip_event_type_t 事件类型枚举

Evnet Explain method type translate
EXOSIP_REGISTRATION_SUCCESS user is successfully registred. REGISTER Response 收到上级平台的 2xx 注册成功
EXOSIP_REGISTRATION_FAILURE user is not registred. REGISTER Response 收到上级平台的 3456xx 注册失败
EXOSIP_CALL_INVITE announce a new call INVITE Request 收到上级平台发送的INVITE请求
EXOSIP_CALL_REINVITE announce a new INVITE within call INVITE Request GB28181无多方通话,所以无此情况
EXOSIP_CALL_NOANSWER announce no answer within the timeout NONE(INVITE) Event 向下级平台发送的INVITE请求 无响应
EXOSIP_CALL_PROCEEDING announce processing by a remote app INVITE Response 向下级平台发送的INVITE请求 1xx 响应
EXOSIP_CALL_RINGING announce ringback INVITE Response 向下级平台发送的INVITE请求 INVITE 1xx 响应
EXOSIP_CALL_ANSWERED announce start of call INVITE Response 向下级平台发送的INVITE请求 INVITE 2xx 响应
EXOSIP_CALL_REDIRECTED announce a redirection INVITE Response 向下级平台发送的INVITE请求 INVITE 3xx 响应
EXOSIP_CALL_REQUESTFAILURE announce a request failure INVITE Response 向下级平台发送的INVITE请求 INVITE 4xx 响应
EXOSIP_CALL_SERVERFAILURE announce a server failure INVITE Response 向下级平台发送的INVITE请求 INVITE 5xx 响应
EXOSIP_CALL_GLOBALFAILURE announce a global failure INVITE Response 向下级平台发送的INVITE请求 INVITE 6xx 响应
EXOSIP_CALL_ACK ACK received for 200ok to INVITE ACK Request 收到下级平台发送的ACK请求
EXOSIP_CALL_CANCELLED announce that call has been cancelled NONE Event GB28181无多方通话,所以无此情况
EXOSIP_CALL_MESSAGE_NEW announce new incoming request. MESSAGE,BYE,… Request 收到上级发送的MESSAGE消息(会话中)
EXOSIP_CALL_MESSAGE_PROCEEDING announce a 1xx for request. MESSAGE Response 向下级平台发送的MESSAGE请求(会话中) 1xx 响应
EXOSIP_CALL_MESSAGE_ANSWERED announce a 200ok MESSAGE Response 向下级平台发送的MESSAGE请求(会话中) 2xx 响应
EXOSIP_CALL_MESSAGE_REDIRECTED announce a failure. MESSAGE Response 向下级平台发送的MESSAGE请求(会话中) 3xx 响应
EXOSIP_CALL_MESSAGE_REQUESTFAILURE announce a failure. MESSAGE Response 向下级平台发送的MESSAGE请求(会话中) 4xx 响应
EXOSIP_CALL_MESSAGE_SERVERFAILURE announce a failure. MESSAGE Response 向下级平台发送的MESSAGE请求(会话中) 5xx 响应
EXOSIP_CALL_MESSAGE_GLOBALFAILURE announce a failure. MESSAGE Response 向下级平台发送的MESSAGE请求(会话中) 6xx 响应
EXOSIP_CALL_CLOSED a BYE was received for this call BYE Request 收到上级或者下级发送的BYE请求
EXOSIP_CALL_RELEASED call context is cleared. NONE Event 会话释放
EXOSIP_MESSAGE_NEW announce new incoming request. MESSAGE,REGISTER,NOTIFY Request 收到上级或者下级发送的MESSAGE消息
EXOSIP_MESSAGE_PROCEEDING announce a 1xx for request. MESSAGE Response 向上级或者下级发送的MESSAGE请求 1xx 响应
EXOSIP_MESSAGE_ANSWERED announce a 200ok MESSAGE Response 向上级或者下级发送的MESSAGE请求 2xx 响应
EXOSIP_MESSAGE_REDIRECTED announce a failure. MESSAGE Response 向上级或者下级发送的MESSAGE请求 3xx 响应
EXOSIP_MESSAGE_REQUESTFAILURE announce a failure. MESSAGE Response 向上级或者下级发送的MESSAGE请求 4xx 响应
EXOSIP_MESSAGE_SERVERFAILURE announce a failure. MESSAGE Response 向上级或者下级发送的MESSAGE请求 5xx 响应
EXOSIP_MESSAGE_GLOBALFAILURE announce a failure. MESSAGE Response 向上级或者下级发送的MESSAGE请求 6xx 响应
EXOSIP_SUBSCRIPTION_NOANSWER announce no answer NONE(SUBSCRIPTION) Event 向下级平台发送的SUBSCRIBE/REFER请求 无响应
EXOSIP_SUBSCRIPTION_PROCEEDING announce a 1xx SUBSCRIPTION Response 向下级平台发送的SUBSCRIBE/REFER请求 1xx 响应
EXOSIP_SUBSCRIPTION_ANSWERED announce a 200ok SUBSCRIPTION Response 向下级平台发送的SUBSCRIBE/REFER请求 2xx 响应
EXOSIP_SUBSCRIPTION_REDIRECTED announce a redirection SUBSCRIPTION Response 向下级平台发送的SUBSCRIBE/REFER请求 3xx 响应
EXOSIP_SUBSCRIPTION_REQUESTFAILURE announce a request failure SUBSCRIPTION Response 向下级平台发送的SUBSCRIBE/REFER请求 4xx 响应
EXOSIP_SUBSCRIPTION_SERVERFAILURE announce a server failure SUBSCRIPTION Response 向下级平台发送的SUBSCRIBE/REFER请求 5xx 响应
EXOSIP_SUBSCRIPTION_GLOBALFAILURE announce a global failure SUBSCRIPTION Response 向下级平台发送的SUBSCRIBE/REFER请求 6xx 响应
EXOSIP_SUBSCRIPTION_NOTIFY announce new NOTIFY request NOTIFY Request 收到下级平台发送的NOTIFY请求
EXOSIP_IN_SUBSCRIPTION_NEW announce new incoming SUBSCRIBE/REFER. SUBSCRIBE Request 收到上级平台发送的SUBSCRIBE/REFER请求
EXOSIP_NOTIFICATION_NOANSWER announce no answer NONE(NOTIFY) Event 向上级平台发送的Notify请求 无响应
EXOSIP_NOTIFICATION_PROCEEDING announce a 1xx NOTIFY Response 向上级平台发送的Notify请求 1xx 响应
EXOSIP_NOTIFICATION_ANSWERED announce a 200ok NOTIFY Response 向上级平台发送的Notify请求 2xx 响应
EXOSIP_NOTIFICATION_REDIRECTED announce a redirection NOTIFY Response 向上级平台发送的Notify请求 3xx 响应
EXOSIP_NOTIFICATION_REQUESTFAILURE announce a request failure NOTIFY Response 向上级平台发送的Notify请求 4xx 响应
EXOSIP_NOTIFICATION_SERVERFAILURE announce a server failure NOTIFY Response 向上级平台发送的Notify请求 5xx 响应
EXOSIP_NOTIFICATION_GLOBALFAILURE announce a global failure NOTIFY Response 向上级平台发送的Notify请求 6xx 响应
EXOSIP_EVENT_COUNT MAX number of events NONE None 事件最大值

eXosip_event_t 结构体

struct eXosip_event {
    eXosip_event_type_t type;               /**< type of the event 事件的类型 */
    char textinfo[256];                     /**< text description of event 事件描述 */
    void *external_reference;               /**< external reference (for calls) 扩展参考信息(针对于通话)  */

    osip_message_t *request;       /**< request within current transaction 当前事务的REQ */
    osip_message_t *response;      /**< last response within current transaction 当前事务的最后一个RES(最终相应前面可能存在1xx相应) */
    osip_message_t *ack;           /**< ack within current transaction 当前事务的ACK*/

    int tid; /**< unique id for transactions (to be used for answers) 唯一的事务ID(用于相应请求)*/
    int did; /**< unique id for SIP dialogs 唯一的会话ID */

    int rid; /**< unique id for registration 唯一的注册ID */
    int cid; /**< unique id for SIP calls (but multiple dialogs!) 唯一的会话ID(但是一个会话里可能有多个对话(dialog)) */
    int sid; /**< unique id for outgoing subscriptions 唯一的订阅ID (订阅别人时的ID) */
    int nid; /**< unique id for incoming subscriptions 唯一的通知ID (被别人订阅是的ID)*/

    int ss_status;  /**< current Subscription-State for subscription 当前的订阅状态 */
    int ss_reason;  /**< current Reason status for subscription 当前的状态原因 */
  };

你可能感兴趣的:(C/C++,exosip)