onSipNotifyReceived method

void onSipNotifyReceived(
  1. int accId,
  2. String hdrEvent,
  3. String body
)

Handle received NOTIFY message

Implementation

void onSipNotifyReceived(int accId, String hdrEvent, String body) {
  _logs?.print("onSipNotifyReceived accId:$accId event:'$hdrEvent' $body");
  if(hdrEvent != "message-summary") return;

  const String msgTag = "Voice-Message:";
  int idx = body.indexOf(msgTag);
  if(idx != -1) {
    _messages = body.substring(idx+msgTag.length);
    notifyListeners();
  }
}