[asterisk-users] Getting Asterisk 11.5 to use TURN

2013-08-26 Thread James Mortensen
I've configured TURN in rtp.conf in Asterisk 11.5.  The credentials are
correct because I can get Chrome to get relay candidates and attach them to
the SDP, but Asterisk doesn't want to play ball.

There's little documentation -- at least from what I can tell -- on getting
TURN working in Asterisk, other than the samples.

STUN debug is also of no help, and when I tcpdump the Asterisk box I can
see Asterisk trying to reach the TURN server but cannot see any of the
packets.

If y'all want logs, please just ask for them. Last time I tried to include
all of that stuff, your outdated mailing list system choked on it, so it
would be best if I only send what's relevant, and I'm not exactly sure what
that is, so please bear with me.


Thanks! :)


James Mortensen
Project Manager, VoiceCurve, Inc.
866-707-4590
james.morten...@voicecurve.com


- *'How do we convince people that in programming simplicity and clarity—in
short: what mathematicians call elegance—are not a dispensable luxury,
but a crucial matter that decides between success and failure?' - Edsger W.
Dijkstra*
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Asterisk 12 and OPUS Codec

2013-05-10 Thread James Mortensen
I was wondering if anyone knows if Asterisk 12 will be supporting the OPUS
codec, which is part of the WebRTC standard as the default codec.

Thank you,

-- 
James Mortensen
Project Manager, VoiceCurve, Inc.
866-707-4590
james.morten...@voicecurve.com
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Building Asterisk 11.4.0-rc1 with PJSIP 2.1

2013-05-02 Thread James Mortensen
Hello,

I'm working on building Asterisk 11.4.0-rc1 with pjproject 2.1 instead of
2.0 due to a crashing issue resulting from ICE.
https://issues.asterisk.org/jira/browse/ASTERISK-21696

Currently, I'm systematically going through each Makefile in every
directory in pjproject and changing the paths that exist in the pjproject
2.0 included with Asterisk, so that I can successfully build Asterisk.

I'm using the Asterisk pjproject 2.1 port from here:
https://github.com/asterisk/pjproject

An example of the build errors I'm resolving one by one is this:

make[2]: *** No rule to make target
`../../pjlib/lib/libpj-x86_64-unknown-linux-gnu.a', needed by
`../lib/libpjnath-x86_64-unknown-linux-gnu.a'.  Stop.
make[1]: ***
[/mnt/src/asterisk-11.4.0-rc1/res/pjproject/pjnath/lib/libpjnath-x86_64-unknown-linux-gnu.a]
Error 2
make: *** [res] Error 2

I'm editing the Makefiles and fixing the paths so Asterisk can find the
target.  For all the people out there smarter than me, is there a better
way to go about this?

I'm hoping upgrading PJSIP will resolve the crashing issue, and I'll
continue going through Makefiles until someone smarter than me can
enlighten me.

Thank you for your help!

-- 
James Mortensen
Project Manager, VoiceCurve, Inc.
866-707-4590
james.morten...@voicecurve.com
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Asterisk 11.4.0-rc1 refuses to use the TURN server

2013-04-23 Thread James Mortensen
After struggling with one way audio issues as a result of STUN binding
errors on both the Asterisk side and the Chrome side, we've decided to just
simply go with a TURN relay for RTP packets until the issues are resolved.

I configured rtp.conf so that all of the STUN related entries are commented
out, and I use the following TURN configuration instead:


turnaddr=numb.viagenie.ca:3478
;
; Username used to authenticate with TURN relay server.
turnusername=myusername%40gmail.com
;
; Password used to authenticate with TURN relay server.
turnpassword=p@ssw0rd


I also use the same configuration on the client side.  When running a
tcpdump, I see that there is traffic to/from the TURN relay:

10.0.1.18.53875  blues.viagenie.ca.nat-stun-port: UDP, length 20
blues.viagenie.ca.nat-stun-port  10.0.1.18.53875: UDP, length 56
10.0.1.18.51435  blues.viagenie.ca.nat-stun-port: UDP, length 28
blues.viagenie.ca.nat-stun-port  10.0.1.18.51435: UDP, length 100
10.0.1.18.51435  blues.viagenie.ca.nat-stun-port: UDP, length 144
10.0.1.18.51435  blues.viagenie.ca.nat-stun-port: UDP, length 144
blues.viagenie.ca.nat-stun-port  10.0.1.18.51435: UDP, length 100


But it's dead silent when doing a tcpdump on the Asterisk server side.

