Opus codec deploy in asterik made unable to call establish - asterisk

I was running a asterisk 11.5 with no error. After installed Opus codec with patch in my asterisk
btw i am using browser based sip softphone jssip
Now whenever I am making audio call between 2 peer, no call is getting establish and throwing below errors:
btw i am using browser based sip softphone jssip
[Sep 29 09:27:36] WARNING[17065][C-00000003]: sip/sdp_crypto.c:173 sdp_crypto_activate: Could not set SRTP policies
[Sep 29 09:27:36] WARNING[17065][C-00000003]: sip/sdp_crypto.c:173 sdp_crypto_activate: Could not set SRTP policies
[Sep 29 09:27:36] WARNING[17065][C-00000003]: chan_sip.c:11100 process_sdp_a_audio: Got Opus minptime=10
[Sep 29 09:27:36] WARNING[17065][C-00000003]: chan_sip.c:10437 process_sdp: Rejecting secure audio stream without encryption details: audio 17002 RTP/SAVPF 111 103 104 0 8 106 105 13 126
[1000]
secret=test123
context=local
host=dynamic
trustrpid=yes
sendrpid=no
type=friend
qualify=yes
qualifyfreq=600
transport=udp,wss,ws
encryption=yes
dial=SIP/8000
callerid=testuser <8000>
callcounter=yes
avpf=yes
icesupport=yes
directmedia=no
Can any one cooperate?

Use tcpdump or wireshark to look at the packets, and make sure that they're actually encrypted packets. I looks like it may be rejecting them because it's not SRTP. However, that is only an educated guess. Additionally at the asterisk command line you might want to look at rtp set debug on.
You may look to Asterisk 12 for Opus support, where it will be officially supported, or so it seems from the development activity for Asterisk 12.
Here's the reference to the issue and discussion of the fix. And you can see that it's been approved by the review board here.
I, too, am interested in using Opus. However, without knowing what patch you are using, and the stability of said patch -- it may be difficult (and rather time consuming) to give specific instruction here. I would recommend reporting the issue to the person/group who released the patch as it may help the community project (if it is such).

Related

Audio issues with asterisk 13

I have two extensions registered to asterisk (asterisk has a real IP), both of them behind NAT, and every one of them belong to a different LAN network.
The SIP work just fine (i.e: the extensions can call each other), but there is no voice at all.
I configure natting and media in sip.conf in asterisk as follow:
nat=force_rtp,comedia
directrtpsetup=yes
Note: when i put the extensions in the same NAT, there is no problem, both SIP and RTP work just fine.
does anybody knows what is the problem or how to solve it?
thanks in advance.
Asterisk 1.8: The 'nat' option has now been been changed to have yes,
no, force_rport, and comedia as valid values. Setting it to yes forces
RFC 3581 behavior and enables symmetric RTP support. Setting it to no
only enables RFC 3581 behavior if the remote side requests it and
disables symmetric RTP support. Setting it to force_rport forces RFC
3581 behavior and disables symmetric RTP support. Setting it to
comedia enables RFC 3581 behavior if the remote side requests it and
enables symmetric RTP support.
force_rtp is not valid option. Force_rport,comedia are mutially exclusive options.
Directrtpsetup most likly will not work if both clients NATed.
thanks, idescovered the problem and its solution.
first of all, the wright NAT options are:
nat=force_rport,comedia
second, the wright media option is:
directmedia=no
my problem was related to opened port, in rtp.conf i put:
rtpstart=1111
rtpend=2222
but in the server the range of the opened port is {44444 --> 55555}
and because of that there wasn't voice between the callee and the caller.

SipML5 and Asterisk returning 488 in makeCall

