Janus SIP Flutter application

834 views
Skip to first unread message

Ty Chikondo

unread,
Jun 5, 2020, 3:10:46 AM6/5/20
to meetecho-janus
Good day,

I have been working on a flutter application making use of the janus SIP plugin here.
I created this with the basic functionality of just making a simple call to a sip server, with janus communication handled here.

My dart programming is intermediate at most, would appreciate anyone how would be willing to help and extend upon this project, with the goal of eventually creating a flutter janus-gateway library

Regards.

Lorenzo Miniero

unread,
Jun 5, 2020, 3:40:22 AM6/5/20
to meetecho-janus
Thanks for sharing, it's always nice seeing mobile related development so I hope people will play with this to get you feedback!

Lorenzo

Bilal Şimşek

unread,
Jul 2, 2020, 8:30:13 AM7/2/20
to meetecho-janus
Thats a great effort. I downloaded yesterday and start to check it. as I m not proffessional this webrtc things I could not manage to answer call with correct descriptions. I hope you also add answering incoming call  event. UI side is not important but I need advise for setting correct jsep, sdp etc when get called. in my environment already have an asterisks server up and  running and also webpage based  webrtc clients running smoothly. below code I tried but no success.  I also write an issue in github. thanks. 

 case "incomingcall":
       //  _sdpAnswer(message['jsep']['sdp']);
       var remote = await createPeerConnection(configuration, _config);
       remote.setRemoteDescription(RTCSessionDescription(
           message['jsep']['sdp'], message['jsep']['type']));
       RTCSessionDescription desc = await remote.createAnswer(_constraints);
       remote.setLocalDescription(desc);

        final answer = {
         "body": {"request": "accept"},
         "janus": "message",
         "handle_id": _handleID,
         "session_id": _sessionID,
         "transaction": "$_transactionID",
         "jsep": {"sdp": "${message['jsep']['sdp']}", "type": "answer"},
       };

        this.send(answer);
       break;



Bilal Şimşek

unread,
Jul 2, 2020, 11:07:29 AM7/2/20
to meetecho-janus


I solved my problem with this code below. 

case "incomingcall":
       if (_channel != null) {
         _stream = await navigator.getUserMedia(mediaConstraints);
         if (this.onLocalStream != null) this.onLocalStream(_stream);
         _pc = await createPeerConnection(configuration, _config);
         _pc.setRemoteDescription(RTCSessionDescription(
             message['jsep']['sdp'], message['jsep']['type']));
         _pc.addStream(_stream);
         _description = await _pc.createAnswer(_constraints);

          _pc.setLocalDescription(_description);
         final answer = {
           "body": {
             "request": "accept",
             "uri":
                 "sip:${_preferences.getString('destination')}@${_preferences.getString('domain')}"
           },
           "janus": "message",
           "handle_id": _handleID,
           "session_id": _sessionID,
           "transaction": "$_transactionID",
           "jsep": {"sdp": "${_description.sdp}", "type": "answer"},
         };

          this.send(answer);
       }

        break;


Bilal Şimşek

unread,
Jul 12, 2020, 2:53:35 PM7/12/20
to meetecho-janus


Hi again,

why dont you check this repository, https://github.com/maanasnetwork/flutter_janus.  as much as I can see all janus features ported to dart. I successfully manage to make and receive calls now I m trying to understand dtmf features. maybe you want to check it for inspiration or contribution. 
Reply all
Reply to author
Forward
0 new messages