The candidates on both sides don't contain relay candidates. Oddly, the
client side still has srflx candidates, suggesting STUN is still at work,
but the Asterisk side only contains host candidates.

Is TURN fully enabled in Asterisk 11?  If so, how does one enable it and
make it the priority?

Thank you,

-- 
James Mortensen
Project Manager, VoiceCurve, Inc.
866-707-4590
james.morten...@voicecurve.com
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Top Posting

2012-12-30 Thread James Mortensen
I have an idea! Instead of arguing over whether or not top posting or
bottom posting is the way to go, something that obviously no one will
*ever*agree on, why not move to Google Groups instead (or something
similar to
Google Groups).

When I post to Doubango's list, it's easy, there's no top or bottom posting
wars, it just works. In fact, in a thread, Google Groups usually drops you
right to the most recent message, so the people who like top posting can
still see the most recent message while the bottom posters will still see
the bottom posting format.

It's either this, or we can sit and watch intelligent people continue to
degrade one another and argue over something with no agreement in site. :)

When I mentioned this before, someone from Digium said this will never
happen, and it's unfortunate.  Maybe they just like to see people bicker
and argue.

If there's a better alternative to Google Groups, or a way to set
preferences in the mailing list so that everyone is happy, maybe that's
something that could be done?

James

On Sun, Dec 30, 2012 at 6:30 PM, Ron Wheeler rwhee...@artifact-software.com
 wrote:



 On 30/12/2012 11:13 AM, Patrick Lists wrote:

 On 12/30/2012 04:26 PM, Ron Wheeler wrote:

 I participate in a lot of lists and top posting is now the norm since
 people want to see quickly if the message is worth reading.


 Isn't it a bit of a stretch to extrapolate your experience with your
 lists to top posting being the norm? I am subscribed to several lists and
 bottom posting, proper trimming and commenting inline is the norm there.

 Actually the norm is determined by the list rules. If the list rules say
 one must use bottom posting then one should use bottom posting. If someone
 does not like that then don't subscribe, find another source to ask a
 question (the forum, LUG, hire a consultant) or just bottom post.

 Questions come before answers.
 Answers come after questions.

 -1 against changing rule #5.

 Regards,
 Patrick

  Not really enough time in the day to keep track of different rules for
 all the forums.
 I am more concerned about content than form.

 As long as the questions get answered, I can figure out where it is but it
 is a PITA to scroll down through an e-mail to find out that there is
 nothing there worth reading.
 I get over 100 e-mails per day that make it through my filters. I like to
 read the content as soon as it pops up rather than searching for the text.

 Ron



 --
 __**__**_
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   
 http://lists.digium.com/**mailman/listinfo/asterisk-**usershttp://lists.digium.com/mailman/listinfo/asterisk-users



 --
 Ron Wheeler
 President
 Artifact Software Inc
 email: rwhee...@artifact-software.com
 skype: ronaldmwheeler
 phone: 866-970-2435, ext 102


 --
 __**__**_
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   
 http://lists.digium.com/**mailman/listinfo/asterisk-**usershttp://lists.digium.com/mailman/listinfo/asterisk-users




-- 
James Mortensen
Project Manager, VoiceCurve, Inc.
866-707-4590
james.morten...@voicecurve.com
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Top Posting

2012-12-30 Thread James Mortensen
Sorry for double posting, but I realized it was JIRA I spoke with Digium
about, not Google Groups and the mailing list... However, I do think it's
worth investigating or looking into alternatives that are more user
friendly and that can make it easier to communicate with everyone on the
list, whether a seasoned pro, top poster, or bottom poster.

James

On Sun, Dec 30, 2012 at 6:37 PM, James Mortensen 
james.morten...@voicecurve.com wrote:

 I have an idea! Instead of arguing over whether or not top posting or
 bottom posting is the way to go, something that obviously no one will *
 ever* agree on, why not move to Google Groups instead (or something
 similar to Google Groups).

 When I post to Doubango's list, it's easy, there's no top or bottom
 posting wars, it just works. In fact, in a thread, Google Groups usually
 drops you right to the most recent message, so the people who like top
 posting can still see the most recent message while the bottom posters will
 still see the bottom posting format.

 It's either this, or we can sit and watch intelligent people continue to
 degrade one another and argue over something with no agreement in site. :)

 When I mentioned this before, someone from Digium said this will never
 happen, and it's unfortunate.  Maybe they just like to see people bicker
 and argue.

 If there's a better alternative to Google Groups, or a way to set
 preferences in the mailing list so that everyone is happy, maybe that's
 something that could be done?

 James
 

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Asterisk 11.0.0-rc1 Now Available!