Trying to make a videoaudio call with SipML5 and Asterisk13, one user in Chorme and the other Firefox, but right after "Ringing"(180) the caller receives "Not acceptable here"(488).
Asterisk messages:
[Jan 23 11:38:27] NOTICE[11127][C-00000004] chan_sip.c: Received AVP profile in audio answer but AVPF is enabled, disabling: audio 36436 RTP/AVP 111 8 0 101
[Jan 23 11:38:27] WARNING[11127][C-00000004] chan_sip.c: We are requesting SRTP for audio, but they responded without it!
So about the 488 I found in several pages:
488 Not Acceptable Here -
The response has the same meaning as 606 (Not Acceptable), but only applies to the specific resource addressed by the Request-URI and the request may succeed elsewhere.
A message body containing a description of media capabilities MAY be present in the response, which is formatted according to the Accept header field in the INVITE (or application/sdp if not present), the same as a message body in a 200 (OK) response to an OPTIONS request.
and
You have not enabled AVPF support in the peer, user, or friend entry using "avpf=yes" or have not allowed a codec that is supported by the caller.
but I did't found anywhere a way to fix this. Yep, noob in SIP.
The best i tried was to change my peer in sip.conf (add the avpf=true), but not even the asterisk messages changed.
Is it a codec problem? If so, how do I change for one that works in this case?
If not, whats going on here? Kinda loosing my mind already. ^^"
Probably, Asterisk is following the RFC's and you need to use SAVP / SAVPF profiles when negotiating secure SRTP sessions.

Asterisk trunk, chrome 36, issue with WebRTC

I'm trying to get Asterisk yesterday's trunk and Chrome 36 via WebRTC. The websocket connection is established and the client registers correctly, but when I try to make a call from the browser, I get this message from Asterisk:
chan_sip.c:10535 process_sdp: Rejecting secure audio stream without encryption details: audio 35348 UDP/TLS/RTP/SAVPF 111 103 104 0 8 106 105 13 126
I have followed https://wiki.asterisk.org/wiki/display/AST/WebRTC+tutorial+using+SIPML5 and https://wiki.asterisk.org/wiki/display/AST/Secure+Calling+Tutorial (although admittedly I'm not able to import in Chrome the .pem client certificate, but I'm not sure it's needed. I have imported the server certificate though)
I also tried with the 11.11.0 version but I'm getting the same result.
Help is appreciated!
have you tried using an older version of Chrome? We had everything working till we upgraded to Chrome 36. Peers succeded in registering and composing a call, but as soon as the other party answered, the call died.
After some research of which I unfortunately am not able to provide links, we realized that that Chrome update messed things up.
We are now compelled to use the version 34.0.1847.137m which works for us. Give it a try.

Call and hangup using Asterisk as a SIP client

