FEATURES 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. Features:
  2. ========
  3. oSIP is a not a complete SIP stack and will never implements
  4. all the specifications. Instead, the goal is to provide
  5. a limited set of features common to any kind of SIP Agents.
  6. Thus oSIP is not oriented towards any particular implementations
  7. and can be used for implementing SIP End-Point, Proxy
  8. or any kind of more specific SIP Agent such as B2BUA.
  9. The minimal common required features for any SIP Agent
  10. provided by osip are describe below.
  11. However, some extra facilities oriented towards SIP End-Points
  12. are provided.
  13. SIP parser:
  14. ==========
  15. The initial feature implemented in osip is a SIP parser. There
  16. is not much to say about it: it is capable of parsing and
  17. reformating SIP requests and answers.
  18. The details of the parsing tools available are listed below:
  19. 1 SIP request/answer
  20. 2 SIP uri
  21. 3 specific headers
  22. 4 Via
  23. 5 CSeq
  24. 6 Call-ID
  25. 7 To, From, Route, Record-Route...
  26. 8 Authentication related headers
  27. 9 Content related headers
  28. 10 Accept related headers
  29. 11 ...
  30. 12 Generic header
  31. 13 Attachement parser (should support mime)
  32. 14 SDP parser
  33. SIP transaction state machines:
  34. ==============================
  35. The interesting and somewhat complex feature implemented
  36. by osip is the 4 states machines that applied to the different
  37. transactions defined by the SIP rfc.
  38. SIP defines the following 4 state machines, abreviations
  39. used in osip are provided below:
  40. * ICT : Invite Client Transaction (Section 17.1.1)
  41. * NICT: Non Invite Client Transaction (Section 17.1.2)
  42. * IST : Invite Server Transaction (Section 17.2.1)
  43. * NIST: Non Invite Server Transaction (Section 17.2.2)
  44. As you can notice if you have read the rfc (do it!), those
  45. 4 state machines are provided as drawings within the SIP
  46. rfc3261.txt (section 17.1 and 17.2)
  47. As an exemple of what you'll find in the rfc3261, here is the
  48. drawing that apply to the "Invite Client Transaction" (page 127)
  49. |INVITE from TU
  50. Timer A fires |INVITE sent
  51. Reset A, V Timer B fires
  52. INVITE sent +-----------+ or Transport Err.
  53. +---------| |---------------+inform TU
  54. | | Calling | |
  55. +-------->| |-------------->|
  56. +-----------+ 2xx |
  57. | | 2xx to TU |
  58. | |1xx |
  59. 300-699 +---------------+ |1xx to TU |
  60. ACK sent | | |
  61. resp. to TU | 1xx V |
  62. | 1xx to TU -----------+ |
  63. | +---------| | |
  64. | | |Proceeding |-------------->|
  65. | +-------->| | 2xx |
  66. | +-----------+ 2xx to TU |
  67. | 300-699 | |
  68. | ACK sent, | |
  69. | resp. to TU| |
  70. | | | NOTE:
  71. | 300-699 V |
  72. | ACK sent +-----------+Transport Err. | transitions
  73. | +---------| |Inform TU | labeled with
  74. | | | Completed |-------------->| the event
  75. | +-------->| | | over the action
  76. | +-----------+ | to take
  77. | ^ | |
  78. | | | Timer D fires |
  79. +--------------+ | - |
  80. | |
  81. V |
  82. +-----------+ |
  83. | | |
  84. | Terminated|<--------------+
  85. | |
  86. +-----------+
  87. Figure 5: INVITE client transaction
  88. As you can expect, with osip an Invite Client Transaction may be
  89. in the CALLING, PROCEEDING, COMPLETED or TERMINATED state. To
  90. "execute" the state machine, you will build events, provide them
  91. to the correct transaction context and the the state of the
  92. transaction will be updated if the event is allowed in the current
  93. state.
  94. Events are divided in three categories:
  95. * SIP messages
  96. * Timers
  97. * transport errors
  98. Other features:
  99. ==============
  100. To ease development of SIP portable application, osip
  101. provide abstractions methods for threads, semaphore,
  102. and mutex.
  103. You still have the choice to compile osip without thread
  104. support which you may be required on some embedded platforms.
  105. Please report any porting issue to the mailing list <osip-dev@gnu.org>
  106. (subscribe first!) or directly to me <amoizard@antisip.com>.
  107. If you are building a new port, I'll certainly think about merging
  108. it.
  109. Other Facilities:
  110. ================
  111. oSIP also give small facilities which are completly optional.
  112. Among them, the dialog facility(osip_dialog.h), mainly to
  113. be used by SIP End-Points, is a stable extra feature. It will
  114. allow you to build a structure described in the rfc3261 (Section
  115. 12: Dialogs). Once built, you can reuse this information to match
  116. received requests with a particular SIP call or to build a new
  117. request within a particular SIP call.
  118. *** An old feature has been implemented in osip: a SDP negotiator.
  119. *** I advise you to not use this old facility which is not powerfull
  120. *** often uncompliant and not flexible enough. It's also quite
  121. *** unreadable and poorly written (by me!). I'll delete it anyway in
  122. *** future version of osip. I have warned you...
  123. ->>> UPDATE 27/11/2005: the SDP negotiator have been removed
  124. oSIP finaly contains a MD5 implementation (osip_md5.h) which
  125. you'll find usefull when implementing SIP Digest authentication.