2012-10-08 Thread James Mortensen
://svnview.digium.com/svn/asterisk/branches/11/CHANGES

 For a full list of changes in the current release, please see the
 ChangeLog.


 http://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-11.0.0-rc1

 Thank you for your continued support of Asterisk!


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users




-- 
James Mortensen
Project Manager, VoiceCurve, Inc.
866-707-4590
james.morten...@voicecurve.com
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Asterisk 11 WebSockets.

2012-09-04 Thread James Mortensen
qasimakhan at gmail.com qasimakhan at gmail.com writes:

 
 
 Hi,I was testing with newly introduced websocket support in asterisk 11. I 
have successfully implemented everything except when i try to make a call i get 
no audio. I have tried both SipML5 as well as SIP-JS as clients. the call get 
connected but i never hear any audio stream. I however get the following warning
 
 WARNING[2626][C-]: chan_sip.c:9686 process_sdp: Ignoring video stream 
offer because port number is zero
 
 
 When i turn rtp debug on i can see RTP getting through. 
 
 CLI Output:    http://pastebin.pk/16sip.conf:    
http://pastebin.pk/17http.conf:   http://pastebin.pk/19extensions.conf: 
http://pastebin.pk/20Regards,Qasim
 
 
 --
 _

According to the Asterisk developers, this is an issue in the hands of the 
browser developers. Here is the wiki page on the Asterisk 11 SIP over 
WebSockets:  
https://wiki.asterisk.org/wiki/display/~jcolp/Asterisk+WebRTC+Support

At this time, no media is flowing.

James


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] How to test Websocket support in SIP in Asterisk trunk?

2012-08-22 Thread James Mortensen
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



*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


-- 
James Mortensen
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Websockets on Asterisk 11 and SipML5

2012-08-15 Thread James Mortensen
James Mortensen james.mortensen at a-cti.com writes:

 
 James Mortensen james.mortensen at a-cti.com writes:
 
  
  
  mailsvb mailsvb at gmail.com writes:
  
   
   
   Hi James,
   after applying the patch, I got the 400 bad request message as well...
   This seems to be related to the sipml5 client (same issue with sip-js) 
  generating a wrong request. Take a look at the contact header in the 
REGISTER 
  message.
   
   I was not able to fix the js code to generate the correct request... In 
fact 
  it should look like this (sip:user at local-ip:local-port)
   
   regards,
   Sven
 
  
  Hi Sven,
  
  I know this doesn't fix the sipML5 problem, but I changed line 145 of 
  tsip_transport.js in the sipML5 library from
  
  return df7jal23ls0d.invalid;
  
  to
  
  return 10.x.x.x;
  
  where 10.x.x.x is the local IP where I'm trying to register from.  I am 
 getting 
  a 200 OK from the Asterisk server and am able to connect to it, but I can't 
 make 
  any calls yet.
  
  I'll continue looking at the sipML5 code and will post an update if I get 
  anywhere. 
  
  Thanks again!
  James
  
  --
  _
 
 Hi Sven,
 
 According to the developer of sipML5, the problem is that Asterisk 11 doesn't 
 fully support SIP over WebSockets, which means that the problem is not 
 necessarily in the sipML5 codebase.
 
 See the Doubango thread here, as well as the spec Mamadou cites:
 https://groups.google.com/forum/?fromgroups#!topic/doubango/jNA0dj5zpKM%5B1-
 25%5D
 
 He cited the spec, which indicates that the client is supposed to send 
 df7jal23ls0d.invalid as the domain name, since the client side doesn't 
really 
 know what to send.
 
 The main difference I see between the SIP messages in the spec and my SIP 
 messages is this line:
 
 I have:
 
 Supported: path
 
 Whereas the spec has:
 
 Supported: path, outbound, gruu
 
 Anyone know what these do exactly and whether or not sipML5 needs to send 
 outbound and gruu?  
 
 Thank you,
 James
 
 --
 _


Hello, 

Here is the error that I'm seeing when trying to register my SIP user from 
sipML5 to Asterisk 11:

-
--- (13 headers 0 lines) ---
[Aug 15 17:12:09] ERROR[19510]: netsock2.c:269 ast_sockaddr_resolve: 
getaddrinfo(df7jal23ls0d.invalid, (null), ...): Name or service not known

