Hello SIP Protocol

 

SIP Request Line


Request-Line = Method SP Request-URI SP SIP-Version CRLF
Method:
        1. REGISTER for registering contact information.
        2. INVITE, ACK, and CANCEL for setting up sessions.
        3. BYE for terminating sessions.
        4. OPTIONS for querying servers about their capabilities.
Request-URI:
SIP-Version:
        1. HTTP        <----> SIP
        2. HTTP1.1    <----> SIP/2.0

SIP Response Line


Status-Line = SIP-Version SP Status-Code SP Reason-Phrase CRLF
Status-Code:
        1xx: Provisional -- request received, continuing to process the request;
            100 Trying
            180 Ringing
            181 Call Is Being Forwarded
            182 Queued
            183 Session Progress
        2xx: Success -- the action was successfully received, understood,and accepted;
            200 OK
        3xx: Redirection -- further action needs to be taken in order to complete the request;
            300 Multiple Choices
            301 Moved Permanently
            302 Moved Temporarily
            305 Use Proxy
            380 Alternative Service
        4xx: Client Error -- the request contains bad syntax or cannot be fulfilled at this server;
            400 Bad Request
            401 Unauthorized
            402 Payment Required
            403 Forbidden
            404 Not Found
            405 Method Not Allowed
            406 Not Acceptable
            407 Proxy Authentication Required
            408 Request Timeout
            410 Gone
            413 Request Entity Too Large
            414 Request-URI Too Long
            415 Unsupported Media Type
            416 Unsupported URI Scheme
            420 Bad Extension
            421 Extension Required
            423 Interval Too Brief
            480 Temporarily Unavailable
            481 Call/Transaction Does Not Exist
            482 Loop Detected
            483 Too Many Hops
            484 Address Incomplete
            485 Ambiguous
            486 Busy Here
            487 Request Terminated
            488 Not Acceptable Here
            491 Request Pending
            493 Undecipherable
        5xx: Server Error -- the server failed to fulfill an apparently valid request;
            500 Server Internal Error
            501 Not Implemented
            502 Bad Gateway
            503 Service Unavailable
            504 Server Time-out
            505 Version Not Supported
            513 Message Too Large
        6xx: Global Failure -- the request cannot be fulfilled at any server.
            600 Busy Everywhere
            603 Decline
            604 Does Not Exist Anywhere
            606 Not Acceptable

SIP Header Fileds


TO
        To: Carol <sip:carol@chicago.com>
From
        From: "Bob" <sips:bob@biloxi.com> ;tag=a48s
        From: sip:+12125551212@phone2net.com;tag=887s
        From: Anonymous <sip:c8oqz84zk7z@privacy.org>;tag=hyh8

Call-ID
        Call-ID: f81d4fae-7dec-11d0-a765-00a0c91e6bf6@foo.bar.com
CSeq
        CSeq: 4711 INVITE
Max-Forwards
Via
        Branch ID: MUST always begin with the characters "z9hG4bK"
Contact


SIP Methods


REGISTER
    UA <----> Proxy <----> Location Service

OPTIONS
    
DIALOG
  only 2xx and 101-199 responses with a To tag, where the request was INVITE, will establish a dialog.
  A dialog established by a non-final response to a request is in the "early" state and it is called an early dialog.

CANCEL

  

Others

  only INVIET has ACK.
  "an ACK for a non-2xx response will also have the same branch ID as the INVITE whose response it acknowledges", that means ACK with non-success response will be part of the INVITE transaction.
  It only has a separate branch ID for 2xx success response which then belongs to another transaction.
  

 Home-Based Routing (S8HR)

转载于:https://www.cnblogs.com/streamliu/p/7834058.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值