; ******************************************************************************************************************************** ; Created: 7-May-2010 13:18:21 by OpenVMS SDL EV2-3 ; Source: 07-MAY-2010 13:11:55 SYS$SYSDEVICE:[SIP-R-R]SIPDEF.SDL;17 ; ******************************************************************************************************************************** .MACRO $SIPDEF,$GBL $DEFINI SIP,$GBL ; ++ ; ; Facility: ; Session Initation Protocol ; ; Abstract: ; This is an interface module contains data structures definitions, ; constants, functions/procedures prototypes. ; ; Author: ; Ruslan R. Laishev ; ; Creation Date: 26-APR-2009 ; ; Modification History: ; 3-MAR-2010 RRL Removed 'line' field from the SIP FLD aggregate. ; 4-MAR-2010 RRL Added IPS and IDS options into the 'conf' aggregate. ; 7-MAY-2010 RRL Added 'bot' field into the 'path' structure. ; ; ; -- $EQU SIP$PORT_sip 5060 $EQU SIP$PORT_sips 5061 $EQU SIP$K_MAXTHDS 32 ; ; ; $EQU SIP$FA_OFF -2147483648 $EQU SIP$FA_ON 2147483647 ; ; SIP Methods/request code ; $EQU sip$mt_status 0 ; SIP/2.0 200 OK $EQU sip$mt_invite 1 $EQU sip$mt_reinvite 2 $EQU sip$mt_register 3 $EQU sip$mt_ack 4 $EQU sip$mt_cancel 5 $EQU sip$mt_bye 6 $EQU sip$mt_options 7 $EQU sip$mt_info 8 $EQU sip$mt_notify 9 $EQU sip$mt_subscribe 10 $EQU sip$mt_unsubscribe 11 $EQU sip$mt_update 12 $EQU sip$mt_message 13 $EQU sip$mt_refer 14 $EQU sip$mt_pack 15 $EQU sip$mt_publish 16 ; ; UAS/UAC allow methods ; $EQU sip$m_status <^X1> $EQU sip$m_invite <^X2> $EQU sip$m_reinvite <^X4> $EQU sip$m_register <^X8> $EQU sip$m_ack <^X10> $EQU sip$m_cancel <^X20> $EQU sip$m_bye <^X40> $EQU sip$m_options <^X80> $EQU sip$m_info <^X100> $EQU sip$m_notify <^X200> $EQU sip$m_subscribe <^X400> $EQU sip$m_unsubscribe <^X800> $EQU sip$m_update <^X1000> $EQU sip$m_message <^X2000> $EQU sip$m_refer <^X4000> $EQU sip$m_pack <^X8000> $EQU sip$m_publish <^X10000> $EQU sip$S_allow 4 $EQU sip$l_allow 0 $EQU sip$v_status 0 $EQU sip$v_invite 1 $EQU sip$v_reinvite 2 $EQU sip$v_register 3 $EQU sip$v_ack 4 $EQU sip$v_cancel 5 $EQU sip$v_bye 6 $EQU sip$v_options 7 $EQU sip$v_info 8 $EQU sip$v_notify 9 $EQU sip$v_subscribe 10 $EQU sip$v_unsubscribe 11 $EQU sip$v_update 12 $EQU sip$v_message 13 $EQU sip$v_refer 14 $EQU sip$v_pack 15 $EQU sip$v_publish 16 ; ; SIP Message fields code ; $EQU SIP$FLD_undef 0 $EQU SIP$FLD_via 1 $EQU SIP$FLD_contact 2 $EQU SIP$FLD_to 3 $EQU SIP$FLD_from 4 $EQU SIP$FLD_cseq 5 $EQU SIP$FLD_expires 6 $EQU SIP$FLD_allow 7 $EQU SIP$FLD_useragent 8 $EQU SIP$FLD_maxforwd 9 $EQU SIP$FLD_contlen 10 $EQU SIP$FLD_callid 11 $EQU SIP$FLD_encoding 12 $EQU SIP$FLD_supported 13 $EQU SIP$FLD_subject 14 $EQU SIP$FLD_event 15 $EQU SIP$FLD_callinfo 16 $EQU SIP$FLD_type 17 $EQU SIP$FLD_wwwauth 18 $EQU SIP$FLD_authorization 19 $EQU SIP$FLD_accept 20 $EQU SIP$FLD_substate 21 ; Subscription-State: $EQU SIP$FLD_pxyauth 22 ; Proxy-Authenticate $EQU SIP$FLD_server 23 ; Server ; ; SIP Message fields parameters/arguments code ; $EQU SIP$ARG_undef 0 $EQU SIP$ARG_branch 1 $EQU SIP$ARG_rport 2 $EQU SIP$ARG_rinstance 3 $EQU SIP$ARG_TAG 4 $EQU SIP$ARG_digest 5 $EQU SIP$ARG_username 6 $EQU SIP$ARG_realm 7 $EQU SIP$ARG_nonce 8 $EQU SIP$ARG_uri 9 $EQU SIP$ARG_response 10 $EQU SIP$ARG_cnonce 11 $EQU SIP$ARG_nc 12 $EQU SIP$ARG_qop 13 $EQU SIP$ARG_algorithm 14 $EQU SIP$ARG_expires 15 $EQU SIP$ARG_received 16 $EQU SIP$ARG_active 17 $EQU SIP$ARG_transport 18 $EQU SIP$ARG_line 19 ; ; Status classes ; $EQU SIP$RC_info 100 $EQU SIP$RC_suc 200 $EQU SIP$RC_add 300 $EQU SIP$RC_err 400 $EQU SIP$RC_interr 500 $EQU SIP$RC_fat 600 $EQU SIP$RC_Trying 100 $EQU SIP$RC_Ringing 180 $EQU SIP$RC_Forwarded 181 $EQU SIP$RC_Queued 182 $EQU SIP$RC_Progress 183 $EQU SIP$RC_OK 200 $EQU SIP$RC_Accepted 202 $EQU SIP$RC_MChoices 300 $EQU SIP$RC_MovedPerm 301 $EQU SIP$RC_MovedTemp 302 $EQU SIP$RC_UseProxy 305 $EQU SIP$RC_AltService 380 $EQU SIP$RC_BadReq 400 $EQU SIP$RC_Unauthorized 401 $EQU SIP$RC_PayReqrd 402 $EQU SIP$RC_Forbidden 403 $EQU SIP$RC_NotFound 404 $EQU SIP$RC_MethodNotAlwd 405 $EQU SIP$RC_NotAccept 406 $EQU SIP$RC_ProxyAuth 407 $EQU SIP$RC_Timeout 408 $EQU SIP$RC_Conflict 409 $EQU SIP$RC_Gone 410 $EQU SIP$RC_LenReq 411 $EQU SIP$RC_ReqTooL 413 $EQU SIP$RC_URITooL 414 $EQU SIP$RC_UnsuppMedia 415 $EQU SIP$RC_UnsuppURI 416 $EQU SIP$RC_BadExt 420 $EQU SIP$RC_ExtReq 421 $EQU SIP$RC_TooBrief 423 $EQU SIP$RC_TempUnav 480 $EQU SIP$RC_CTxNotExist 481 $EQU SIP$RC_Loop 482 $EQU SIP$RC_TooMHops 483 $EQU SIP$RC_AddrInc 484 $EQU SIP$RC_Ambig 485 $EQU SIP$RC_Busy 486 $EQU SIP$RC_ReqTermtd 487 $EQU SIP$RC_NotAccpt 488 $EQU SIP$RC_EVNOTSUP 489 ; Event Package Not Supported $EQU SIP$RC_Pending 491 $EQU SIP$RC_Undeciph 493 $EQU SIP$RC_SIE 500 $EQU SIP$RC_NotImpl 501 $EQU SIP$RC_BadGatwy 502 $EQU SIP$RC_ServUnav 503 $EQU SIP$RC_ServTmo 504 $EQU SIP$RC_UnsuppVer 505 $EQU SIP$RC_MsgTooL 513 $EQU SIP$RC_BusyEveryW 600 $EQU SIP$RC_Declined 603 $EQU SIP$RC_NotExistEveryW 604 $EQU SIP$RC_NotAccept 605 ; ; Queue/Double Linked list ; $EQU que_S_que 12 $EQU que_a_flink 0 $EQU que_a_blink 4 $EQU asc_S_asc 256 ; next ADDRESS (asc); $EQU asc_b_asc 0 $EQU asc_S_asc 255 $EQU asc_t_asc 1 $EQU node_S_node 16 $EQU node_r_links 0 $EQU node_S_u_ 4 $EQU node_r_u_ 12 $EQU node_a_ptr 12 $EQU node_a_reg 12 $EQU adr_S_adr 40 $EQU adr_a_next 0 $EQU adr_S_adr 32 $EQU adr_q_adr 8 ; ; SIP Message fields arguments ; $EQU arg_m_domain <^X1> $EQU arg_m_proxy <^X2> $EQU arg_m_pass <^X4> $EQU arg_S_arg 524 $EQU arg_a_next 0 $EQU arg_l_flags 4 $EQU arg_S_domain 1 $EQU arg_v_domain 0 $EQU arg_S_proxy 1 $EQU arg_v_proxy 1 $EQU arg_S_pass 1 $EQU arg_v_pass 2 $EQU arg_l_code 8 ; An argument code $EQU arg_S_name 256 $EQU arg_r_name 12 $EQU arg_b_name 12 $EQU arg_S_name 255 $EQU arg_t_name 13 ; A field's data $EQU arg_S_val_ 256 $EQU arg_r_val_ 268 $EQU arg_l_val 268 $EQU arg_S_val 256 $EQU arg_r_val 268 $EQU arg_b_len 268 $EQU arg_S_val 255 $EQU arg_t_val 269 ; ; A SIP control information in the request ; $EQU fld_S_fld 528 $EQU fld_a_next 0 $EQU fld_l_code 4 ; A field code $EQU fld_S_name 256 $EQU fld_r_name 8 $EQU fld_b_name 8 $EQU fld_S_name 255 $EQU fld_t_name 9 ; A field's data $EQU fld_S_val_ 256 $EQU fld_r_val_ 264 $EQU fld_S_val 256 $EQU fld_r_val 264 $EQU fld_b_len 264 $EQU fld_S_val 255 $EQU fld_t_val 265 $EQU fld_l_args 520 $EQU fld_a_args 524 ; ; SIP message state ; $EQU SIP$RC_RECEIVED 100 $EQU SIP$RC_TOBESENT 200 $EQU SIP$RC_COMPLETED 300 $EQU SIP$RC_RETRYING 400 ; ; SIP message ; $EQU msg_S_msg 360 $EQU msg_r_next 0 ; A Link to the next in queue $EQU msg_l_id 12 ; A message id/number ; Source port & host $EQU msg_S_src 32 $EQU msg_q_src 16 ; Destination adress list $EQU msg_S_dst 32 $EQU msg_q_dst 48 $EQU msg_l_code 80 ; See sip_type sonstants $EQU msg_l_state 84 ; A processing state $EQU msg_l_status 88 ; A processing status (return code), see sip_rc constants $EQU msg_S_val_ 256 $EQU msg_r_val_ 92 $EQU msg_S_val 256 $EQU msg_r_val 92 $EQU msg_b_len 92 $EQU msg_S_val 255 $EQU msg_t_val 93 $EQU msg_a_flds 348 $EQU msg_l_bodylen 352 $EQU msg_a_body 356 $EQU itm_S_itm 8 $EQU itm_l_code 0 $EQU itm_S_u_ 4 $EQU itm_r_u_ 4 $EQU itm_a_fld 4 $EQU itm_a_arg 4 ; ; Registry record ; $EQU reg_sip_ksz 256 $EQU reg_m_active <^X1> $EQU reg_S_reg 568 $EQU reg_r_to 0 $EQU reg_l_flags 256 $EQU reg_S_active 1 $EQU reg_v_active 0 ; Source port & host $EQU reg_S_src 32 $EQU reg_q_src 264 $EQU reg_r_contact 296 ; sip: ; im: ; mailto: $EQU reg_S_expires 8 $EQU reg_q_expires 552 ; Current time + Expires $EQU reg_r_allow 560 ; Contact's allow methods/requests ; ; SIP Server configuration vector ; $EQU mque_S_mque 272 $EQU mque_a_flink 0 $EQU mque_a_blink 4 $EQU mque_S_cnd 128 $EQU mque_q_cnd 16 $EQU mque_S_mtx 128 $EQU mque_q_mtx 144 ; ; ; $EQU realm_m_domain <^X1> $EQU realm_m_proxy <^X2> $EQU realm_m_pass <^X4> $EQU realm_S_realm 552 $EQU realm_a_next 0 $EQU realm_l_flags 4 $EQU realm_S_domain 1 $EQU realm_v_domain 0 $EQU realm_S_proxy 1 $EQU realm_v_proxy 1 $EQU realm_S_pass 1 $EQU realm_v_pass 2 $EQU realm_r_realm 8 ; Realm name $EQU realm_r_via 264 ; Via - host & port information ; struct sockaddr_in $EQU realm_S_dst 32 $EQU realm_q_dst 520 ; ; ; $EQU path_m_domain <^X1> $EQU path_m_wild <^X2> $EQU path_m_regex <^X4> $EQU path_m_bot <^X8> $EQU path_S_path 808 $EQU path_a_next 0 $EQU path_l_flags 4 $EQU path_S_domain 1 $EQU path_v_domain 0 $EQU path_S_wild 1 $EQU path_v_wild 1 $EQU path_S_regex 1 $EQU path_v_regex 2 $EQU path_S_bot 1 $EQU path_v_bot 3 $EQU path_r_path 8 ; Path pattern $EQU path_S_regex 255 $EQU path_b_regex 264 $EQU path_r_via 519 ; Via - host & port information ; struct sockaddr_in $EQU path_S_dst 32 $EQU path_q_dst 776 ; ; ; $EQU conf_m_dbg <^X1> $EQU conf_m_ips <^X2> $EQU conf_m_ids <^X4> $EQU conf_S_conf 1092 $EQU conf_l_flags 0 $EQU conf_S_dbg 1 $EQU conf_v_dbg 0 ; DEBUG $EQU conf_S_ips 1 $EQU conf_v_ips 1 ; Intrusion Detection $EQU conf_S_ids 1 $EQU conf_v_ids 2 ; Intrusion Prevention $EQU conf_l_msgid 4 $EQU conf_a_realm 8 $EQU conf_a_path 12 $EQU conf_r_host 16 $EQU conf_a_srvid 272 $EQU conf_r_outq 276 ; Outgoing messages queue $EQU conf_r_inq 548 ; Received messages queue $EQU conf_r_lcl 820 ; Localy processed messages ; ; Delayed Message Queue record structure ; $EQU im_user_pos 0 $EQU im_user_ksz 32 $EQU im_time_pos 40 $EQU im_time_ksz 8 $EQU im_S_im 42 $EQU im_S_user 32 $EQU im_r_user 0 ; Recipient UserName $EQU im_b_len 0 $EQU im_S_user 31 $EQU im_t_user 1 $EQU im_S_time 8 $EQU im_q_time 32 ; IM time $EQU im_w_bodylen 40 $EQU im_t_body 42 $DEFEND SIP,$GBL,DEF .ENDM