[asterisk-bugs] [Asterisk 0010519]: add support for wideband speex (Openwengo variant)

noreply at bugs.digium.com noreply at bugs.digium.com
Wed Sep 5 09:54:50 CDT 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=10519 
====================================================================== 
Reported By:                adamgundy
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   10519
Category:                   Codecs/codec_speex
Reproducibility:            always
Severity:                   feature
Priority:                   normal
Status:                     new
Asterisk Version:           1.4.10.1  
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             08-21-2007 17:08 CDT
Last Modified:              09-05-2007 09:54 CDT
====================================================================== 
Summary:                    add support for wideband speex (Openwengo variant)
Description: 
the attached patch adds support for wideband speex to asterisk 1.4.10.1

it relies on the fact that the speex codec (in asterisk or the client)
will transparently handle conversion between wide and narrow band speex, so
there are no changes to the codec, we just register a new type. asterisk
will either (a) allow wideband packets to pass through client<->client
(sounds great!), or when actually talking to asterisk (voicemail, prompts
etc), it will send or decode as narrowband speex, so quality while talking
to asterisk itself is only narrowband (but of course this means minimal
changes since asterisk still deals with 8khz audio). this is all
transparent to the caller, apart from the lower quality while talking to
asterisk itself.

the only complex part of the patch is about teaching rtp.c and frame.c
about 16khz codecs, so that the RTP timestamps are set correctly.

openwengo, for some odd reason, insist on sending speex wideband as
'G726-64wb', with a different RTP type. this patch adds support for that.
it should be trivial to add support for 'speex/16000', for eg ekiga, but
that's another patch... and asterisk will have to 'transcode' between them,
because the RTP types don't match :-(
====================================================================== 

---------------------------------------------------------------------- 
 adamgundy - 09-05-07 09:54  
---------------------------------------------------------------------- 
I return 8000 for g722 because that is how asterisk currently behaves (ie
without the patch), since everything uses hard coded 8kHz. since I can't
test g722, I don't want to break it with this patch...  and it obviously
works currently because people are using it. now you could be correct and
asterisk might be generating garbage timestamps for g722 when playing back
recorded audio, someone with a g722 phone could test that I guess.

unfortunately we need a new codec number, because we have to spot the
difference between speex/8000 and wengo's speex at 16kHz, otherwise rtp.c
puts incorrect timestamps in the packets, and the audio sounds *very* odd.
we'll also need another codec number for true speex/16000 since we need to
know which RTP type to put in the packets (it's not the same number as
wengo uses, apparently they use 'cirpack'? servers which won't pass unknown
types) :-(

the fact that we're using the same codec code for all three doesn't help
much, since it's the RTP code which needs to know the difference, for the
type number, and the rate. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
09-05-07 09:54  adamgundy      Note Added: 0069976                          
======================================================================




More information about the asterisk-bugs mailing list