当前位置: 首页 > 工具软件 > eXosip > 使用案例 >

eXosip中Event事件学习笔记

杭永安
2023-12-01

eXosip中Event事件学习笔记

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 事件类型枚举

EvnetExplainmethodtypetranslate
EXOSIP_REGISTRATION_SUCCESSuser is successfully registred.REGISTERResponse收到上级平台的 2xx 注册成功
EXOSIP_REGISTRATION_FAILUREuser is not registred.REGISTERResponse收到上级平台的 3456xx 注册失败
EXOSIP_CALL_INVITEannounce a new callINVITERequest收到上级平台发送的INVITE请求
EXOSIP_CALL_REINVITEannounce a new INVITE within callINVITERequestGB28181无多方通话,所以无此情况
EXOSIP_CALL_NOANSWERannounce no answer within the timeoutNONE(INVITE)Event向下级平台发送的INVITE请求 无响应
EXOSIP_CALL_PROCEEDINGannounce processing by a remote appINVITEResponse向下级平台发送的INVITE请求 1xx 响应
EXOSIP_CALL_RINGINGannounce ringbackINVITEResponse向下级平台发送的INVITE请求 INVITE 1xx 响应
EXOSIP_CALL_ANSWEREDannounce start of callINVITEResponse向下级平台发送的INVITE请求 INVITE 2xx 响应
EXOSIP_CALL_REDIRECTEDannounce a redirectionINVITEResponse向下级平台发送的INVITE请求 INVITE 3xx 响应
EXOSIP_CALL_REQUESTFAILUREannounce a request failureINVITEResponse向下级平台发送的INVITE请求 INVITE 4xx 响应
EXOSIP_CALL_SERVERFAILUREannounce a server failureINVITEResponse向下级平台发送的INVITE请求 INVITE 5xx 响应
EXOSIP_CALL_GLOBALFAILUREannounce a global failureINVITEResponse向下级平台发送的INVITE请求 INVITE 6xx 响应
EXOSIP_CALL_ACKACK received for 200ok to INVITEACKRequest收到下级平台发送的ACK请求
EXOSIP_CALL_CANCELLEDannounce that call has been cancelledNONEEventGB28181无多方通话,所以无此情况
EXOSIP_CALL_MESSAGE_NEWannounce new incoming request.MESSAGE,BYE,…Request收到上级发送的MESSAGE消息(会话中)
EXOSIP_CALL_MESSAGE_PROCEEDINGannounce a 1xx for request.MESSAGEResponse向下级平台发送的MESSAGE请求(会话中) 1xx 响应
EXOSIP_CALL_MESSAGE_ANSWEREDannounce a 200okMESSAGEResponse向下级平台发送的MESSAGE请求(会话中) 2xx 响应
EXOSIP_CALL_MESSAGE_REDIRECTEDannounce a failure.MESSAGEResponse向下级平台发送的MESSAGE请求(会话中) 3xx 响应
EXOSIP_CALL_MESSAGE_REQUESTFAILUREannounce a failure.MESSAGEResponse向下级平台发送的MESSAGE请求(会话中) 4xx 响应
EXOSIP_CALL_MESSAGE_SERVERFAILUREannounce a failure.MESSAGEResponse向下级平台发送的MESSAGE请求(会话中) 5xx 响应
EXOSIP_CALL_MESSAGE_GLOBALFAILUREannounce a failure.MESSAGEResponse向下级平台发送的MESSAGE请求(会话中) 6xx 响应
EXOSIP_CALL_CLOSEDa BYE was received for this callBYERequest收到上级或者下级发送的BYE请求
EXOSIP_CALL_RELEASEDcall context is cleared.NONEEvent会话释放
EXOSIP_MESSAGE_NEWannounce new incoming request.MESSAGE,REGISTER,NOTIFYRequest收到上级或者下级发送的MESSAGE消息
EXOSIP_MESSAGE_PROCEEDINGannounce a 1xx for request.MESSAGEResponse向上级或者下级发送的MESSAGE请求 1xx 响应
EXOSIP_MESSAGE_ANSWEREDannounce a 200okMESSAGEResponse向上级或者下级发送的MESSAGE请求 2xx 响应
EXOSIP_MESSAGE_REDIRECTEDannounce a failure.MESSAGEResponse向上级或者下级发送的MESSAGE请求 3xx 响应
EXOSIP_MESSAGE_REQUESTFAILUREannounce a failure.MESSAGEResponse向上级或者下级发送的MESSAGE请求 4xx 响应
EXOSIP_MESSAGE_SERVERFAILUREannounce a failure.MESSAGEResponse向上级或者下级发送的MESSAGE请求 5xx 响应
EXOSIP_MESSAGE_GLOBALFAILUREannounce a failure.MESSAGEResponse向上级或者下级发送的MESSAGE请求 6xx 响应
EXOSIP_SUBSCRIPTION_NOANSWERannounce no answerNONE(SUBSCRIPTION)Event向下级平台发送的SUBSCRIBE/REFER请求 无响应
EXOSIP_SUBSCRIPTION_PROCEEDINGannounce a 1xxSUBSCRIPTIONResponse向下级平台发送的SUBSCRIBE/REFER请求 1xx 响应
EXOSIP_SUBSCRIPTION_ANSWEREDannounce a 200okSUBSCRIPTIONResponse向下级平台发送的SUBSCRIBE/REFER请求 2xx 响应
EXOSIP_SUBSCRIPTION_REDIRECTEDannounce a redirectionSUBSCRIPTIONResponse向下级平台发送的SUBSCRIBE/REFER请求 3xx 响应
EXOSIP_SUBSCRIPTION_REQUESTFAILUREannounce a request failureSUBSCRIPTIONResponse向下级平台发送的SUBSCRIBE/REFER请求 4xx 响应
EXOSIP_SUBSCRIPTION_SERVERFAILUREannounce a server failureSUBSCRIPTIONResponse向下级平台发送的SUBSCRIBE/REFER请求 5xx 响应
EXOSIP_SUBSCRIPTION_GLOBALFAILUREannounce a global failureSUBSCRIPTIONResponse向下级平台发送的SUBSCRIBE/REFER请求 6xx 响应
EXOSIP_SUBSCRIPTION_NOTIFYannounce new NOTIFY requestNOTIFYRequest收到下级平台发送的NOTIFY请求
EXOSIP_IN_SUBSCRIPTION_NEWannounce new incoming SUBSCRIBE/REFER.SUBSCRIBERequest收到上级平台发送的SUBSCRIBE/REFER请求
EXOSIP_NOTIFICATION_NOANSWERannounce no answerNONE(NOTIFY)Event向上级平台发送的Notify请求 无响应
EXOSIP_NOTIFICATION_PROCEEDINGannounce a 1xxNOTIFYResponse向上级平台发送的Notify请求 1xx 响应
EXOSIP_NOTIFICATION_ANSWEREDannounce a 200okNOTIFYResponse向上级平台发送的Notify请求 2xx 响应
EXOSIP_NOTIFICATION_REDIRECTEDannounce a redirectionNOTIFYResponse向上级平台发送的Notify请求 3xx 响应
EXOSIP_NOTIFICATION_REQUESTFAILUREannounce a request failureNOTIFYResponse向上级平台发送的Notify请求 4xx 响应
EXOSIP_NOTIFICATION_SERVERFAILUREannounce a server failureNOTIFYResponse向上级平台发送的Notify请求 5xx 响应
EXOSIP_NOTIFICATION_GLOBALFAILUREannounce a global failureNOTIFYResponse向上级平台发送的Notify请求 6xx 响应
EXOSIP_EVENT_COUNTMAX number of eventsNONENone事件最大值

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 当前的状态原因 */
  };
 类似资料: