MayamaTakeshi / sip-lab

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

Try to remove Supported: 100rel #110

Open MayamaTakeshi opened 2 weeks ago

MayamaTakeshi commented 2 weeks ago

If we do:

    sip.call.respond(ic.id, {code: 200, reason: 'OK'})

we get this:

SIP/2.0 200 OK
Via: SIP/2.0/UDP 127.0.0.1:5060;rport=5060;received=127.0.0.1;branch=z9hG4bKPjc01d551f-072c-42a9-aa81-22c867e29ee5
Call-ID: 11651fb5-8bcc-4c04-899a-f424b94ee35d
From: <sip:alice@test.com>;tag=77a7afb8-6f2a-42ed-a930-63f538baa746
To: <sip:bob@127.0.0.1>;tag=d5886833-e89b-4284-abe2-2e530dde413b
CSeq: 22333 INVITE
Contact: <sip:sip-lab@127.0.0.1:5061>
Allow: MESSAGE, SUBSCRIBE, NOTIFY, REFER, INVITE, ACK, BYE, CANCEL, UPDATE
Supported: 100rel
Content-Type: application/sdp
Content-Length:   245

As investigated in #109, the module 100rel is mandatory and so pjsip adds the 'Supported: 100rel' to the reply. So if some test doesn't want to send this, it will be only possible if a Supported header is added. But some test might not want any Supported header in the reply.