[asterisk-dev] Opus and VP8

Andrea Suisani sickpig at opinioni.net
Wed Jun 5 10:29:01 CDT 2013


On 06/05/2013 03:07 PM, Andrea Suisani wrote:
> On 06/05/2013 12:45 PM, Lorenzo Miniero wrote:
>> 2013/6/5 Andrea Suisani <sickpig at opinioni.net <mailto:sickpig at opinioni.net>>
>
> [cut]
>
>>     as I already said this fix solve the issue we had.
>>
>>     the tests we made are related to this configuration:
>>
>>              (sip+opus)             (iax/sip+g729)
>>     WebRTC ----------->  Asterisk -----------------> pstn/mobile
>>                (A)                      (B)
>>
>>     I know that there is no ad-hoc Opus configuration yet,
>>     but I'm trying to measure the bandwidth of the call opus leg (A).
>>
>>     I've used iftop to get a rough measure, catching only udp
>>     packets. the iftop instance was executed on the same host
>>     where asterisk is running catching packets only on the net
>>     interface to which asterisk is bind to.
>>
>>     While using opus the A leg bandwidth is something like 50/55 kb/s,
>>     from the webrtc client to the asterisk, while something along
>>     100kb/s from asterisk to client. is it normal?
>>
>>
>> Opus is conceived to be able to transparently switch rate during a call. In the code I made sure that
>> the encoding would take note of the peer sampling rate, in order to cap it in Opus as well. This means that,
>  > if you're talking to a GSM/ulaw/g729 peer, Opus itself should be "capped" at 8kHz as
>> there would be no need for a higher sampling rate to transport the audio.

[cut explanation of a maybe false theory]

scratch what I said before.

