Answers ( 19 )

  1. Andrew Latham
    +1
    August 17, 2012 at 14:54 pm
    Reply

    Websocket support is being actively worked on. HTTP support should be enabled in manager.conf and http.conf first. --- manager.conf --- [general] enabled = yes webenabled = yes --- http.conf --- [general] enabled=yes bindaddr=0.0.0.0 bindport=8088 -- ~ Andrew "lathama" Latham lathama@gmail.com http://lathama.net ~ --

  2. Joshua Colp
    +1
    August 17, 2012 at 15:04 pm
    Reply

    ----- Original Message ---

  3. Andrew Latham
    +1
    August 17, 2012 at 15:10 pm
    Reply

    Joshua

    Can you copy and past into a wiki page for everyone's benefit? Maybe https://wiki.asterisk.org/wiki/display/~jcolp/WebRTC_Demo_Setup or like page would be good.

  4. Andrew Latham
    +1
    August 17, 2012 at 15:12 pm
    Reply

    s/past/paste/

    oops

  5. Juan Castro
    +1
    August 17, 2012 at 15:45 pm
    Reply

    I still get "unauthorized" from sipml5 with these modifications. I used port 80 instead of 8088 (no other webserver listening on 80), was that wrong?

  6. Juan Castro
    +1
    August 17, 2012 at 17:04 pm
    Reply

    Correction. It's actually "Failed to connect to the server". I set the proxy address and port correctly in sipml5's call.htm (it registers on Kamailio).

  7. Juan Castro
    +1
    August 20, 2012 at 09:49 am
    Reply

    ...which is in fact a 404 response from Asterisk. Here's the response I received: http://users.vialink.com.br/jcastro/refused.cap

    I suspect I am configuring something wrong, but what is it?

    Juan

  8. Joshua Colp
    +1
    August 20, 2012 at 09:52 am
    Reply

    ----- Original Message ---

  9. Joshua Colp
    +1
    August 20, 2012 at 09:53 am
    Reply

    ----- Original Message ---

  10. Joshua Colp
    +1
    August 20, 2012 at 09:55 am
    Reply

    ----- Original Message ---

  11. Andrew Latham
    +1
    August 20, 2012 at 09:55 am
    Reply

    Agreed, but we need something and a place for comments. The wiki is great because we can rename and move things when they are no longer relevant to our needs.

  12. Juan Castro
    +1
    August 20, 2012 at 10:41 am
    Reply

    Well, I did the following changes in sipml5 and now I get a "Bad Request" on REGISTER, instead of 404. Clearly, I'm still missing something. Here are the changes I made:

    Index: call.htm ==================================================================--- call.htm (revision 68) +++ call.htm (working copy) @@ -351,8 +351,9 @@ // we will connect to one of them and let the balancer to choose the right one (less connected sockets) // each port can accept up to 65K connections which means that the cloud can manage 325K active connections // the number of port will be increased or decreased based on the current trafic - i_port = 4062 + (((new Date().getTime()) % 5) * 1000); - s_proxy = "sipml5.org"; + // i_port = 4062 + (((new Date().getTime()) % 5) * 1000); + i_port = 80; + s_proxy = "192.168.0.111"; }

    // create a new SIP stack. Not mandatory as it's possible to reuse the same satck Index: src/tinySIP/src/tsip_stack.js ==================================================================--- src/tinySIP/src/tsip_stack.js (revision 68) +++ src/tinySIP/src/tsip_stack.js (working copy) @@ -351,7 +351,7 @@ return -2; }

    - tsk_utils_log_info("SIP stack start: proxy='" + this.network.s_proxy_cscf_host + ":" + this.network.i_proxy_cscf_port + "', realm='" + this.network.o_uri_realm + "', impi='" + this.identity.s_impi + "', impu='" + this.identity.o_uri_impu + "'"); + tsk_utils_log_info("SIP stack start: proxy='" + this.network.s_proxy_cscf_host + ":" + this.network.i_proxy_cscf_port + "/ws', realm='" + this.network.o_uri_realm + "', impi='" + this.identity.s_impi + "', impu='" + this.identity.o_uri_impu + "'");

    this.network.o_transport this.o_layer_transport.transport_new(this.network.e_proxy_cscf_type, this.network.s_proxy_cscf_host, this.network.i_proxy_cscf_port, "SIP Transport", __tsip_stack_transport_callback); if (!this.network.o_transport) { @@ -716,4 +716,4 @@ }

    return 0; -} \ No newline at end of file +} Index: src/tinySIP/src/transports/tsip_transport.js ==================================================================--- src/tinySIP/src/transports/tsip_transport.js (revision 68) +++ src/tinySIP/src/transports/tsip_transport.js (working copy) @@ -368,7 +368,7 @@ return -1; }

    - var s_url = tsk_string_format("{0}://{1}:{2}",o_self.s_protocol, o_self.s_host, o_self.i_port); + var s_url tsk_string_format("{0}://{1}:{2}/ws",o_self.s_protocol, o_self.s_host, o_self.i_port); tsk_utils_log_info("Connecting to '"+s_url+"'"); o_self.o_ws = new WebSocket(s_url, 'sip'); o_self.o_ws.binaryType = "arraybuffer"; @@ -458,7 +458,7 @@ }

    var b_isInternetExplorer = (WebRtc4all_GetType() == WebRtcType_e.IE); - var s_url = tsk_string_format("{0}://{1}:{2}",o_self.s_protocol, o_self.s_host, o_self.i_port); + var s_url tsk_string_format("{0}://{1}:{2}/ws",o_self.s_protocol, o_self.s_host, o_self.i_port); tsk_utils_log_info("Connecting to '"+s_url+"'"); if(b_isInternetExplorer){ o_self.o_transport = new ActiveXObject("webrtc4ie.NetTransport"); @@ -480,7 +480,7 @@ if(o_self.o_transport.defaultDestAddr && o_self.o_transport.defaultDestPort){ o_self.s_host = o_self.o_transport.defaultDestAddr; o_self.i_port = o_self.o_transport.defaultDestPort; - tsk_utils_log_info("Transport default destination=" + o_self.s_host + ":" + o_self.i_port); + tsk_utils_log_info("Transport default destination=" + o_self.s_host + ":" + o_self.i_port + "/ws"); } o_self.b_started = true; o_self.signal(tsip_transport_event_type_e.STARTED, "Network transport started", null); Index: src/tinyMEDIA/src/tmedia_session_jsep.js ==================================================================--- src/tinyMEDIA/src/tmedia_session_jsep.js (revision 68) +++ src/tinyMEDIA/src/tmedia_session_jsep.js (working copy) @@ -168,6 +168,8 @@

    tmedia_session_jsep.prototype.decorate_lo = function () { if (this.o_sdp_lo) { + this.o_sdp_lo.remove_media("video"); + /* Session name for debugging */ var o_hdr_S; if ((o_hdr_S = this.o_sdp_lo.get_header(tsdp_header_type_e.S))) { @@ -278,4 +280,4 @@ this.o_sdp_ro = null;

    return 0; -} \ No newline at end of file +}

  13. Joshua Colp
    +1
    August 20, 2012 at 10:51 am
    Reply

    ----- Original Message ---

  14. Juan Castro
    +1
    August 20, 2012 at 13:58 pm
    Reply

    Hoo-hah. It registers. Progress!

    Now... media. Or not.

  15. Andrew Latham
    +1
    August 20, 2012 at 14:00 pm
    Reply

    Juan Matt just opened https://issues.asterisk.org/jira/browse/ASTERISK-20267 to document some of this. Feel free to pipe in. -- ~ Andrew "lathama" Latham lathama@gmail.com http://lathama.net ~ --

  16. Juan Castro
    +1
    August 20, 2012 at 15:33 pm
    Reply

    Put my sipml5 changes there. By the way, this is what happens when I try to call a X-Lite extension from a sipml5 extension:

    jcvmasterisk1*CLI> == Using SIP RTP CoS mark 5 [Aug 20 17:24:02] ERROR[22737][C-00000009]: chan_sip.c:32140 setup_srtp: No SRTP module loaded, can't setup SRTP session. [Aug 20 17:24:02] WARNING[22737][C-00000009]: chan_sip.c:9974 process_sdp: Can't provide secure audio requested in SDP offer jcvmasterisk1*CLI>

    Trying to do the reverse... X-Lite stays in "Calling..." - in sipml5, the right pane, with the local webcam thumbnailm, pops up, but no "Answer" button.

  17. mailsvb
    +1
    August 20, 2012 at 18:20 pm
    Reply

    Hi, you need to build Asterisk with SRTP support...

    *wget http://sourceforge.net/projects/srtp/files/latest/download -O srtp-latest.tgz tar -zxvf srtp-latest.tgz ./configure --prefix=/libsrtp make && make install*

    *And for Asterisk...* *./configure --with-srtp=/libsrtp* * * *this should work...* * * *I did some changes to the sipml5 client and wanted to share this with you guys... Actually only 2 simple changes...* https://github.com/mailsvb/sipml5

    *- The main config section has been splitted and made a little more flexible, see *http://i45.tinypic.com/10x59o7.png - Main call.html file has been renamed to .php and some code has been added that will replace the "something.invalid" with the actual IP of your client PC.

    Currently I am able to register and at least make my softphone ring ;-) As soon as I answer the outgoing call from sipml5 in the softclient, I get an error in sipml5...

    You can find my console output here http://pastebin.com/jdkXSMSD I will continue investigating tomorrow...

    best regards, Sven

    2012/8/20 Juan Castro

  18. Juan Castro
    +1
    August 21, 2012 at 10:46 am
    Reply

    Recompiled. Well... now at leat in ONE instance the signaling seems to behave correctly: when I dial from sipml5 to plain SIP. If the destination is sipml5, the destination browser goes into a funky state in which the live camera panel pops up but there doesn't seem to be a recognized ringing state. Here's the log from a sipml5->sipml5 call. The caller is 2010 and the callee is 2009. (12:40:06 is when I gave up and clicked "hangup" at the caller.)

    (Media? Heh, surely you jest.)

    [Aug 21 12:38:25] DEBUG[22872] res_timing_timerfd.c: Expected to acknowledge 1 ticks but got 6 instead [Aug 21 12:38:35] DEBUG[23469] chan_sip.c: = Looking for Call ID: e4d7cda4-c4cb-932f-c084-ac6f87d27eb9 (Checking From) --From tag wiwN3MEMrB3HGUmlel5V --To-tag [Aug 21 12:38:35] DEBUG[23469] logger.c: CALL_ID [C-00000002] created by thread. [Aug 21 12:38:35] DEBUG[23469] acl.c: For destination '192.168.0.92', our source address is '192.168.0.111'. [Aug 21 12:38:35] DEBUG[23469] chan_sip.c: Setting SIP_TRANSPORT_WS with address 192.168.0.111:5060 [Aug 21 12:38:35] DEBUG[23469] chan_sip.c: Allocating new SIP dialog for e4d7cda4-c4cb-932f-c084-ac6f87d27eb9 - INVITE (No RTP) [Aug 21 12:38:35] DEBUG[23469][C-00000002] logger.c: CALL_ID [C-00000002] bound to thread. [Aug 21 12:38:35] DEBUG[23469][C-00000002] chan_sip.c: **** Received INVITE (5) - Command in SIP INVITE [Aug 21 12:38:35] DEBUG[23469][C-00000002] netsock2.c: Splitting '192.168.0.111' into... [Aug 21 12:38:35] DEBUG[23469][C-00000002] netsock2.c: ...host '192.168.0.111' and port ''. [Aug 21 12:38:35] DEBUG[23469][C-00000002] chan_sip.c: Trying to put 'SIP/2.0 401' onto WS socket destined for 192.168.0.92:5060 [Aug 21 12:38:35] DEBUG[23469][C-00000002] logger.c: Call_ID [C-00000002] being removed from thread. [Aug 21 12:38:35] DEBUG[23469] chan_sip.c: = Looking for Call ID: e4d7cda4-c4cb-932f-c084-ac6f87d27eb9 (Checking From) --From tag wiwN3MEMrB3HGUmlel5V --To-tag as39a7b995 [Aug 21 12:38:35] DEBUG[23469][C-00000002] logger.c: CALL_ID [C-00000002] bound to thread. [Aug 21 12:38:35] DEBUG[23469][C-00000002] chan_sip.c: **** Received ACK (6) - Command in SIP ACK [Aug 21 12:38:35] DEBUG[23469][C-00000002] chan_sip.c: Stopping retransmission on 'e4d7cda4-c4cb-932f-c084-ac6f87d27eb9' of Response 3106: Match Not Found [Aug 21 12:38:35] DEBUG[23469][C-00000002] logger.c: Call_ID [C-00000002] being removed from thread. [Aug 21 12:38:35] DEBUG[23469] chan_sip.c: = Looking for Call ID: e4d7cda4-c4cb-932f-c084-ac6f87d27eb9 (Checking From) --From tag wiwN3MEMrB3HGUmlel5V --To-tag [Aug 21 12:38:35] DEBUG[23469] netsock2.c: Splitting '192.168.0.111' into... [Aug 21 12:38:35] DEBUG[23469] netsock2.c: ...host '192.168.0.111' and port ''. [Aug 21 12:38:35] DEBUG[23469] netsock2.c: Splitting '192.168.0.111' into... [Aug 21 12:38:35] DEBUG[23469] netsock2.c: ...host '192.168.0.111' and port ''. [Aug 21 12:38:35] DEBUG[23469][C-00000002] logger.c: CALL_ID [C-00000002] bound to thread. [Aug 21 12:38:35] DEBUG[23469][C-00000002] chan_sip.c: **** Received INVITE (5) - Command in SIP INVITE [Aug 21 12:38:35] DEBUG[23469][C-00000002] netsock2.c: Splitting '192.168.0.111' into... [Aug 21 12:38:35] DEBUG[23469][C-00000002] netsock2.c: ...host '192.168.0.111' and port ''. [Aug 21 12:38:35] DEBUG[23469][C-00000002] rtp_engine.c: Using engine 'asterisk' for RTP instance '0xb751d8dc' [Aug 21 12:38:35] DEBUG[23469][C-00000002] res_rtp_asterisk.c: Allocated port 18704 for RTP instance '0xb751d8dc' [Aug 21 12:38:35] DEBUG[23469][C-00000002] netsock2.c: Splitting '192.168.0.111' into... [Aug 21 12:38:35] DEBUG[23469][C-00000002] netsock2.c: ...host '192.168.0.111' and port ''. [Aug 21 12:38:35] DEBUG[23469][C-00000002] rtp_engine.c: RTP instance '0xb751d8dc' is setup and ready to go [Aug 21 12:38:35] DEBUG[23469][C-00000002] res_rtp_asterisk.c: Setup RTCP on RTP instance '0xb751d8dc' [Aug 21 12:38:35] DEBUG[23469][C-00000002] netsock2.c: Splitting '192.168.0.111' into... [Aug 21 12:38:35] DEBUG[23469][C-00000002] netsock2.c: ...host '192.168.0.111' and port ''. [Aug 21 12:38:35] VERBOSE[23469][C-00000002] netsock2.c: == Using SIP RTP CoS mark 5 [Aug 21 12:38:35] DEBUG[23469][C-00000002] chan_sip.c: Setting NAT on RTP to Off [Aug 21 12:38:35] DEBUG[23469][C-00000002] chan_sip.c: Processing session-level SDP v=0... UNSUPPORTED OR FAILED. [Aug 21 12:38:35] DEBUG[23469][C-00000002] chan_sip.c: Processing session-level SDP o=- 1190078527 1 IN IP4 127.0.0.1... UNSUPPORTED OR FAILED. [Aug 21 12:38:35] DEBUG[23469][C-00000002] chan_sip.c: Processing session-level SDP s=webrtc (chrome 22.0.1189.0) - Doubango Telecom (sipML5 r000)... UNSUPPORTED OR FAILED. [Aug 21 12:38:35] DEBUG[23469][C-00000002] chan_sip.c: Processing session-level SDP t=0 0... UNSUPPORTED OR FAILED. [Aug 21 12:38:35] DEBUG[23469][C-00000002] chan_sip.c: Processing session-level SDP a=group:BUNDLE audio video... UNSUPPORTED OR FAILED. [Aug 21 12:38:35] DEBUG[23469][C-00000002] rtp_engine.c: Setting payload 103 based on m type on 0xb6013128 [Aug 21 12:38:35] DEBUG[23469][C-00000002] rtp_engine.c: Setting payload 104 based on m type on 0xb6013128 [Aug 21 12:38:35] DEBUG[23469][C-00000002] rtp_engine.c: Setting payload 0 based on m type on 0xb6013128 [Aug 21 12:38:35] DEBUG[23469][C-00000002] rtp_engine.c: Setting payload 8 based on m type on 0xb6013128 [Aug 21 12:38:35] DEBUG[23469][C-00000002] rtp_engine.c: Setting payload 106 based on m type on 0xb6013128 [Aug 21 12:38:35] DEBUG[23469][C-00000002] rtp_engine.c: Setting payload 105 based on m type on 0xb6013128 [Aug 21 12:38:35] DEBUG[23469][C-00000002] rtp_engine.c: Setting payload 13 based on m type on 0xb6013128 [Aug 21 12:38:35] DEBUG[23469][C-00000002] rtp_engine.c: Setting payload 126 based on m type on 0xb6013128 [Aug 21 12:38:35] DEBUG[23469][C-00000002] netsock2.c: Splitting '189.24.100.229' into... [Aug 21 12:38:35] DEBUG[23469][C-00000002] netsock2.c: ...host '189.24.100.229' and port ''. [Aug 21 12:38:35] DEBUG[23469][C-00000002] chan_sip.c: Processing media-level (audio) SDP c=IN IP4 189.24.100.229... OK. [Aug 21 12:38:35] DEBUG[23469][C-00000002] chan_sip.c: Processing media-level (audio) SDP a=rtcp:50445 IN IP4 189.24.100.229... UNSUPPORTED OR FAILED. [Aug 21 12:38:35] DEBUG[23469][C-00000002] netsock2.c: Splitting '169.254.103.29' into... [Aug 21 12:38:35] DEBUG[23469][C-00000002] netsock2.c: ...host '169.254.103.29' and port ''. [Aug 21 12:38:35] DEBUG[23469][C-00000002] netsock2.c: Splitting '0' into... [Aug 21 12:38:35] DEBUG[23469][C-00000002] netsock2.c: ...host '0' and port ''. [Aug 21 12:38:35] DEBUG[23469][C-00000002] chan_sip.c: Processing media-level (audio) SDP a

  19. James Mortensen
    +1
    August 22, 2012 at 11:32 am
    Reply

    Hi Sven,

    I tried out your changes. I had to replace the $_SERVER['REMOTE_ADDR'] with Java's request.getRemoteAddr() since I'm using Jetty not Apache. I got the same results you got, which I also get using the something.invalid header. The peer connects from Chrome, I can dial my cellphone and make it ring, but the Chrome sipml5 client drops the call when the phone starts ringing. When I answer, the cellphone stays connected, but there is no audio.

    My suggestion is to post your changes to the user interface on the doubango Google Group as it will mean people don't need to modify the code to connect to Asterisk WS. https://groups.google.com/forum/?fromgroups=#!forum/doubango. See if they can incorporate your changes so we don't have to modify the library after each update.

    As far as the IP address goes, I'm not sure what this is doing since I still see the invalid domain in my SIP traces.

    James



    guys... Actually only 2 simple changes...*https://github.com/mailsvb/sipml5

    *- The main config section has been splitted and made a little more flexible, see *http://i45.tinypic.com/10x59o7.png - Main call.html file has been renamed to .php and some code has been added that will replace the "something.invalid" with the actual IP of your client PC.

    Currently I am able to register and at least make my softphone ring ;-) As soon as I answer the outgoing call from sipml5 in the softclient, I get an error in sipml5...

    You can find my console output here http://pastebin.com/jdkXSMSD I will continue investigating tomorrow...

    best regards, Sven

 Prev question

Next question