SlideServe
Menu
Préférences
© SlideServe · v2026

Modeling the SIP proxy using Promela

xaria avatar
11 diapositives · 375 Views · Aug 21, 2014

Modeling the SIP proxy using Promela. Jong Yul Kim December 21, 2009. INVITE sip:alice@columbia.edu. 180 Ringing. 200 OK. ACK. “Hi, how are you?”. Session Initiation Protocol. User Agent Client (UAC). User Agent Server (UAS).

Modeling the SIP proxy using Promela - slide 1
01 / 11Modeling the SIP proxy using Promela
1 / 17

Télécharger la présentation

Modeling the SIP proxy using Promela
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Modeling the SIP proxy using Promela Jong Yul Kim December 21, 2009

  2. INVITE sip:alice@columbia.edu 180 Ringing 200 OK ACK “Hi, how are you?” Session Initiation Protocol User Agent Client (UAC) User Agent Server (UAS) • A signaling protocol widely used for multimedia session setup and teardown • Used with Real Time Protocol (RTP) to send voice/video • During setup (negotiation): • UAC offers a range of session types and codecs • UAS answers with a range of session types and codecs • During teardown: • One of the parties sends a BYE message. The other replies “OK”.

  3. Related Work • “Understanding SIP through Model-Checking” by Dr. Pamela Zave • Her Promela code models the initial session setup + termination between one UAC and one UAS.

  4. Abstractions in the Basic model • We’re modeling the topmost layer of the SIP stack. • No syntax checking, no retransmission, no timers, … • Many failure messages are also out. UAC / UAS core Transaction Transport The SIP Stack

  5. The FIFO/Pruned Model • Two channels • Assume one TCP connection each from both sides • Two processes • One UAC process • One UAS process • Many messages • invite, prack, update, ack, cancel, info, bye, unProv, relProv, invSucc, invFail, prackRsp, cancRsp, updSucc, updFail,infoRsp, byeRsp proctype UAC proctype UAS

  6. SIP proxy • A SIP proxy is a server that relays SIP signals between two endpoints. • Usually, UAS registers to a proxy to receive calls. • Two modes of operation: • Stateless : “blindly” forwards message from one side to the other • Stateful : keeps track of state to do more interesting things

  7. Modeling a SIP proxy proctype proxy • Four channels • Three processes • Same messages proctype UAC proctype UAS proctype proxy() { mtype message, sdp; end: do :: c2p?message,sdp; p2s!message,sdp :: s2p?message,sdp; p2c!message,sdp od }

  8. INVITE bob INVITE bob failed failed Stateless SIP Proxy UAS1 UAC Proxy UAS2 proctype proxy() { mtype message, sdp; byte uasid; c2p?invite,sdp; do :: true; uasid = 0; break; :: true; uasid = 1; break; od; p2s[uasid]!invite,sdp; end: do :: c2p?message,sdp; p2s[uasid]!message,sdp :: s2p[uasid]?message,sdp; p2c!message,sdp od } • If there are multiple UAS registered, then pick one and forward.

  9. INVITE bob INVITE bob failed INVITE OK OK Stateful SIP Proxy: Sequential Search UAS1 UAC Proxy UAS2 • Search multiple UAS in order. • Establish connection with first one that answers. • However, • Had to change UAC as well. • Proxy forwards provisional response to UAC. • UAC may receive provisional responses from multiple UAS. • Variables intended for single UAC-UAS transaction changed to arrays.

  10. Simulation of Sequential Search • Verification of the model using • Partial Order Reduction • Compression • Reveals that there’s an invalid end state at depth 284. • Hopefully will be fixed by Wednesday.

  11. Lessons Learned • Promela / SPIN is a tool that can be used to check network protocols. • To make a model, need to abstract a lot of details out. Finding the right level of abstraction in the problem you’re interested in is important. • Making or modifying a model from plain English-based standards documents is not an easy task. But the resulting model is very useful.