[Aug 15 17:12:09] WARNING[19510]: chan_sip.c:15314 parse_register_contact: 
Invalid hostport 'df7jal23ls0d.invalid'
[Aug 15 17:12:09] WARNING[19510]: chan_sip.c:16208 register_verify: Failed to 
parse contact info


I also added outbound, gruu to the path header in the SIP message, and this 
doesn't seem to make a difference.

It looks to me like the WebSocket portion of Asterisk is trying to use random 
ports.  Shouldn't it be using the default 8088?  The WebSockets spec seems to 
indicate that WebSockets can use the same port used by the HTTP server, which 
in 
this case is 8088.

Here is the full output with sip set debug on:


  == WebSocket connection from '50.43.101.83:28096' for protocol 'sip' accepted 
using version '13'

--- SIP read from WS:50.43.101.83:28096 ---
REGISTER sip:50.18.243.242 SIP/2.0
Via: SIP/2.0/WS 
df7jal23ls0d.invalid;branch=z9hG4bKxMm2HP4O04PpG6GFaNUt3v5yGGD6k8Fz;rport
From: sip:3002@50.18.243.242;tag=TmFBiD1z4TwDR8EvxHSM
To: sip:3002@50.18.243.242
Contact: 3002
sip:3002@df7jal23ls0d.invalid;transport=ws;expires=200;+g.oma.sip-
im;+audio;language=en,fr
Call-ID: 1c6c4822-3b14-fb84-c2f8-a1af9b32e2c2
CSeq: 35134 REGISTER
Content-Length: 0
Max-Forwards: 70
User-Agent: IM-client/OMA1.0 sipML5/v0.0..0
Organization: Doubango Telecom
Supported: path, outbound, gruu

-
--- (12 headers 0 lines) ---

--- Transmitting (no NAT) to 50.43.101.83:5060 ---
SIP/2.0 401 Unauthorized
Via: SIP/2.0/WS 
df7jal23ls0d.invalid;branch=z9hG4bKxMm2HP4O04PpG6GFaNUt3v5yGGD6k8Fz;rport;receiv
ed=50.43.101.83
From: sip:3002@50.18.243.242;tag=TmFBiD1z4TwDR8EvxHSM
To: sip:3002@50.18.243.242;tag=as300bd165
Call-ID: 1c6c4822-3b14-fb84-c2f8-a1af9b32e2c2
CSeq: 35134 REGISTER
Server: Asterisk PBX 11.0.0-beta1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, 
PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=asterisk, nonce=47868ef3
Content-Length: 0



Scheduling destruction of SIP dialog '1c6c4822-3b14-fb84-c2f8-a1af9b32e2c2' in 
32000 ms (Method: REGISTER)

--- SIP read from WS:50.43.101.83:28096 ---
REGISTER sip:50.18.243.242 SIP/2.0
Via: SIP/2.0/WS 
df7jal23ls0d.invalid;branch=z9hG4bKnpSFmTSk3t1owiThIANGo9cV61xGOfZA;rport
From: sip:3002@50.18.243.242;tag=TmFBiD1z4TwDR8EvxHSM
To: sip:3002@50.18.243.242
Contact: 3002
sip:3002@df7jal23ls0d.invalid;transport=ws;expires=200;+g.oma.sip-
im;+audio;language=en,fr
Call-ID: 1c6c4822-3b14-fb84-c2f8-a1af9b32e2c2
CSeq: 35135 REGISTER
Content-Length: 0
Max-Forwards: 70
Authorization: Digest 
username=3002,realm=asterisk

Re: [asterisk-users] Websockets on Asterisk 11 and SipML5

2012-08-15 Thread James Mortensen
Joshua Colp jcolp at digium.com writes:

 
 Hi James,
 
 I've trimmed the thread down, well, completely. ^_^
 
  From looking at your information and reading the code it looks as 
 though there is a case where this may occur if certain NAT options are 
 enabled. This is certainly a bug as the code should just not execute 
 when WebSocket is involved. For an immediate fix you can set nat=no in 
 the entry in sip.conf. This should change the result and would also 
 explain why this has not been seen by others.
 


Hi Joshua,

I'm still getting the same result. Here is what I have in my sip.conf:


[general]
context=default ; Default context for incoming calls
srvlookup=yes
port=5060
bindaddr=0.0.0.0
;pedantic=no
rtcachefriends=yes
dtmfmode=auto
disallow=all
allow=g729
allow=ulaw ; Allow codecs in order of preference
allow=ilbc
;allow=silk8
allow=gsm
;allow=silk16
;allow=silk24

