Call parameters issues

Discussion in 'Web Call Server 4' started by Howard Fluker, Apr 24, 2015.

  1. Howard Fluker

    Howard Fluker Member

    Hello, I'm trying to do calls between peers with different media devices. Call from an user with webcam to another user with microphone only. I have configured the Call instance to be send and setup the "hasVideo" parameter to true (if webcam present), but when call is incomming on callee side, the "hasVideo" property for incomming call is always "false". So, the answer method for FlashPhoner request access do not play the remote video.
    Also, in the Phone sample, I found an "inviteParameters" for outgoing call, but those parameters are not included when incomming call is retrieved in the callee side. How can I get those parameters? That may solve some issues.
    Thanks
  2. Max

    Max Administrator Staff Member

    Please clarify your test case.
    We have tested similar case with our default web-phone example: examples/phone/Phone.html
    webrtc-to-webrtc-video-call-answer-with-video.png
    1) 10001 presses 'Video Call' and calls to 10002.
    2) 10002 presses 'Answer'.
    10001 - no video playback because 10002 answered with audio only.
    10002 - has video playback, because 10001 initiated a call with video.

    Here pressing 'Video Call' or 'Answer With Video', parameter 'hasVideo = true' is being used. You can check it in Phone.js script.
    When user presses 'Audio Call' or 'Answer', parameter 'hasVideo = false' is being used.
  3. Max

    Max Administrator Staff Member

    The latest server build 1200 allows OnCallEvent.sipMessageRaw parameter pass.
    Therefore you will able to get whole SIP INVITE request at JavaScript layer. See OnCallEvent in our Developer Guide and Call Flow docs.

    Pass of the parameter is disabled by default due security reasons. Most developers do not want to reveal underling SIP messages to JS layer.
    To enable it, you will need to allow it in the REST policy config.
    1. You need to write your own Echo application.
    REST App PHP Example
    Your app should simply return the same data as it received.
    Only difference, it shold have empty 'clientExclude' (see rest_client_config.json file)
    Code:
    "OnCallEvent" : {
        "clientExclude" : "",
        "restExclude" : "",
        "restOnError" : "LOG",
        "restPolicy" : "NOTIFY",
        "restOverwrite" : ""
      },
    
    2. Then you will need to register your app in the CLI.
    Code:
    ssh -p 2000 admin@localhost
    >add app myApp myApp http://my_app_url/rest
    >add app-rest-method -a myApp
    3. Then you will need to set your app key in your JavaScript file (example Phone.js):
    connection.appKey="myApp";

    Examples:
    On user connection WCS sends such REST/JSON request:
    Code:
    SEND REST OBJECT ==>
    URL:http://localhost:9091/EchoApp/connect
    OBJECT:
    {
      "nodeId" : "ky4VOzqJRQXmU17A8RMVl4acWvCEEOFe@192.168.1.5",
      "appKey" : "defaultApp",
      "sessionId" : "/192.168.1.2:55517/192.168.1.5:8080",
      "sipRegisterRequired" : true,
      "sipLogin" : "10002",
      "sipAuthenticationName" : "10002",
      "sipPassword" : "1234",
      "sipDomain" : "192.168.1.4",
      "sipOutboundProxy" : "192.168.1.4",
      "sipPort" : 5080,
      "sipContactParams" : "0",
      "width" : 640,
      "height" : 480,
      "useProxy" : true,
      "useRTCSessions" : true,
      "useWsTunnel" : false,
      "useBase64BinaryEncoding" : false,
      "mediaProviders" : [ "WebRTC", "Flash" ],
      "status" : "PENDING",
      "urlServer" : "ws://192.168.1.5:8080"
    }
    Then WCS receives JSON response:
    Code:
    {
       "nodeId": "ky4VOzqJRQXmU17A8RMVl4acWvCEEOFe@192.168.1.5",
       "appKey": "defaultApp",
       "sessionId": "/192.168.1.2:55517/192.168.1.5:8080",
       "sipRegisterRequired": true,
       "sipLogin": "10002",
       "sipAuthenticationName": "10002",
       "sipPassword": "1234",
       "sipDomain": "192.168.1.4",
       "sipOutboundProxy": "192.168.1.4",
       "sipPort": 5080,
       "sipContactParams": "0",
       "width": 640,
       "height": 480,
       "useProxy": true,
       "useRTCSessions": true,
       "useWsTunnel": false,
       "useBase64BinaryEncoding": false,
       "mediaProviders": [
          "WebRTC",
          "Flash"
       ],
       "status": "PENDING",
       "restClientConfig": {
          "OnCallEvent": {
             "restExclude": "",
             "clientExclude": "",
             "restOnError": "LOG",
             "restPolicy": "NOTIFY",
             "restOverwrite": ""
          }
       }
    }
    As you can see, Echo App is used. You need to have similar traffic.
    You can see the traffic at the logs/flashphoner_manager.log
    You can get more information about REST apps, Call Flow etc from WCS docs.
  4. Howard Fluker

    Howard Fluker Member

    To clarify the question, we need to call using audio only and let callee peer to answer with audio only or video, like Skype works. But when tested, the hasVideo parameter seems to not be sent properly. We're going to update the server version and test again.
    Thanks
  5. Max

    Max Administrator Staff Member

    We are able to reproduce it with latest build.
    1.
    User1 - Video Call - User2
    User2 answers with video
    --
    passed (two way audio, two way video)

    2.
    User1 - Video Call - User2
    User2 answers with audio only
    --
    passed (two way audio, video playback on User2)

    3.
    User1 - Audio Call - User2
    User2 answers with video
    --
    failed (two way audio, no video on User1)

    We'll investigate it.
  6. Max

    Max Administrator Staff Member

    Just to keep issues list
    1. Audio / Video synch issue for WebRTC as RTSP feature.
    2. User1 - audio call, User2 answers with video, no video on User1 (Chrome - to - Chrome WebRTC)

Share This Page