500_pres_subscribe_with_bad_event.py 765 B

123456789101112131415161718192021222324252627
  1. import inc_sip as sip
  2. import inc_sdp as sdp
  3. # Ticket https://github.com/pjsip/pjproject/issues/623, based on
  4. # http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/2008-September/004709.html:
  5. #
  6. # Assertion when receiving SUBSCRIBE with non-presence Event.
  7. complete_msg = \
  8. """SUBSCRIBE sip:localhost;transport=UDP SIP/2.0
  9. Call-ID: f20e8783e764cae325dba17be4b8fe19@10.0.2.15
  10. CSeq: 1 SUBSCRIBE
  11. From: <sip:localhost>;tag=1710895
  12. To: <sip:localhost>
  13. Via: SIP/2.0/UDP localhost;rport;branch=z9hG4bKd88a.18c427d2.0
  14. Max-Forwards: 69
  15. Event: message-summary
  16. Contact: <sip:localhost>
  17. Allow: NOTIFY, SUBSCRIBE
  18. Content-Length: 0
  19. """
  20. sendto_cfg = sip.SendtoCfg( "Incoming SUBSCRIBE with non presence",
  21. "--null-audio",
  22. "", 489, complete_msg=complete_msg)