[asterisk-users] Websockets on Asterisk 11 and SipML5

James Mortensen james.mortensen at a-cti.com
Mon Aug 13 13:58:59 CDT 2012


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=XXXXXXXXX
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120813/e8c07a94/attachment.htm>


More information about the asterisk-users mailing list