;nat=force_rport
nat=no
externip=example.org
localnet=10.168.151.65/255.255.254.0
qualify=yes


[3001]
username=3001
secret=x
host=dynamic
type=friend
context=test
transport=ws
nat=no

[3002]
username=3002
secret=x
host=dynamic
type=friend
context=test
transport=ws
nat=no



--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Websockets on Asterisk 11 and SipML5

2012-08-15 Thread James Mortensen
Joshua Colp jcolp at digium.com writes:

 
 James Mortensen wrote:
  Hi Joshua,
 
  I'm still getting the same result.
 
 I apparently flipped a bit mentally. Try nat=yes for kicks. Otherwise 
 place this info on the issue if not already there and I shall attempt to 
 get to it when I can for a deeper inspection.
 

Hi Joshua,

After setting nat=on, force_rport I can now register!  However, the calls 
terminate with a status 488 in the SIP message. I've attached my debug logs 
here:

https://issues.asterisk.org/jira/browse/ASTERISK-20238

James



--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Websockets on Asterisk 11 and SipML5

2012-08-14 Thread James Mortensen
mailsvb mailsvb at gmail.com writes:

 
 
 Hi,
 
 I was facing the very same issue and created a ticket...
 
 
 https://issues.asterisk.org/jira/browse/ASTERISK-20221 
 
 best regards,
 Sven2012/8/13 James Mortensen james.mortensen at a-cti.com
 Andrew Latham lathama at gmail.com writes:
 
  On Mon, Aug 13, 2012 at 2:58 PM, James Mortensen
 
  james.mortensen at a-cti.com wrote:
   Hello,
  
   I'm trying to register a user using sipml5 on Asterisk 11. I followed the
   instructions here:
   http://thr3ads.net/asterisk-users/2012/08/1972342-Asterisk-Websockets
  
   I added transport=ws to my sip.conf file:
  
   [3002]
   username=3002
   secret=X
   host=dynamic
   type=friend
   context=test
   disallow=all
   allow=g729
   ;allow=all                     ; Allow codecs in order of preference
   allow=ilbc
   allow=silk8
   allow=gsm
   transport=ws
  
  
   I also modified the sipml5 library so that the URL looks like this:
   ws://example.org:8088/ws with the /ws at the end, as instructed.
  
   Now, where I get confused is here:
  
   You will need to change sipml5 to use http://hostname or IP address of
  
   Asterisk:8088/ws as the URL. WebSocket is only available on the /ws 
path.
  
  
   Did Joshua mean to say ws:// instead of http://?  Because I'm not aware of
   WebSockets working with http protocols, only ws protocols. Is there
   something I'm missing here?
  
  
  
   The error that I'm getting in the sipml5 client is:  Disconnected: Failed
   to connet to the server  And that typo is not mine.
  
  
  
  
   On the server, here is what I see from a tcpdump. The port appears to be
   open, but I'm not convinced that Asterisk is actually listening for
   WebSocket traffic:
  
  
  
  
   tcpdump -v port 8088
  
  
  
  
   18:57:03.051712 IP (tos 0x0, ttl 243, id 21320, offset 0, flags [DF], 
proto
   TCP (6), length 60)
       static-50-43-101-83.bvtn.or.frontiernet.net.63036 
   ip-10-168-151-65.us-west-1.compute.internal.omniorb: Flags [S], cksum 
0x4f7a
   (correct), seq 4055598050, win 14600, options [mss
   1380,sackOK,nop,nop,nop,nop,nop,nop,nop,nop,nop,nop,nop,nop,nop,nop], 
length
   0
   18:57:03.051758 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP
   (6), length 40)
       ip-10-168-151-65.us-west-1.compute.internal.omniorb 
   static-50-43-101-83.bvtn.or.frontiernet.net.63036: Flags [R.], cksum 
