I want to modify the SIP model. Is there any documentation on the SIP model internals?

Categories:
Solution Number:
S20822
Last Modified:
2013-08-20
Issue

I want to modify the SIP model. Is there any documentation on the SIP model internals?

Solution

There is no official documentation on the SIP model internals. However, here is a description of the SIP model architechture. Hopefully it will help you get started.The best place to start is by looking at the SPI API defined in /models/include/sip_api.h. Here you will find all the functions that provide the SIP functionality. The functions themselves are defined in the external file: sip_support.ex.c. By following each function's code you can understand how the SIP model works.There are a total of 4 process models for SIP: sip_UAC_mgr, sip_UAC, sip_UAS_mgr, sip_UAS- The sip_UAC_mgr is spawned when you call sip_UAC_mgr_start---> Only one sip_UAC_mgr process can be running on a given node- The sip_UAS_mgr is spawned when you call sip_proxy_server_start---> Only one sip_UAS_mgr process can be running on a given node- The sip_UAC process is spawned each time a new call is initialed---> One sip_UAC is spawned on the caller node and, if the call is accepted, one sip_UAC is spawned on the callee node- The sip_UAS process is spawned for each call that goes through the proxy serverWhen the call terminates, the corresponding sip_UAC and sip_UAS process models are destroyed.For each call, a sip_call_handle is created - its fields are defined in sip_support.hAll SIP signaling goes over TCP - SIP uses the TPAL API to open/close connections and send packets over them.SIP sends packets of format sip.The INVITE follows the following steps:1. INVITE request sent from caller --> sip_proxy_server2. sip_proxy_server checks if it can accept the call3. If so, it forwards the INVITE to the callee, else it sends a REJECT to the caller4. Callee checks if it can accept the call5. If so, it sends an ACCEPT to the sip_proxy server, else it sends a REJECT6. sip_proxy_server forwards the callee response to the callerThe BYE follows a similar pattern.In the SIP code, any packet that goes from a SIP UAC --> SIP UAS is called a request and any packet from a SIP UAS --> SIP UAC is called a response

Environment

Protocols->VoIP

Attachments
NOTICE: Riverbed® product names have changed. Please refer to the Product List for a complete list of product names.
Can't find an answer? Create a case