159_no_rport.py 905 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import inc_sip as sip
  2. import inc_sdp as sdp
  3. # Ticket https://github.com/pjsip/pjproject/issues/718
  4. # RTC doesn't put rport in Via, and it is report to have caused segfault.
  5. complete_msg = \
  6. """INVITE sip:localhost SIP/2.0
  7. Via: SIP/2.0/UDP $LOCAL_IP:$LOCAL_PORT;branch=z9hG4bK74a60ee5
  8. From: <sip:tester@localhost>;tag=as2858a32c
  9. To: <sip:pjsua@localhost>
  10. Contact: <sip:tester@$LOCAL_IP:$LOCAL_PORT>
  11. Call-ID: 123@localhost
  12. CSeq: 1 INVITE
  13. Max-Forwards: 70
  14. Content-Type: application/sdp
  15. Content-Length: 285
  16. v=0
  17. o=root 4236 4236 IN IP4 192.168.1.11
  18. s=session
  19. c=IN IP4 192.168.1.11
  20. t=0 0
  21. m=audio 14390 RTP/AVP 0 3 8 101
  22. a=rtpmap:0 PCMU/8000
  23. a=rtpmap:3 GSM/8000
  24. a=rtpmap:8 PCMA/8000
  25. a=rtpmap:101 telephone-event/8000
  26. a=fmtp:101 0-16
  27. a=silenceSupp:off - - - -
  28. a=ptime:20
  29. a=sendrecv
  30. """
  31. sendto_cfg = sip.SendtoCfg( "RTC no rport", "--null-audio --auto-answer 200",
  32. "", 200, complete_msg=complete_msg)