Skip to content

sip_ua_helper.SendMessage Issues #96

@wangzhenzhe

Description

@wangzhenzhe

Describe the bug
The VoIP call works well and I like this library.
I have tried using the sip message of this library and I met an exception caught.

════════ Exception caught by gesture ═══════════════════════════════════════════
The following _TypeError was thrown while handling a gesture:
type 'URI' is not a subtype of type 'String'

To Reproduce
The sip_ua version was 0.2.1
Steps to reproduce the behavior:

  1. A successful connected SIP session
  2. Call sip_ua_helper.sendMessage(String target, String body, options) as
    widget.helper.sendMessage("100", "Hello World");

The target "100" was a callable extension user in my environment.

  1. You could see the exception caught
    type 'URI' is not a subtype of type 'String'

Expected behavior
I found this exception was because
message.dart line 58
// Check target validity.
target = this._ua.normalizeTarget(target);
The var target was a String but normalizeTarget(target) will return URI.
I thought it was easy issue to fix it.

BUT why this simple issue had not been reported before, is there nobody concern about message features and nobody use sendMessage? Interesting!
I thought it would be better to add message usage to example of this library.
Anyway, this library is a good job. Thanks!

System Infomation()
Flutter SDK Version: 1.190-4.1.pre
Target OS and Version: Android 29.0.3
Host OS and Version: Windows 10 Version 10.0.18363.900

The version of sip_ua was added.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions