Sip events presence


Published on

presence allows multiple people to subscribe to same call. It works for a small group of people having sharedl line

  • Be the first to comment

  • Be the first to like this

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Sip events presence

  1. 1. Sip Events and Presence Shadhin Rahman
  2. 2. Overview General introduction of Sip Sip transaction and dialog Presence architecture Sip Events architecture and behavior Security considerations
  3. 3. SIP Introduction Sip user agent and sip network server Client initiates a call and server routes the call Server is responsible for name resolution and user location Sip proxy receives calls and send it to its destination or next hop.
  4. 4. Image source Image source
  5. 5. Sip Methods Invite is for session request Ack confirms a request Cancel is to end a pending request Bye to end a session Register to keep track of user location
  6. 6. Sip Return Code Sip has http like return code 100 trying 180 ringing 200 Ok 302 moved permanently 401 unauthorized 503 service unavailable 603 declined
  7. 7. Sip Transaction and Dialog Transaction occurs between a client and a server and comprises all messages from the first request sent from the client to the server up to a final response sent from the server to the client. Dialog is a peer-to-peer SIP relationship between two UAs that persists for some time. A dialog is identified by a Call-ID, a local tag and a remote tag.
  8. 8. Sip Transaction DialogImage source http://www.informatik.uni- Image source
  9. 9. Presence Presence is user’s reachability and willingness to communicate its current status information User subscribe to an event and receive notification Presence user agent Presence agent Presence server Watcher
  10. 10. Image source Image source
  11. 11. Presence Overview Subscribe request Presence agent should authenticate and send acknowledgement State changes should be notified to subscriber Ability to refresh and terminate subscription Presence agent should be able to allow or terminate subscription
  12. 12. Presence FlowImage source Image source
  13. 13. Sip Events Introduction Sip was initially introduced as a signaling protocol Lack of method to emulate constant communication and update status between entity Three more method was introduced namely Publish , Subscribe and Notify
  14. 14. Simple Sip EventsImage source Image source
  15. 15. Sip Event definitions Event Package Event Templates Notification Notifier State Agent Subscriber Subscription
  16. 16. Description of Subscribe Subscription Duration Identification of subscribe event or event classes Optional accept header.
  17. 17. Subscriber Actions Requesting a subscription. Refreshing subscription. Unsubscribing. Confirmation of subscription.
  18. 18. Description of Notify Event headers Message body Check for valid event type Ensure local authentication and authorization. Notification should sent after removal of subscription.
  19. 19. Notifier Responds Initial subscribe transaction processing. 489 bad event.• Confirmation of subscription creation/refreshing.• Authentication/Authorization of subscribe request. 403 forbidden, 603 declined.
  20. 20. Description of Publish Publishes event state Create, modify and remove state Event publication agent Event state compositor Duration of any event is well defined
  21. 21. Processing Publish Request Event state compositor keeps track of state for each Address-of-record Esc inspects request uri Esc examines event header Esc process expires header field Esc stores the event state in the body of the message
  22. 22. SUBSCRIBE SIP/2.0 Via: SIP/2.0/;branch=z9hG4bKnashds7 To: <> From: <>;tag=12341234 Call-ID: CSeq: 1 SUBSCRIBE Max-Forwards: 70 Expires: 3600 Event: presence Contact: Content-Length: 0
  23. 23. SIP/2.0 200 OK Via: SIP/2.0/;branch=z9hG4bKnashds7 ;received= To:<>;tag=abcd1234 From:<>;tag=12341234 Call-ID: CSeq: 1 SUBSCRIBE Contact: Expires: 3600 Content-Length: 0
  24. 24. NOTIFY SIP/2.0 Via: SIP/2.0/;branch=z9hG4bK8sdf2 To:<>;tag=12341234 From:<>;tag=abcd1234 Call-ID: CSeq: 1 NOTIFY Max-Forwards: 70 Event: presence Subscription-State: active; expires=3599 Contact: Content-Type: application/pidf+xml Content-Length: ...
  25. 25. SIP/2.0 200 OK Via: SIP/2.0/;branch=z9hG4bK8sdf2 ;received= To:<>;tag=12341234 From:<>;tag=abcd1234 Call-ID: CSeq: 1 NOTIFY
  26. 26. PUBLISH SIP/2.0 Via: SIP/2.0/;branch=z9hG4bK652hsge To: <> From:<>;tag=1234wxyz Call-ID: CSeq: 1 PUBLISH Max-Forwards: 70 Expires: 3600 Event: presence Content-Type: application/pidf+xml Content-Length: ...
  27. 27. SIP/2.0 200 OK Via: SIP/2.0/;branch=z9hG4bK652hsge ;received= To:<>;tag=1a2b3c4d From:<>;tag=1234wxyz Call-ID: CSeq: 1 PUBLISH SIP-ETag: dx200xyz Expires: 1800
  28. 28. Security Consideration Access control. Notifier privacy mechanism. Denial of service attacks. Replay Attacks. Man-in-the-middle attacks. Confidentiality.
  29. 29. Implementation of Security Sip registration TLS Digest Authentication S/MIME
  30. 30. References Rfc 3856 Rfc 3265 Rfc 2778 Rfc 3261 Rfc 3903
  31. 31. Summery Presence is a way to have sustained stateful communication Sip serves well for presence requirements Sip presence deployment must confirm security measurements
  32. 32. Question ?
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.