MayamaTakeshi / sip-lab

A node module that helps to write SIP functional tests
3 stars 2 forks source link

Write test to check absent media in reply #62

Open MayamaTakeshi opened 6 months ago

MayamaTakeshi commented 6 months ago

If media is refused, the UAS can omit the media from the SDP instead of setting its port to 0 (zero). Ex:

SDP Offer:
v=0
o=- 6802921135 42539 IN IP4 123.12.170.170
s=vokldis
c=IN IP4 103.123.195.237
t=0 0
m=audio 59454 RTP/SAVP 3 18 101
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:k436fLbKPMbchV79TI5yRLTxtPHG08jvl12DKWNg
a=crypto:2 AES_CM_128_HMAC_SHA1_32 inline:gabwSsJ598QLtWzFOv/psvxcfFy7iWXBBrcmUO1O
a=ptime:20
m=audio 59454 RTP/AVP 3 18 101
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20

SDP Answer:
v=0
o=Nano 1702274547 1702274549 IN IP4 133.204.23.34
s=Nano
c=IN IP4 133.204.23.34
t=0 0
m=audio 19018 RTP/SAVP 3
a=rtpmap:3 GSM/8000
a=ptime:20
a=sendrecv
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:gvh7lFkuIgR9s/queLd/UtJdZI7aL6vJMmPhyHou

The above is not testable yet because #58 is pending but we should be able to test it with audio and mrcp.

MayamaTakeshi commented 5 months ago

I wrote samples/rtp_and_srtp.unbalanced_sdp_answer.js.future It confirms sip-lab cannot deal with this scenario.