1.1.1. Route/record-route
? Record-route can be used:
-Ensures firewall proxy stays in Path
? A firewall proxy adds record-Route Header
-Clients and servers copy record-route and put in Route Header for all messages
Request Routing
Example: only proxy 3 remains in route
1. ua1 is being ucted to invite "SIP: ua2 @ proxy1"
2. The message shocould be sent to proxy 1
3. The message shocould be sent to proxy 2
4. The message shocould be sent to proxy 3
5. The message shoshould be sent to ua2.
6. ua2 sends a "200 OK", which shoshould be sent back to ua1, through all three proxies.
7. ua1 sends an ACK to proxy 3.
8. Proxy 3 sends the ACK to ua2.
9. ua2 sends a bye to proxy 3.
10. Proxy 3 sends the bye to ua1.
11. ua1 sends a 200 OK through proxy 3 to ua2.
1.1.1. Expires
The RFC is referring to a register request that has des an Expires parameter on the contact and one is a separate header field like this:
Contact: <SIP: foo@example.com>; expires = 1000
Contact: <SIP: bar@example.com>
Expires: 2000
For the above, the foo contact shocould expire after 1000 seconds, and the bar contact after 2000 seconds.
The test used the Contact Header:
Contact: <SIP: contact13@regtest.pingtel.com; expires = 1800>; expires = 2970
Which means something else entirely. the '; expires = 1800' inside the angle brackets is a part of the URI, not a field parameter of the contact field. the '; expires = 2970' outside is the field parameter, so it is correct to use it
The expiration time of the contact. The inner one is used by the proxy to control forking timeouts when this contact is used, and has nothing to do with the Registry expiration.
Broad Band
1.2. Basic Process
1.2.1. Main Process
The sip ip phone system defines four working processes: Registration/cancellation, call, redirection, and capability query.
Basic call signalling & routing
The process for establishing communication with SIP usually occurs in six steps:
? Step 1 registering, initiating and locating the user
? Step 2 determine the media to use (using SDP)
? Step 3 determine willingness of called Party to communicate
? Step 4 call setup
? Step 5 call modification or handling (optional)
? Step 6 call termination
Addressing: SIP gives a globally reachable address and callees 'bind' to this address using
Register Method. addresses are in a URL format such as SIP: user @ host. It must include
Host, and may include the user name, Port Number & other parameters (e.g. Transport).
Example SIP: bob@office.com or SIP: voicemail@siteA.com? Subject = returnmycall
Registration: each time a UA is enabled it creates an address mapping in the 'location Service'
Explicitly by sending a register request to the 'registrar '. The registrar reads & writes
Mappings to location service based on the contents of register requests.
Proxy & redirection: the proxy server acts as a rendezvous point at which all callees are
Globally reachable. It performs the routeing function I. e. to which hop (UA/Proxy/redirect)
Request is relayed to. The request may be forked whereby several destinations may be tried
Sequentially or in parallel. A proxy server can be 'stateful' when it keeps State during a transaction
And discards information about the transaction when it is complete. The redirection server differs
In that it only returns a mapped address back to the UA (I. e. Instructs the UA to initiate a request
Elsewhere). Unlike a proxy server it does not initiate its own SIP request. Unlike a UAS it does
Not accept or terminate CILS.
The call in the sip ip phone system is implemented through the three handshakes of the invite invitation request, successful response, and ACK confirmation request. That is, when the caller agent initiates a call, it constructs an INVITE message and sends it to the called call. After receiving the invitation, the called party decides to accept the call and returns a successful response (Status Code 200 ). After receiving a successful response, the caller sends an ACK request to the other party. After receiving the ACK request, the call is successfully established.
Call termination is implemented by bye request message. When either party is involved in the call to terminate the call, it constructs a bye request message and sends it to the other party. After receiving the bye request, the other party releases the resources related to the call and returns a successful response, indicating that the call has been terminated.
When both parties have established a call, if either party wants to modify the current communication parameters (Communication type, encoding, etc ), you can send an invite request message (re-invite) in a dialog box.
The proxy server is similar to the HTTP proxy and smtp mta (message transfer agent), a bit like a repeater. It does not respond to user requests, but only forwards user requests to the repeater, add its own address to the path header of the message to ensure that the response is returned based on the original path and the loop is prevented.
The SIP protocol supports three call methods:
L The user proxy service machine (UAC) directly calls the user Proxy Server (UAs)
L The proxy server on behalf of UAC initiates a call to the called party
L UAC redirects the call with the help of the redirection Server
(1) The SIP User Agent sends a call to the SIP proxy server to establish a request (invite ).
(2) The SIP proxy server sends a call establishment request to the redirection server.
(3) The redirection server returns the redirection message.
(4) The SIP proxy server sends a call to the specified sip proxy server to establish a request.
(5) The requested sip proxy server uses non-SIP protocol, such as domain name query or LDAP to locate the server to query the called location.
(6) locate the location (called sip Proxy Server) returned by the server ).
(7) The requested sip proxy server sends a call to the called sip proxy server to establish a request.
(8) The called sip proxy server sends a call to the SIP User proxy (called) to create a request (called or displayed ).
(9) The called user proxy sends consent or rejection to the called SIP User proxy server.
(10) The called user proxy server sends consent or rejection to the proxy server requested by the caller proxy server.
(11) The proxy server requested by the caller proxy server sends consent or rejection to the caller proxy server.
(12) The Calling Proxy Server instructs the calling user agent to determine whether the called User agrees to the call request.
After the call is established, both parties communicate with each other based on the media and compression algorithms obtained through negotiation. The call removal process is similar to the creation process.
1.1.1. Registration/Cancellation
The register function is used in a SIP System primarily to associate a temporary contact address with an address-of-record. this contact is generally in the form of a URI, such as contact: <SIP: alice@pc33.atlanta.com> and is generally
Dynamic and associated with the IP address or hostname of the sip ua.
SIP defines the registration and cancellation processes for users. Its purpose is to dynamically establish the correspondence between users' logical addresses and their current contact addresses, call routing and user mobility are supported by the customer. The separation of the logical address and the contact address also facilitates the user. It can communicate with each other through a unique logical address no matter where the device is located or used.
The registration/logout process is implemented through the Register message and the 200 successful response. During registration/cancellation, the user sends the logical address and current contact address to the registration server through the Register message, and the registration server processes the request message, then, a 200 success response message is sent to notify the user of successful registration/cancellation.
The registration server is the server that accepts the register request. It aims to update the location database based on the contact information specified in the request.
SIP uses an e-mail address to indicate the user address. Each user is identified by a hierarchical URL, which is constructed by elements such as the user's phone number or host name (for example, SIP: user@company.com ). Because of its similarity with the e-mail address, SIP URLs is easily associated with the user's e-mail address.
Third-party registration: In this case, the addresses in the from domain and to domain will be different. If user a is registered as proxy user B, user a's account will be entered in the from domain; the account of user B is entered in the to domain.
Register for updates: the call-ID parameter in the re-initiated register message before the timeout does not change, and the CSeq parameter increases.
User's address bob@office.com is bound to user's current location 197.63.48.169.
Registration Request
Registration response
1.1.1. Direct call
The user proxy service machine (UAC) directly calls the user Proxy Server (UAs.
Example 1
Example 2
Alice Bob
|
| Invite F1 |
| -----------------------> |
| 180 ringing F2 |
| <----------------------- |
|
| 200 OK F3 |
| <----------------------- |
| ACK F4 |
| -----------------------> |
| Both way RTP media |
| <===============================> |
|
| Bye F5 |
| <----------------------- |
| 200 OK F6 |
| -----------------------> |
|
F1 invite Alice-> Bob
Invite SIP: bob@biloxi.example.com Sip/2.0
Via: SIP/2.0/tcp client.atlanta ta.example.com: 5060; branch = z9hg4bk74bf9
Max-forwards: 70
From: Alice <SIP: alice@atlanta.example.com>; tag = 9fxced76sl
To: Bob <SIP: bob@biloxi.example.com>
Call-ID: 3848276298220188511@atlanta.example.com
CSeq: 1 invite
Contact: <SIP: alice@client.atlanta.example.com; Transport = TCP>
Content-Type: Application/SDP
Content-Length: 151
V = 0
O = Alice 2890844526 2890844526 in ip4 client.atlanta ta.example.com S =-
C = in ip4 192.0.2.101
T = 0 0
M = audio49172 RTP/AVP 0
A = rtpmap: 0 PCMU/8000
F2 180 ringing Bob-> Alice
Sip/2.0 180 ringing
Via: SIP/2.0/tcp client.atlanta ta.example.com: 5060; branch = z9hg4bk74bf9; received = 192.0.2.101
From: Alice <SIP: alice@atlanta.example.com>; tag = 9fxced76sl
To: Bob <SIP: bob@biloxi.example.com>; tag = 8321234356
Call-ID: 3848276298220188511@atlanta.example.com
CSeq: 1 invite
Contact: <SIP: bob@client.biloxi.example.com; Transport = TCP>
Content-Length: 0
F3 200 OK Bob-> Alice
Sip/2.0 200 OK
Via: SIP/2.0/tcp client.atlanta ta.example.com: 5060; branch = z9hg4bk74bf9; received = 192.0.2.101
From: Alice <SIP: alice@atlanta.example.com>; tag = 9fxced76sl
To: Bob <SIP: bob@biloxi.example.com>; tag = 8321234356
Call-ID: 3848276298220188511@atlanta.example.com
CSeq: 1 invite
Contact: <SIP: bob@client.biloxi.example.com; Transport = TCP>
Content-Type: Application/SDP
Content-Length: 147
V = 0
O = Bob 2890844527 2890844527 in ip4 client.biloxi.example.com S =-
C = in ip4 192.0.2.201
T = 0 0
M = audio3456 RTP/AVP 0
......
F4 ack Alice-> Bob
Ack SIP: bob@client.biloxi.example.com Sip/2.0
Via: SIP/2.0/tcp client.atlanta ta.example.com: 5060; branch = z9hg4bk74bd5
Max-forwards: 70
From: Alice <SIP: alice@atlanta.example.com>; tag = 9fxced76sl
To: Bob <SIP: bob@biloxi.example.com>; tag = 8321234356
Call-ID: 3848276298220188511@atlanta.example.com
CSeq: 1 ack
Content-Length: 0
/* RTP streams are established between Alice and Bob */
/* Bob hangs up with Alice. Note that the CSeq is not 2, since
Alice and Bob maintain their own independent CSeq counts.
(The invite was request 1 generated by Alice, and the bye is
Request 1 generated by Bob )*/
F5 bye Bob-> Alice
Bye SIP: alice@client.atlanta.example.com Sip/2.0
Via: SIP/2.0/tcp client.biloxi.example.com: 5060; branch = z9hg4bknashds7
Max-forwards: 70
From: Bob <SIP: bob@biloxi.example.com>; tag = 8321234356
To: Alice <SIP: alice@atlanta.example.com>; tag = 9fxced76sl
Call-ID: 3848276298220188511@atlanta.example.com
CSeq: 1 bye
Content-Length: 0
F6 200 OK Alice-> Bob
Sip/2.0 200 OK
Via: SIP/2.0/tcp client.biloxi.example.com: 5060; branch = z9hg4bknashds7; received = 192.0.2.201
From: Bob <SIP: bob@biloxi.example.com>; tag = 8321234356
To: Alice <SIP: alice@atlanta.example.com>; tag = 9fxced76sl
Call-ID: 3848276298220188511@atlanta.example.com
CSeq: 1 bye
Content-Length: 0