0xeaf4
   (correct), seq 0, ack 4055598051, win 0, length 0
  
  
  
   Is there something else I'm missing?  Please let me know what additional
   information you need from me.
  
   Thank you!
  
   --
   James Mortensen
  
 
  Look to see if the /ws is showing in an http show status
 
  '''
  *CLI http show status
  HTTP Server Status:
  Prefix:
  Server Enabled and Bound to 0.0.0.0:8088
 
  Enabled URI's:
  /httpstatus = Asterisk HTTP General Status
  /phoneprov/... = Asterisk HTTP Phone Provisioning Tool
  /amanager = HTML Manager Event Interface w/Digest authentication
  /uploads = HTTP POST mapping
  /arawman = Raw HTTP Manager Event Interface w/Digest authentication
  /manager = HTML Manager Event Interface
  /rawman = Raw HTTP Manager Event Interface
  /static/... = Asterisk HTTP Static Delivery
  /amxml = XML Manager Event Interface w/Digest authentication
  /mxml = XML Manager Event Interface
  /ws = Asterisk HTTP WebSocket
 
  Enabled Redirects:
    / = /static/admin.html
  *CLI
  '''
 
 Hi Andrew,
 I uncommented enabled=yes in http.conf and now see the /ws = Asterisk HTTP
 WebSocket. I also modified bindaddr=0.0.0.0 as it was previously 127.0.0.1.  I
 can connect and I do see the following output in my Chrome NET tab:
 Request URL:ws://example.org:8088/ws
 Request Method:GET
 Status Code:101 Switching Protocols
 Request Headersview source
 Connection:Upgrade
 Host:example.org:8088
 Origin:http://local:
 Sec-WebSocket-Extensions:x-webkit-deflate-frame
 Sec-WebSocket-Key:fazgtURy132RAFXGRiT9TA==
 Sec-WebSocket-Protocol:sip
 Sec-WebSocket-Version:13
 Upgrade:websocket
 (Key3):00:00:00:00:00:00:00:00
 Response Headersview source
 Connection:Upgrade
 Sec-WebSocket-Accept:fQA1LFnbYFSxFYAr7Ls1Keh54KY=
 Sec-WebSocket-Protocol:sip
 Upgrade:websocket
 (Challenge Response):00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
 However, the Asterisk server dies afterwards and must be restarted. The
 /var/log/messages file has no helpful information; I was tailing it as I made
 one of my connect attempts.
 If it helps, I have a local Asterisk 11 setup in verbose mode, and I did see 
the
 following warning message when trying to connect to it instead:
 *CLI [Aug 13 13:17:39] WARNING[567]: res_http_websocket.c:533
 websocket_callback: WebSocket connection from '127.0.0.1:53845' could not be
 accepted - no protocols out of 'sip' supported
 Also, here is what I see in the Chrome NET tab:  (I hope this doesn't confuse
 the problem. Keep in mind that these are 2 separate Asterisk 11 instances, one
 at example.org and one at 127.0.0.1):
 Request URL:ws://127.0.0.1:8088/ws

Re: [asterisk-users] Websockets on Asterisk 11 and SipML5

2012-08-14 Thread James Mortensen
Andrew Latham lathama at gmail.com writes:

 
 On Tue, Aug 14, 2012 at 1:20 PM, James Mortensen
 james.mortensen at a-cti.com wrote:
  mailsvb mailsvb at gmail.com writes:
 
 
 
  Hi,
 
  I was facing the very same issue and created a ticket...
 
 
  https://issues.asterisk.org/jira/browse/ASTERISK-20221
 
  best regards,
  Sven2012/8/13 James Mortensen james.mortensen at a-cti.com
 
 Michael writes:
 
 James, can you add this to the issue at
 https://issues.asterisk.org/jira/browse/ASTERISK-20221
 


Hi Michael,

I apologize. It looks like the patch did fix the crash. I had two instances of 
Asterisk running, discovered after running ps -C asterisk u.  One must have 
been the previous instance, before applying the patch and recompiling.  

While the server isn't crashing anymore, I'm still getting the 400 Bad Request 
and the 401 Unauthorized when trying to login.  From what I hear, this could be 
something that needs to be modified in the sipML5 library itself. Thus, I'll 
see 
what I can find. If anyone knows why I'm getting the unauthorized and bad 
requests, please let me know.  I'll update the mailing list as well. 

Thanks again!
James


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Websockets on Asterisk 11 and SipML5

2012-08-14 Thread James Mortensen

mailsvb mailsvb at gmail.com writes:

 
 
 Hi James,
 after applying the patch, I got the 400 bad request message as well...
 This seems to be related to the sipml5 client (same issue with sip-js) 
generating a wrong request. Take a look at the contact header in the REGISTER 
message.
 
 I was not able to fix the js code to generate the correct request... In fact 
