⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.html

📁 关于OSIP协议栈开发的一个很有用的东东~~~
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>libosip: Main Page</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.3.8 --><div class="qindex"><a class="qindexHL" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div><h1>libosip Documentation</h1><p><h3 align="center">2.2.0 </h3>Project Website: <a href="http://www.fsf.org/software/osip">http://www.fsf.org/software/osip</a><p><div class="fragment"><pre>       Description:       =========== The GNU oSIP library is an implementation of SIP - rfc3261. Email      : jack@atosc.org License    : LGPL (http://www.gnu.org) Home Page  : http://www.fsf.org/software/osip/osip.html Download   : ftp://ftp.gnu.org/gnu/osip"The GNU oSIP library" is part of the "GNU project".You can check www.fsf.org for more information aboutbeing part of the "GNU project".For information, look at:   INSTALL   HISTORY   FEATURES       Links:       =====Latest version:       ftp://ftp.gnu.org/gnu/osipHome page:            http://www.fsf.org/software/osip/osip.htmlOnline Documentation: http://www.gnu.org/software/osip/       Supported Platforms:       ===================The library is known to compile on various platform:  *  GNU/Linux  *  MacOSX (Darwin)  *  OpenBsd 3.1/3.2  // (FreeBSD&amp;NetBSD should also work)  *  Windows NT/95/2000 (VC++6.0 or cygwin)  *  Solaris  *  HP-Unix.  *  VxWorks.  *  Some embedded systems with linux.  *  WinCE (report to be possible)For more informations about compilation, please look inthe ./help directory.       Test Programs:       =============The library contains some built-in test for the parser. To quickly testthe parser, type: (Note that some tests MUST fail!)  $&gt; make checkWatch out the ./src/test/CHECK file for more informations.       Contact Informations:       ====================For more information on the SIP stack, or any contributions,you can contact the author at &lt;jack@atosc.org&gt;.A Mailing list is available for support: &lt;osip@atosc.org&gt;.You can subscribe by writing to: &lt;osip-request@atosc.org&gt;with a subject set to "subscribe".</pre></div><p><div class="fragment"><pre>       History:       =======The oSIP stack project has been started in September 2000since the early days of the SIP protocol.The initial version was quite close to the actual one interms of features. The SIP parser and the SIP state machineswere already provided. At this point and till version 0.9.7,the API was not very clean but osip was already stable,portable, flexible and compliant with SIP.After rfc2543 were released, a lot of developments were madeto follow the drafts that were produced prior to the finalrelease of rfc3261. (around version 0.8.X).A lot of users were requesting help on the API and werereporting their difficulties to use it. I have decidedto refine osip into a new osip2 version which would offera simpler and nicer API. With a very few exception, onlythe API has been changed between 0.9.7 and 2.0.0. Fromthis version, osip has been much readable.However, oSIP is still complex to use. There are reasonsfor that. oSIP was made to be flexible (which make the APIquite large). oSIP is architecture free (but you need tounderstand how it works to use it correctly). oSIP isimplementing only low layers of SIP (so you still canbuild malformed messages, or uncompliant ones). oSIP willnot warn you about most errors that you can make.Be aware, that if you use osip, you still have to readcarefully the rfc. oSIP is not easy to use, but I'mconvinced there are benefits in terms of flexibility.If you find osip too complex to use, please look foranother adequate solution.</pre></div><p><div class="fragment"><pre>       Features:       ========oSIP is a not a complete SIP stack and will never implementsall the specifications. Instead, the goal is to providea limited set of features common to any kind of SIP Agents.Thus oSIP is not oriented towards any particular implementationsand can be used for implementing SIP End-Point, Proxyor any kind of more specific SIP Agent such as B2BUA.The minimal common required features for any SIP Agentprovided by osip are describe below.However, some extra facilities oriented towards SIP End-Pointsare provided. Some are considered usefull and stable such as thedialog management API. One features is particularly not flexiblesuch as the SDP negotiation facility and you should considerimplementing your own. If you still want        SIP parser:       ==========The initial feature implemented in osip is a SIP parser. Thereis not much to say about it: it is capable of parsing andreformating SIP requests and answers.The details of the parsing tools available are listed below: 1  SIP request/answer 2  SIP uri 3  specific headers 4  Via 5  CSeq 6  Call-ID 7  To, From, Route, Record-Route... 8  Authentication related headers 9  Content related headers 10 Accept related headers 11 ... 12 Generic header 13 Attachement parser (should support mime) 14 SDP parser       SIP transaction state machines:       ==============================The interesting and somewhat complex feature implementedby osip is the 4 states machines that applied to the differenttransactions defined by the SIP rfc.SIP defines the following 4 state machines, abreviationsused in osip are provided below:  * ICT : Invite Client Transaction (Section 17.1.1)   * NICT: Non Invite Client Transaction (Section 17.1.2)   * IST : Invite Server Transaction (Section 17.2.1)   * NIST: Non Invite Server Transaction (Section 17.2.2) As you can notice if you have read the rfc (do it!), those4 state machines are provided as drawings within the SIPrfc3261.txt (section 17.1 and 17.2)As an exemple of what you'll find in the rfc3261, here is thedrawing that apply to the "Invite Client Transaction" (page 127)                               |INVITE from TU             Timer A fires     |INVITE sent             Reset A,          V                      Timer B fires             INVITE sent +-----------+                or Transport Err.               +---------|           |---------------+inform TU               |         |  Calling  |               |               +--------&gt;|           |--------------&gt;|                         +-----------+ 2xx           |                            |  |       2xx to TU     |                            |  |1xx                  |    300-699 +---------------+  |1xx to TU            |   ACK sent |                  |                     |resp. to TU |  1xx             V                     |            |  1xx to TU  -----------+               |            |  +---------|           |               |            |  |         |Proceeding |--------------&gt;|            |  +--------&gt;|           | 2xx           |            |            +-----------+ 2xx to TU     |            |       300-699    |                     |            |       ACK sent,  |                     |            |       resp. to TU|                     |            |                  |                     |      NOTE:            |  300-699         V                     |            |  ACK sent  +-----------+Transport Err. |  transitions            |  +---------|           |Inform TU      |  labeled with            |  |         | Completed |--------------&gt;|  the event            |  +--------&gt;|           |               |  over the action            |            +-----------+               |  to take            |              ^   |                     |            |              |   | Timer D fires       |            +--------------+   | -                   |                               |                     |                               V                     |                         +-----------+               |                         |           |               |                         | Terminated|&lt;--------------+                         |           |                         +-----------+                 Figure 5: INVITE client transactionAs you can expect, with osip an Invite Client Transaction may bein the CALLING, PROCEEDING, COMPLETED or TERMINATED state. To"execute" the state machine, you will build events, provide themto the correct transaction context and the the state of thetransaction will be updated if the event is allowed in the currentstate.Events are divided in three categories:* SIP messages* Timers* transport errors       Other features:       ==============To ease development of SIP portable application, osipprovide abstractions methods for threads, semaphore,and mutex.You still have the choice to compile osip without threadsupport which you may be required on some embedded platforms.Please report any porting issue to the mailing list &lt;osip@atosc.org&gt;(subscribe first!) or directly to me &lt;jack@atosc.org&gt;.If you are building a new port, I'll certainly think about mergingit.       Other Facilities:       ================oSIP also give small facilities which are completly optional.Among them, the &lt;B&gt;dialog facility(osip_dialog.h)&lt;/B&gt;, mainly tobe used by SIP End-Points, is a stable extra feature. It willallow you to build a structure described in the rfc3261 (Section12: Dialogs). Once built, you can reuse this information to matchreceived requests with a particular SIP call or to build a newrequest within a particular SIP call.An old feature has been implemented in osip: &lt;B&gt;a SDP negotiator.I advise you to not use this old facility which is not powerfulloften uncompliant and not flexible enough.&lt;/B&gt; It's also quiteunreadable and poorly written (by me!). I'll delete it anyway infuture version of osip. I have warned you...However, I'm building a &lt;B&gt;new SDP negotiator (osip_rfc3264.h).&lt;/B&gt;While not being fully ready, I hope to get it completed by theend of year 2004. It's promising work and I hope it will be enough flexible to fit any applications. Time will tell.oSIP finaly contains a &lt;B&gt;MD5 implementation (osip_md5.h)&lt;/B&gt; whichyou'll find usefull when implementing SIP Digest authentication.</pre></div> <hr size="1"><address style="align: right;"><small>Generated on Tue Sep 7 15:07:55 2004 for libosip by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -