decline method Null safety
decline sip call
code
: SIP code to be sent, if not set, 486 is used; optional
headers
: object with key/value mappings (header name/value), to specify custom headers to add to the SIP request; optional
Implementation
Future<void> decline({
int? code,
Map<String, dynamic>? headers,
}) async {
var payload = {"request": "decline", "code": code, "headers": headers}
..removeWhere((key, value) => value == null);
JanusEvent response = JanusEvent.fromJson(await this.send(data: payload));
JanusError.throwErrorFromEvent(response);
}