<div dir="ltr">Hi Andrea,<br><div class="gmail_extra"><br><br><div class="gmail_quote">2013/6/5 Andrea Suisani <span dir="ltr"><<a href="mailto:sickpig@opinioni.net" target="_blank">sickpig@opinioni.net</a>></span><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">On 06/05/2013 03:07 PM, Andrea Suisani wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
On 06/05/2013 12:45 PM, Lorenzo Miniero wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
2013/6/5 Andrea Suisani <<a href="mailto:sickpig@opinioni.net" target="_blank">sickpig@opinioni.net</a> <mailto:<a href="mailto:sickpig@opinioni.net" target="_blank">sickpig@opinioni.net</a>>><br>
</blockquote>
<br>
[cut]<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
as I already said this fix solve the issue we had.<br>
<br>
the tests we made are related to this configuration:<br>
<br>
(sip+opus) (iax/sip+g729)<br>
WebRTC -----------> Asterisk -----------------> pstn/mobile<br>
(A) (B)<br>
<br>
I know that there is no ad-hoc Opus configuration yet,<br>
but I'm trying to measure the bandwidth of the call opus leg (A).<br>
<br>
I've used iftop to get a rough measure, catching only udp<br>
packets. the iftop instance was executed on the same host<br>
where asterisk is running catching packets only on the net<br>
interface to which asterisk is bind to.<br>
<br>
While using opus the A leg bandwidth is something like 50/55 kb/s,<br>
from the webrtc client to the asterisk, while something along<br>
100kb/s from asterisk to client. is it normal?<br>
<br>
<br>
Opus is conceived to be able to transparently switch rate during a call. In the code I made sure that<br>
the encoding would take note of the peer sampling rate, in order to cap it in Opus as well. This means that,<br>
</blockquote>
> if you're talking to a GSM/ulaw/g729 peer, Opus itself should be "capped" at 8kHz as<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
there would be no need for a higher sampling rate to transport the audio.<br>
</blockquote></blockquote>
<br></div>
[cut explanation of a maybe false theory]<br>
<br>
scratch what I said before.<br>
<br>
I've reproduced the behavior (use 48kHz instead of 8kHz) with a plain and simple<br>
webrtc client (a local copy of <a href="http://tryit.jssip.net/" target="_blank">http://tryit.jssip.net/</a>) and I've tried to place<br>
a call without using AMI Originate through a simple dialplan Dial and I got the same<br>
result, this is the console log<br>
<br></blockquote><div><br></div><div style>The same scenario, in my setup, works fine: a browser calling a softphone using a narrowband codec (e.g., u-Law) is capped to 8kHz, opus<->8000.</div><div style><br></div>
<div style>I guess the only difference between our scenarios (except for the several MACROS that are not in my test extension) is the protocol: in my extensions, only SIP is involved, and not IAX2. This may be what is causing the issue, as recently someone posted a similar problem on github:</div>
<div style><br></div><div style><a href="https://github.com/meetecho/asterisk-opus/issues/1#issuecomment-18926261">https://github.com/meetecho/asterisk-opus/issues/1#issuecomment-18926261</a><br></div><div style><br></div>
<div style>Unfortunately I'm unfamiliar with IAX, so I don't know how codecs are negotiated and the related translation paths put in place for a call.</div><div style><br></div><div style>Lorenzo</div><div style><br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
suino*CLI> opus set debug huge<br>
Opus debugging huge<br>
== Using SIP RTP CoS mark 5<br>
[Jun 5 17:17:56] WARNING[31818][C-00000000]: chan_sip.c:11101 process_sdp_a_audio: Got Opus minptime=10<br>
-- Executing [93XX5XXXXX@iaxtest:1] Set("SIP/1060-00000000", "__session=") in new stack<br>
-- Executing [93XX5XXXXX@iaxtest:2] Set("SIP/1060-00000000", "__numero=3XX5XXXXX") in new stack<br>
-- Executing [93XX5XXXXX@iaxtest:3] Set("SIP/1060-00000000", "__prefix=9") in new stack<br>
-- Executing [93XX5XXXXX@iaxtest:4] Macro("SIP/1060-00000000", "choose-provider,9") in new stack<br>
-- Executing [s@macro-choose-provider:1] NoOp("SIP/1060-00000000", "9") in new stack<br>
-- Executing [s@macro-choose-provider:2] Set("SIP/1060-00000000", "GLOBAL(PROVIDER)=IAX2/<u></u>myprovider") in new stack<br>
== Setting global variable 'PROVIDER' to 'IAX2/myprovider'<br>
-- Executing [s@macro-choose-provider:3] Set("SIP/1060-00000000", "GLOBAL(PROVIDER)=IAX2/<u></u>myprovider") in new stack<br>
== Setting global variable 'PROVIDER' to 'IAX2/myprovider'<br>
-- Executing [s@macro-choose-provider:4] Set("SIP/1060-00000000", "GLOBAL(PROVIDER)=IAX2/<u></u>myprovider") in new stack<br>
== Setting global variable 'PROVIDER' to 'IAX2/myprovider'<br>
-- Executing [s@macro-choose-provider:5] Set("SIP/1060-00000000", "GLOBAL(PROV_NOCHAN)=<u></u>myprovider") in new stack<br>
== Setting global variable 'PROV_NOCHAN' to 'myprovider'<br>
-- Executing [s@macro-choose-provider:6] Set("SIP/1060-00000000", "GLOBAL(PROV_CHAN)=IAX2") in new stack<br>
== Setting global variable 'PROV_CHAN' to 'IAX2'<br>
-- Executing [93XX5XXXXX@iaxtest:5] NoOp("SIP/1060-00000000", "IAX2/myprovider") in new stack<br>
-- Executing [93XX5XXXXX@iaxtest:6] NoOp("SIP/1060-00000000", "myprovider") in new stack<br>
-- Executing [93XX5XXXXX@iaxtest:7] NoOp("SIP/1060-00000000", "IAX2") in new stack<br>
-- Executing [93XX5XXXXX@iaxtest:8] GotoIf("SIP/1060-00000000", "1?diax:dsip") in new stack<br>
-- Goto (iaxtest,93XX5XXXXX,9)<br>
-- Executing [93XX5XXXXX@iaxtest:9] GotoIf("SIP/1060-00000000", "0?backupadsl:dial") in new stack<br>
-- Goto (iaxtest,93XX5XXXXX,11)<br>
-- Executing [93XX5XXXXX@iaxtest:11] SendText("SIP/1060-00000000", "VOIP") in new stack<br>
-- Executing [93XX5XXXXX@iaxtest:12] Set("SIP/1060-00000000", "CHANNEL(userfield)=") in new stack<br>
-- Executing [93XX5XXXXX@iaxtest:13] Set("SIP/1060-00000000", "DYNAMIC_FEATURES=testfeature#<u></u>listensergiu#listensergiu2") in new stack<br>
-- Executing [93XX5XXXXX@iaxtest:14] Dial("SIP/1060-00000000", "IAX2/myprovider/3XX5XXXXX,22)<u></u>") in new stack<br>
-- Called IAX2/myprovider/3XX5XXXXX<br>
[Opus] Created encoder #3 (48000->opus)<br>
[Opus] Created decoder #6 (opus->48000)<br>
-- Call accepted by MY.PRO.VIDER.IP (format g729)<div class="im"><br>
-- Format for call is (g729)<br></div>
-- IAX2/myprovider-2277 is making progress passing it to SIP/1060-00000000<br>
[Opus] [Encoder #3 (48000)] 960 samples, 1920 bytes<br>
[Opus] [Encoder #3 (48000)] >> Got 960 samples, 220 bytes<br>
[Opus] [Encoder #3 (48000)] 960 samples, 1920 bytes<br>
[Opus] [Encoder #3 (48000)] >> Got 960 samples, 119 bytes<br>
[Opus] [Encoder #3 (48000)] 960 samples, 1920 bytes<br>
[Opus] [Encoder #3 (48000)] >> Got 960 samples, 119 bytes<br>
[Opus] [Encoder #3 (48000)] 960 samples, 1920 bytes<br>
[Opus] [Encoder #3 (48000)] >> Got 960 samples, 125 bytes<br>
[Opus] [Encoder #3 (48000)] 960 samples, 1920 bytes<br>
[Opus] [Encoder #3 (48000)] >> Got 960 samples, 123 bytes<br>
[Opus] [Encoder #3 (48000)] 960 samples, 1920 bytes<br>
[Opus] [Encoder #3 (48000)] >> Got 960 samples, 124 bytes<br>
[Opus] [Encoder #3 (48000)] 960 samples, 1920 bytes<br>
[Opus] [Encoder #3 (48000)] >> Got 960 samples, 123 bytes<br>
[Opus] [Encoder #3 (48000)] 960 samples, 1920 bytes<br>
[Opus] [Encoder #3 (48000)] >> Got 960 samples, 185 bytes<br>
[Opus] [Encoder #3 (48000)] 960 samples, 1920 bytes<br>
[Opus] [Encoder #3 (48000)] >> Got 960 samples, 119 bytes<br>
[Opus] [Encoder #3 (48000)] 960 samples, 1920 bytes<br>
[Opus] [Encoder #3 (48000)] >> Got 960 samples, 118 bytes<br>
[Opus] [Encoder #3 (48000)] 960 samples, 1920 bytes<br>
[Opus] [Encoder #3 (48000)] >> Got 960 samples, 120 bytes<br>
[Opus] [Encoder #3 (48000)] 960 samples, 1920 bytes<br>
[Opus] [Encoder #3 (48000)] >> Got 960 samples, 120 bytes<br>
[Opus] [Encoder #3 (48000)] 960 samples, 1920 bytes<br>
[Opus] [Encoder #3 (48000)] >> Got 960 samples, 120 bytes<br>
<br>
</blockquote></div><br></div></div>