it should look like this (sip:user at local-ip:local-port)
 
 regards,
 Sven
 2012/8/14 James Mortensen james.mortensen at a-cti.com
 Andrew Latham lathama at gmail.com writes:
 
 
  On Tue, Aug 14, 2012 at 1:20 PM, James Mortensen
 
  james.mortensen at a-cti.com wrote:
   mailsvb mailsvb at gmail.com writes:
  
  
  
   Hi,
  
   I was facing the very same issue and created a ticket...
  
  
   https://issues.asterisk.org/jira/browse/ASTERISK-20221
  
   best regards,
   Sven2012/8/13 James Mortensen james.mortensen at a-cti.com


Hi Sven,

I know this doesn't fix the sipML5 problem, but I changed line 145 of 
tsip_transport.js in the sipML5 library from

return df7jal23ls0d.invalid;

to

return 10.x.x.x;

where 10.x.x.x is the local IP where I'm trying to register from.  I am getting 
a 200 OK from the Asterisk server and am able to connect to it, but I can't 
make 
any calls yet.

I'll continue looking at the sipML5 code and will post an update if I get 
anywhere. 

Thanks again!
James


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Websockets on Asterisk 11 and SipML5

2012-08-13 Thread James Mortensen
Hello,

I'm trying to register a user using sipml5 on Asterisk 11. I followed the
instructions here:
http://thr3ads.net/asterisk-users/2012/08/1972342-Asterisk-Websockets

I added transport=ws to my sip.conf file:

[3002]
username=3002
secret=X
host=dynamic
type=friend
context=test
disallow=all
allow=g729
;allow=all ; Allow codecs in order of preference
allow=ilbc
allow=silk8
allow=gsm
transport=ws


I also modified the sipml5 library so that the URL looks like this:  ws://
example.org:8088/ws with the /ws at the end, as instructed.

Now, where I get confused is here:

You will need to change sipml5 to use http://hostname or IP address of

Asterisk:8088/ws as the URL. WebSocket is only available on the /ws path.


Did Joshua mean to say ws:// instead of http://?  Because I'm not
aware of WebSockets working with http protocols, only ws protocols. Is
there something I'm missing here?



The error that I'm getting in the sipml5 client is:  *Disconnected:
**Failed to connet to the server  *And that typo is not mine.


On the server, here is what I see from a tcpdump. The port appears to
be open, but I'm not convinced that Asterisk is actually listening for
WebSocket traffic:


tcpdump -v port 8088


18:57:03.051712 IP (tos 0x0, ttl 243, id 21320, offset 0, flags [DF],
proto TCP (6), length 60)
static-50-43-101-83.bvtn.or.frontiernet.net.63036 
ip-10-168-151-65.us-west-1.compute.internal.omniorb: Flags [S], cksum
0x4f7a (correct), seq 4055598050, win 14600, options [mss
1380,sackOK,nop,nop,nop,nop,nop,nop,nop,nop,nop,nop,nop,nop,nop,nop],
length 0
18:57:03.051758 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto
TCP (6), length 40)
ip-10-168-151-65.us-west-1.compute.internal.omniorb 
static-50-43-101-83.bvtn.or.frontiernet.net.63036: Flags [R.], cksum
0xeaf4 (correct), seq 0, ack 4055598051, win 0, length 0



Is there something else I'm missing?  Please let me know what additional
information you need from me.

Thank you!

-- 
James Mortensen
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Websockets on Asterisk 11 and SipML5

