compatibility issues with asterisk and Chrome

81 views
Skip to first unread message

Rahul Nair

unread,
Jan 14, 2014, 9:27:32 AM1/14/14
to doub...@googlegroups.com
Hi,

I installed Asterisk 11.7.0 from source. I then proceeded to create 2 users and the Asterisk configuration was quite simple:


sip.conf
-----------

[general]
context=unauthenticated
allowguest=yes
srvlookup=no
udpbindaddr=0.0.0.0:5060
tcpenable=no
nat=force_rport,comedia
qualifyfreq=60                  ; probe far end peer every 60 seconds
qualify=120000                  ; allow 10 seconds for a reply (qualify)
callcounter=yes
realm=172.16.2.21
transport=udp,ws,wss
allowexternaldomains=yes

[sip_phone_template](!)
type=friend
context=LocalPhones
host=dynamic
nat=force_rport,comedia
dtmfmode=auto
avpf=yes
icesupport=yes
hassip=yes
encryption=yes
videosupport=no
directmedia=no
allow=all

[Exten1001](sip_phone_template)
Callerid="Exten1001" <1001>
secret=test123

[Exten1002](sip_phone_template)
Callerid="Exten1002" <1002>
secret=test123



And my extensions.conf too, is a simple one:

[globals]

PEX_ONE=Exten1001
PEX_TWO=Exten1002
PEX_THREE=Exten1003

[macro-DialStartMonitor]
; Calculate the time of the call from "epoch time", format it into yyyy-mm-dd and add the PhoneExt. at the end
exten => s,1,Set(MONITOR_FILENAME=${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}-FROM-${CALLERID(num)}-TO-${ARG1})
        same => n,MixMonitor(${MONITOR_FILENAME}.wav,b)
        ;b - Only save audio to the file while the channel is bridged. *does not include conferences*

[LocalPhones]
exten => 1001,1,noop(Dialing ${PEX_ONE})
        same => n,Macro(DialStartMonitor,${PEX_ONE})
        same => n,Dial(SIP/${PEX_ONE},30,mTt)
        same => n,Playback(vm-nobodyavail)      ; Play "no one's available"
        same => n,Hangup()

exten => 1002,1,noop(Dialing ${PEX_TWO})
        same => n,Macro(DialStartMonitor,${PEX_TWO})
        same => n,Dial(SIP/${PEX_TWO},30,mTt)
        same => n,Playback(vm-nobodyavail)      ; Play "no one's available"
        same => n,Hangup()


I then proceeded to download SipML5 and save it under /var/www/html. My Chrome browser version was 30.0.1599.114.

My issue is two-fold:
  1. I am able to make calls between 2 softphones successfully without any issues - I've tried this on Linphone and Zoiper. However, as soon as I add "encryption=yes" and "avpf=yes", I cannot make calls between the sip phones.
  2. For the longest time I could only make calls the browser to the softphone; and from softphone to softphone (using the configuration above). Whenever, I tried a browser to browser call, it woulod fail when I tried to pick up and give me the following error "got sip response 603 failed to get local sdp local machine". then I upgraded my Google Chrome to 31.0.1650.63. That was when I could start making calls from browser to browser - with the options
    "encryption=yes" and "avpf=yes" in sip.conf.

How do I ensure backward compatibility for browsers? When I tried SipML5's demo for the first time, it was from Chrome browser version was 30.0.1599.114. It worked at the time but didn't work for my local Asterisk installation.

Is something other that Asterisk being used for the demo? Some other technology that I don't know about?

Furthermore, I want to be able to make and receive calls from my browser irrespective of the browser versions (of course, within limits - I mean I of course am not going to use Chrome 8.x or something that old). How do I achieve this compatibility?

Lastly, How can I manage the arguments in the sip.conf file such that I can make/receive calls in the following scenarios:

  • browser to browser
  • browser to softphone
  • softphone to browser
  • softphone to softphone

I do understand that you may be reluctant in answering the Asterisk related questions - I am simply looking for a nudge in the right direction which will help me fix my box and allow calls between 2 people.

navaismo

unread,
Jan 15, 2014, 6:48:13 PM1/15/14
to doub...@googlegroups.com
avpf=yes, icesupport=yes are settings valid for a peer using websockets, you can't use the same config for phones/softphones and ws clients. In the other hand encryption=yes is valid for some phones, but you need to configure it.

If you want to use the same config for ws,wss and sip clients then install the webrtc2sip media gateway.
Reply all
Reply to author
Forward
0 new messages