esl / jerboa

STUN/TURN encoder, decoder and client library in Elixir
https://www.erlang-solutions.com/products/mongooseim.html
Other
14 stars 6 forks source link

Allow other values in REQUESTED-TRANSPORT :protocol field #72

Closed arkgil closed 7 years ago

arkgil commented 7 years ago

Right now our implementation of REQUESTED-TRANSPORT attribute only allows :udp as a selected protocol. Every other value will raise during encoding, and raise or return an error when decoding such message.

It seemed convenient at the beginning - we aimed to be compliant only with original TURN RFC (for start) which allows only UDP as a requested relay transport.

However, this approach is not so good when working on a server side of things. There is a special error code which needs to be sent back by the server when it doesn't understand, provide or allow relay over requested transport protocol.

We need figure out how to decode this attribute when we don't know the protocol included, so that the server can use Jerboa to decode such message and respond appropriately.

arkgil commented 7 years ago

@rslota what is the status of this one?

rslota commented 7 years ago

@arkgil Well, in current state the server will crash instead of returning standard error.