2012-08-13 Thread James Mortensen
Andrew Latham lathama at gmail.com writes:

 
 On Mon, Aug 13, 2012 at 2:58 PM, James Mortensen
 james.mortensen at a-cti.com wrote:
  Hello,
 
  I'm trying to register a user using sipml5 on Asterisk 11. I followed the
  instructions here:
  http://thr3ads.net/asterisk-users/2012/08/1972342-Asterisk-Websockets
 
  I added transport=ws to my sip.conf file:
 
  [3002]
  username=3002
  secret=X
  host=dynamic
  type=friend
  context=test
  disallow=all
  allow=g729
  ;allow=all ; Allow codecs in order of preference
  allow=ilbc
  allow=silk8
  allow=gsm
  transport=ws
 
 
  I also modified the sipml5 library so that the URL looks like this:
  ws://example.org:8088/ws with the /ws at the end, as instructed.
 
  Now, where I get confused is here:
 
  You will need to change sipml5 to use http://hostname or IP address of
 
  Asterisk:8088/ws as the URL. WebSocket is only available on the /ws path.
 
 
  Did Joshua mean to say ws:// instead of http://?  Because I'm not aware of
  WebSockets working with http protocols, only ws protocols. Is there
  something I'm missing here?
 
 
 
  The error that I'm getting in the sipml5 client is:  Disconnected: Failed
  to connet to the server  And that typo is not mine.
 
 
 
 
  On the server, here is what I see from a tcpdump. The port appears to be
  open, but I'm not convinced that Asterisk is actually listening for
  WebSocket traffic:
 
 
 
 
  tcpdump -v port 8088
 
 
 
 
  18:57:03.051712 IP (tos 0x0, ttl 243, id 21320, offset 0, flags [DF], proto
  TCP (6), length 60)
  static-50-43-101-83.bvtn.or.frontiernet.net.63036 
  ip-10-168-151-65.us-west-1.compute.internal.omniorb: Flags [S], cksum 0x4f7a
  (correct), seq 4055598050, win 14600, options [mss
  1380,sackOK,nop,nop,nop,nop,nop,nop,nop,nop,nop,nop,nop,nop,nop,nop], length
  0
  18:57:03.051758 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP
  (6), length 40)
  ip-10-168-151-65.us-west-1.compute.internal.omniorb 
  static-50-43-101-83.bvtn.or.frontiernet.net.63036: Flags [R.], cksum 0xeaf4
  (correct), seq 0, ack 4055598051, win 0, length 0
 
 
 
  Is there something else I'm missing?  Please let me know what additional
  information you need from me.
 
  Thank you!
 
  --
  James Mortensen
 
 
 Look to see if the /ws is showing in an http show status
 
 '''
 *CLI http show status
 HTTP Server Status:
 Prefix:
 Server Enabled and Bound to 0.0.0.0:8088
 
 Enabled URI's:
 /httpstatus = Asterisk HTTP General Status
 /phoneprov/... = Asterisk HTTP Phone Provisioning Tool
 /amanager = HTML Manager Event Interface w/Digest authentication
 /uploads = HTTP POST mapping
 /arawman = Raw HTTP Manager Event Interface w/Digest authentication
 /manager = HTML Manager Event Interface
 /rawman = Raw HTTP Manager Event Interface
 /static/... = Asterisk HTTP Static Delivery
 /amxml = XML Manager Event Interface w/Digest authentication
 /mxml = XML Manager Event Interface
 /ws = Asterisk HTTP WebSocket
 
 Enabled Redirects:
   / = /static/admin.html
 *CLI
 '''
 

Hi Andrew,

I uncommented enabled=yes in http.conf and now see the /ws = Asterisk HTTP 
WebSocket. I also modified bindaddr=0.0.0.0 as it was previously 127.0.0.1.  I 
can connect and I do see the following output in my Chrome NET tab:

Request URL:ws://example.org:8088/ws
Request Method:GET
Status Code:101 Switching Protocols
Request Headersview source
Connection:Upgrade
Host:example.org:8088
Origin:http://local:
Sec-WebSocket-Extensions:x-webkit-deflate-frame
Sec-WebSocket-Key:fazgtURy132RAFXGRiT9TA==
Sec-WebSocket-Protocol:sip
Sec-WebSocket-Version:13
Upgrade:websocket
(Key3):00:00:00:00:00:00:00:00
Response Headersview source
Connection:Upgrade
Sec-WebSocket-Accept:fQA1LFnbYFSxFYAr7Ls1Keh54KY=
Sec-WebSocket-Protocol:sip
Upgrade:websocket
(Challenge Response):00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00


However, the Asterisk server dies afterwards and must be restarted. The 
/var/log/messages file has no helpful information; I was tailing it as I made 
one of my connect attempts.

If it helps, I have a local Asterisk 11 setup in verbose mode, and I did see 
the 
following warning message when trying to connect to it instead:

*CLI [Aug 13 13:17:39] WARNING[567]: res_http_websocket.c:533 
websocket_callback: WebSocket connection from '127.0.0.1:53845' could not be 
accepted - no protocols out of 'sip' supported


Also, here is what I see in the Chrome NET tab:  (I hope this doesn't confuse 
the problem. Keep in mind that these are 2 separate Asterisk 11 instances, one 
at example.org and one at 127.0.0.1):

Request URL:ws://127.0.0.1:8088/ws
Request Headersview source
Connection:Upgrade
Cookie:__utma=96992031.124949559.1343691697.1343691697.1343691697.1; 
__utmz=96992031.1343691697.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
Host:127.0.0.1:8088
Origin:http://local:
Sec-WebSocket-Extensions:x-webkit-deflate-frame
Sec-WebSocket-Key:UnhnlavzW/Gk6mwJMdLU/w==
Sec-WebSocket-Protocol:sip
Sec-WebSocket