I've reproduced the behavior (use 48kHz instead of 8kHz) with a plain and simple
webrtc client (a local copy of http://tryit.jssip.net/) and I've tried to place
a call without using AMI Originate through a simple dialplan Dial and I got the same
result, this is the console log

suino*CLI> opus set debug huge
Opus debugging huge
   == Using SIP RTP CoS mark 5
[Jun  5 17:17:56] WARNING[31818][C-00000000]: chan_sip.c:11101 process_sdp_a_audio: Got Opus minptime=10
     -- Executing [93XX5XXXXX at iaxtest:1] Set("SIP/1060-00000000", "__session=") in new stack
     -- Executing [93XX5XXXXX at iaxtest:2] Set("SIP/1060-00000000", "__numero=3XX5XXXXX") in new stack
     -- Executing [93XX5XXXXX at iaxtest:3] Set("SIP/1060-00000000", "__prefix=9") in new stack
     -- Executing [93XX5XXXXX at iaxtest:4] Macro("SIP/1060-00000000", "choose-provider,9") in new stack
     -- Executing [s at macro-choose-provider:1] NoOp("SIP/1060-00000000", "9") in new stack
     -- Executing [s at macro-choose-provider:2] Set("SIP/1060-00000000", "GLOBAL(PROVIDER)=IAX2/myprovider") in new stack
   == Setting global variable 'PROVIDER' to 'IAX2/myprovider'
     -- Executing [s at macro-choose-provider:3] Set("SIP/1060-00000000", "GLOBAL(PROVIDER)=IAX2/myprovider") in new stack
   == Setting global variable 'PROVIDER' to 'IAX2/myprovider'
     -- Executing [s at macro-choose-provider:4] Set("SIP/1060-00000000", "GLOBAL(PROVIDER)=IAX2/myprovider") in new stack
   == Setting global variable 'PROVIDER' to 'IAX2/myprovider'
     -- Executing [s at macro-choose-provider:5] Set("SIP/1060-00000000", "GLOBAL(PROV_NOCHAN)=myprovider") in new stack
   == Setting global variable 'PROV_NOCHAN' to 'myprovider'
     -- Executing [s at macro-choose-provider:6] Set("SIP/1060-00000000", "GLOBAL(PROV_CHAN)=IAX2") in new stack
   == Setting global variable 'PROV_CHAN' to 'IAX2'
     -- Executing [93XX5XXXXX at iaxtest:5] NoOp("SIP/1060-00000000", "IAX2/myprovider") in new stack
     -- Executing [93XX5XXXXX at iaxtest:6] NoOp("SIP/1060-00000000", "myprovider") in new stack
     -- Executing [93XX5XXXXX at iaxtest:7] NoOp("SIP/1060-00000000", "IAX2") in new stack
     -- Executing [93XX5XXXXX at iaxtest:8] GotoIf("SIP/1060-00000000", "1?diax:dsip") in new stack
     -- Goto (iaxtest,93XX5XXXXX,9)
     -- Executing [93XX5XXXXX at iaxtest:9] GotoIf("SIP/1060-00000000", "0?backupadsl:dial") in new stack
     -- Goto (iaxtest,93XX5XXXXX,11)
     -- Executing [93XX5XXXXX at iaxtest:11] SendText("SIP/1060-00000000", "VOIP") in new stack
     -- Executing [93XX5XXXXX at iaxtest:12] Set("SIP/1060-00000000", "CHANNEL(userfield)=") in new stack
     -- Executing [93XX5XXXXX at iaxtest:13] Set("SIP/1060-00000000", "DYNAMIC_FEATURES=testfeature#listensergiu#listensergiu2") in new stack
     -- Executing [93XX5XXXXX at iaxtest:14] Dial("SIP/1060-00000000", "IAX2/myprovider/3XX5XXXXX,22)") in new stack
     -- Called IAX2/myprovider/3XX5XXXXX
[Opus] Created encoder #3 (48000->opus)
[Opus] Created decoder #6 (opus->48000)
     -- Call accepted by MY.PRO.VIDER.IP (format g729)
     -- Format for call is (g729)
     -- IAX2/myprovider-2277 is making progress passing it to SIP/1060-00000000
[Opus] [Encoder #3 (48000)] 960 samples, 1920 bytes
[Opus] [Encoder #3 (48000)]   >> Got 960 samples, 220 bytes
[Opus] [Encoder #3 (48000)] 960 samples, 1920 bytes
[Opus] [Encoder #3 (48000)]   >> Got 960 samples, 119 bytes
[Opus] [Encoder #3 (48000)] 960 samples, 1920 bytes
[Opus] [Encoder #3 (48000)]   >> Got 960 samples, 119 bytes
[Opus] [Encoder #3 (48000)] 960 samples, 1920 bytes
[Opus] [Encoder #3 (48000)]   >> Got 960 samples, 125 bytes
[Opus] [Encoder #3 (48000)] 960 samples, 1920 bytes
[Opus] [Encoder #3 (48000)]   >> Got 960 samples, 123 bytes
[Opus] [Encoder #3 (48000)] 960 samples, 1920 bytes
[Opus] [Encoder #3 (48000)]   >> Got 960 samples, 124 bytes
[Opus] [Encoder #3 (48000)] 960 samples, 1920 bytes
[Opus] [Encoder #3 (48000)]   >> Got 960 samples, 123 bytes
[Opus] [Encoder #3 (48000)] 960 samples, 1920 bytes
[Opus] [Encoder #3 (48000)]   >> Got 960 samples, 185 bytes
[Opus] [Encoder #3 (48000)] 960 samples, 1920 bytes
[Opus] [Encoder #3 (48000)]   >> Got 960 samples, 119 bytes
[Opus] [Encoder #3 (48000)] 960 samples, 1920 bytes
[Opus] [Encoder #3 (48000)]   >> Got 960 samples, 118 bytes
[Opus] [Encoder #3 (48000)] 960 samples, 1920 bytes
[Opus] [Encoder #3 (48000)]   >> Got 960 samples, 120 bytes
[Opus] [Encoder #3 (48000)] 960 samples, 1920 bytes
[Opus] [Encoder #3 (48000)]   >> Got 960 samples, 120 bytes
[Opus] [Encoder #3 (48000)] 960 samples, 1920 bytes
[Opus] [Encoder #3 (48000)]   >> Got 960 samples, 120 bytes




More information about the asterisk-dev mailing list