I'm a newbie in Asterisk, so I'm gonna start with something simple.
I read some documentation and I've managed to do some basic config.
My Asterisk version is 1.6.2.9-2+squeeze10 (installed on Debian using apt-get) and changed ONLY sip.conf and extensions.conf.
My idea is to use it as a SIP client, connected to the Flowroute SIP server - but please see what's happening when I use console dial EXTEN...
sip.conf
[general]
register => 74770000:HIDDEN#sip.flowroute.com/s
registertimeout=20
context=default
allowoverlap=no
bindport=5060
bindaddr=0.0.0.0
srvlookup=no
subscribecontext=from-sip
[flowroute]
canreinvite=no
username=74770000
fromuser=74770000
secret=HIDDEN
context=default
type=friend
fromdomain=sip.flowroute.com
host=85.17.214.222
dtmfmode=rfc2833
disallow=all
allow=alaw
allow=ulaw
nat=yes
insecure=very
extensions.conf
[default]
exten => _XXXXXXXXXXXXXX,1,Dial(SIP/flowroute/${EXTEN})
;exten => _XXXXXXXXXXXXXX,2,Hangup
sip show users
loreen*CLI> sip show users
Username Secret Accountcode Def.Context ACL NAT
flowroute HIDDEN default No Always
sip show peers
loreen*CLI> sip show peers
Name/username Host Dyn Nat ACL Port Status
flowroute/74771200 85.17.214.227 N 5060 Unmonitored
1 sip peers [Monitored: 1 online, 0 offline Unmonitored: 0 online, 0 offline]
console dial EXTEN
loreen*CLI> console dial 00359891505054
[Jun 14 16:44:27] WARNING[14031]: chan_oss.c:486 setformat: Unable to re-open DSP device /dev/dsp: No such file or directory
[Jun 14 16:44:28] NOTICE[14031]: console_video.c:133 console_video_start: voice only, console video support not present
[Jun 14 16:44:28] WARNING[14033]: app_dial.c:1714 dial_exec_full: Skipping dialing interface 'SIP/flowroute/00359891505054' again since it has already been dialed
Unfortunately, Asterisk 1.6.2 was made end-of-life in april 2012, and it doesn't seem this feature is still supported, and using a sound card with Asterisk isn't the most common use-case.
Installing Asterisk from source is rather easy, and also rather clean (make uninstall will sufficiently clean it out). I highly recommend it, as it allows you to stay ahead of the game (with security and feature releases). Try it with ./configure and then make menuselect (you'll need ncurses libraries) for a really nice build interface.
While trying to test dial outbound calls on your SIP trunk (to test it's connectivity), I would recommend using the channel originate function at the CLI.
For help:
asterisk*CLI> core show help channel originate
A specific device and parameter string using your setup:
asterisk*CLI> channel originate SIP/flowroute/00359891505054 application Playback tt-monkeys
Note: This will play the sound of screaming monkeys to the called party!
Also -- if you're a smart phone user, it's rather convenient to have a softphone hooked up as an extension to test your trunks, new dialplans, etc. (Although I'll always do my initial tests with channel originate)
Lastly -- but equally importantly... I realize this is a test scenario, but... As you bring this forward; I'd avoid directly dialing your ITSP with the dialed extension from the [default] context. This could, if not otherwise configured properly, leave you open to toll-fraud via the fact that asterisk defaults call attempts to this context if the context is otherwise unknown.

Asterisk + NAT. Either get called or be called

My Asterisk set up is as follows:
- I have 2 grandstream GXP 2000 phones connected to my router
- My small linux server (with asterisk) is connected to the router as well
I have a dynamic ip from my isp provider, but I signed up for DynDNS
When I started I could call people and talk to them. If people rang me, the phone would ring, and I could hear them speak. They could not hear me. I found out this was because of the directmedia / canreinvite setting. So I set this to:
canreinvite=no
directmedia=no
Now, people could call me and I could answer. However, due to this change I can call people, but as soon as they answer, I can't hear them, I only hear static. When I remove the two lines I add, everything is back as it was before.
What could be the issue ? The 5060 port is forwarded to my server ,as well as the 1000 - 2000 udp rang.
Regards,
Digits
First of all, you should probably read the sip.conf.sample file delivered with Asterisk. Specifically, read the NAT SUPPORT section. canreinvite and directmedia (which are the same setting by the way) attempt to set up the RTP streams directly between the UAs involved in a call, bypassing Asterisk. Thus, while that setting is affected by NAT, it does not necessarily control the channel driver behavior with respect to NAT - so its not surprising you're still having issues.
Without knowing whether or not the UAs in question are sending rport, its difficult to know for sure what your settings should be. That being said, based on your problem description, you may want to set the 'nat' parameter in your [general] section to either:
nat = force_rport,comedia
; or, depending your version
nat = yes
Note that you can set nat on a peer by peer basis, but that's discouraged for security reasons.
Additionally, you may also need to explore the extern* settings, such as externhost.
Ok, some information for other people in the same situation:
- check your codecs, make sure you get no errors in the Asterisk CLI (command line interface). I got errors, but it worked, so I didn't care. That was a mistake
- upgrade to asterisk 1.8
- set directmedia = no
- it's upd range 10000 to 20000 (I missed a 0).
This all fixed this problem.

Resources