Monthly Archives: January 2014

Tools for a Telecom software Engineer

evernote    desktop

  • Evernote for notekeeping
  • Eclipse to do real programming

github  mysql

  • Github to upload download code
  • MySQL  workbench to take care of Database Management

 

 

Technologies to Work with

 wenrtc players icon

  •  IETF
  • W3C
  • WebRTC
  • HTML
  • Java
  • GSMS standards

 

 

 

tools

Frameworks

frameworks

  • Struts
  • Hibernate
  • Spring
  • EJB

 

SIP Messages Explanied

1. Request Message

Request Message

Description

REGISTER A Client use this message to register an address with a SIP server
INVITE A User or Service use this message to let another user/service participate in a session. The body of this message would include a description of the session to which the callee is being invited.
ACK This is used only for INVITE indicating that the client has received a final response to an INVITE request
CANCEL This is used to cancel a pending request
BYE A User Agent Client use this message to terminate the call
OPTIONS This is used to query a server about its capabilities

2. Response Message

Code

Category

Description

1xx Provisional The request has been received and processing is continuing
2xx Success An ACK, to indicate that the action was successfully received, understood, and accepted.
3xx Redirection Further action is required to process this request
4xx Client Error The request contains bad syntax and cannot be fulfilled at this server
5xx Server Error The server failed to fulfill an apparently valid request
6xx Global Failure The request cannot be fulfilled at any server

, based on RFC 3261


SIP headers :

Display names are described in RFC 2822
From also contains a display name and a SIP URI that indicate the originator of the request.  The From also contains a tag parameter which is used for identification purposes.
Call-ID contains a globally unique identifier for this call. Mandatory
CSeq or Command Sequence contains an integer and a method name. The CSeq number is incremented for each new request within a dialog and is a traditional sequence number.
Contact contains a SIP URI that represents a direct route to the originator usually composed of a username at a fully qualified domain name (FQDN). While an FQDN is preferred, many end systems do not have registered domain names, so IP addresses are permitted.  The Contact header field tells other elements where to send future requests.
Max-Forwards serves to limit the number of hops a request can make on the way to its destination. It consists of an integer that is decremented by one at each hop.
Content-Type contains a description of the message body.
Content-Length contains an octet (byte) count of the message body.
sip headers 1 sip headers 2 sip headers 3

Mandatory SIP headers

  • INVITE sip:altanai@domain.comSIP/2.0
  • Via: SIP/2.0/UDP host.domain.com:5060
  • From: Bob <sip:bob@domain.com>
  • To: Altanai <sip:domain@wcom.com>
  • Call-ID: 163784@host.domain.com
  • CSeq: 1 INVITE

session description in SDP

sdp

  • v=  (protocol version)  Mandatory
  • o=  (owner/creator and session identifier).   Mandatory
  • s=  (session name)   Mandatory
  • t=  (time the session is active)   Mandatory
  • i=* (session information)
  • u=* (URI of description)
  • e=* (email address)
  • p=* (phone number)
  • c=* (connection information – not required if included in all media)
  • b=* (bandwidth information)
  • z=* (time zone adjustments)
  • k=* (encryption key)
  • a=* (zero or more session attribute lines)
  • r=* (zero or more repeat times)Media description
  • m=  (media name and transport address)  Mandatory
  • i=* (media title)

TYPICAL SIP INVITE :


INVITE sip:01150259917040@67.135.76.4 SIP/2.0

Via: SIP/2.0/UDP 69.7.163.154:5060;branch=z9hG4bK400fc6e6

From: "8069664170" <sip:8069664170@69.7.163.154>;tag=as42e2ecf6

To: <sip:01150259917040@67.135.76.4>

Contact: <sip:8069664170@69.7.163.154>

Call-ID: 2485823e63b290b47c042f20764d990a@69.7.163.154

CSeq: 102 INVITE

User-Agent: MatrixSwitch

Date: Thu, 22 Dec 2005 18:38:28 GMT

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER

Content-Type: application/sdp

Content-Length: 268

v=0

o=root 14040 14040 IN IP4 69.7.163.154

s=session

c=IN IP4 69.7.163.154

t=0 0

m=audio 26784 RTP/AVP 0 8 18 101

a=rtpmap:0 PCMU/8000

a=rtpmap:8 PCMA/8000

a=rtpmap:18 G729/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=fmtp:18 annexb=no - - - -

c=* (connection information - optional if included at session-level)

b=* (bandwidth information)

a=* (zero or more media attribute lines)

SIP Responses

sip resp

1xx—Provisional Responses
100 Trying
180 Ringing
181 Call is Being Forwarde
182 Queued
183 Session in Progress199 Early Dialog Terminated

2xx—Successful Responses
200 OK
202 Accepted
204 No Notification

3xx—Redirection Responses
300 Multiple Choices
301 Moved Permanently
302 Moved Temporarily
305 Use Proxy
380 Alternative Service

4xx—Client Failure Responses
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
409 Conflict
410 Gone
411 Length Required
412 Conditional Request Failed
413 Request Entity Too Large
414 Request-URI Too Long
415 Unsupported Media Type
416 Unsupported URI Scheme
417 Unknown Resource-Priority
420 Bad Extension
421 Extension Required
422 Session Interval Too Small
423 Interval Too Brief
424 Bad Location Information
428 Use Identity Header
429 Provide Referrer Identity
430 Flow Failed
433 Anonymity Disallowed
436 Bad Identity-Info
437 Unsupported Certificate
438 Invalid Identity Header
439 First Hop Lacks Outbound Support
470 Consent Needed
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
489 Bad Event
491 Request Pending
493 Undecipherable
494 Security Agreement Required

5xx—Server Failure Responses
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
580 Precondition Failure

6xx—Global Failure Responses
600 Busy Everywhere
603 Decline
604 Does Not Exist Anywhere
606 Not Acceptable

Mandatory Headers in SIP Response 
  • SIP/2.0 200 OK
  • Via: SIP/2.0/UDP host.domain.com:5060
  • From: Bob<sip:bob@domain.com>
  • To: Altanai<sip:altanai@domain.com>
  • Call-ID: 163784@host.domain.com
  • CSeq: 1 INVITE
Note : – 

Via, From, To, Call-ID 

, and  

CSeq  

are copied exactly from Request. 
You can read more about SIP based Architecture here : SIP based architecture