MayamaTakeshi / sip-lab

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

Need to add code to check when unknow parameters are passed #20

Closed MayamaTakeshi closed 1 year ago

MayamaTakeshi commented 1 year ago

If someone writes code like this:

sip.call.create({
  from_uri: 'sip:a@test.com',
  to_uri : 'sip:b@somewhere.com',
  header: {
    'X-MyHeader': 'blabla',
  }
})

The call will succeed but the header X-MyHeader will not be added to the INVITE because the the name of the parameter is 'headers' and not 'header'. This will make people waste time, so we should detect invalid parameter names.