2012-04-09 77 views
0

我正在开发一个用于拨打和接听电话的SIP应用程序,我想在我的应用程序中添加G729编解码器。如何在Android应用程序中添加g729编解码器?

目前我正在做分析开源项目SipDroid。如果我想让该应用程序支持G729编解码器如何做到这一点?

org.sipdroid.codecs package中有一个不同的编解码器配置文件。创建这种用于G729编解码器的.java文件吗?

任何建议和反应将不胜感激。展会翻译星号的

日志消息

Found RTP audio format 101 
Found audio description format telephone-event for ID 101 
Found RTP video format 103 
Found video description format h263-1998 for ID 103 
Capabilities: us - 0x100 (g729), peer - audio=0x0 (nothing)/video=0x100000 (h263p)/text=0x0 (nothing), combined - 0x0 (nothing) 
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|) 
[Apr 9 18:00:25] NOTICE[3813]: chan_sip.c:9187 process_sdp: **No compatible codecs**, not accepting this offer! 

SDP

To: <sip:[email protected]> 
From: <sip:[email protected]>;tag=z9hG4bK80811693 
Call-ID: [email protected] 
CSeq: 2 INVITE 
Contact: <sip:[email protected]:36252;transport=udp> 
Expires: 3600 
User-Agent: MySipdroid. !/2.4 beta/sdk 
Authorization: Digest username="5004", realm="asterisk", nonce="6264308a", uri="sip:[email protected]", algorithm=MD5, response="fb6dfb528d362657ef01458f96653adb" 
Content-Length: 137 
Content-Type: application/sdp 

v=0 
[email protected] 0 0 IN IP4 10.0.2.15 
s=Session SIP/SDP 
c=IN IP4 10.0.2.15 
t=0 0 
m=audio 21000 RTP/AVP 
a=fmtp:18 annexb=no 
<-------------> 
--- (13 headers 7 lines) --- 
Sending to 192.168.1.17:35370 (NAT) 
Using INVITE request as basis request - [email protected] 
Found peer '5004' for '5004' from 192.168.1.17:35370 
    == Using SIP RTP CoS mark 5 
Capabilities: us - 0x100 (g729), peer - audio=0x0 (nothing)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x0 (nothing) 
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x0 (nothing), combined - 0x0 (nothing) 
[Apr 10 12:01:05] NOTICE[3524]: chan_sip.c:9187 process_sdp: No compatible codecs, not accepting this offer! 

结果

core show translation 
     Translation times between formats (in microseconds) for one second of data 
      Source Format (Rows) Destination Format (Columns) 

      g723 gsm ulaw alaw g726aal2 adpcm slin lpc10 g729 speex ilbc g726 g722 siren7 siren14 slin16 g719 speex16 testlaw 
    g723  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  - 
     gsm  -  - 1001 1001  3000 2000 1000 3000 3999  - 8999 3999 1001  -  - 1002  -  - 1001 
    ulaw  - 2000  -  1  2001 1001  1 2001 3000  - 8000 3000  2  -  -  3  -  -  2 
    alaw  - 2000  1  -  2001 1001  1 2001 3000  - 8000 3000  2  -  -  3  -  -  2 
g726aal2  - 2999 1001 1001  - 2000 1000 3000 3999  - 8999 3999 1001  -  - 1002  -  - 1001 
    adpcm  - 2000  2  2  2001  -  1 2001 3000  - 8000 3000  2  -  -  3  -  -  2 
    slin  - 1999  1  1  2000 1000  - 2000 2999  - 7999 2999  1  -  -  2  -  -  1 
    lpc10  - 2999 1001 1001  3000 2000 1000  - 3999  - 8999 3999 1001  -  - 1002  -  - 1001 
    g729  - 2999 1001 1001  3000 2000 1000 3000  -  - 8999 3999 1001  -  - 1002  -  - 1001 
    speex  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  - 
    ilbc  - 2998 1000 1000  2999 1999 999 2999 3998  -  - 3998 1000  -  - 1001  -  - 1000 
    g726  - 2999 1001 1001  3000 2000 1000 3000 3999  - 8999  - 1001  -  - 1002  -  - 1001 
    g722  - 2000  2  2  2001 1001  1 2001 3000  - 8000 3000  -  -  -  1  -  -  2 
    siren7  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  - 
    siren14  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  - 
    slin16  - 3000 1002 1002  3001 2001 1001 3001 4000  - 9000 4000 1000  -  -  -  -  - 1002 
    g719  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  - 
    speex16  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  - 
    testlaw  - 2000  2  2  2001 1001  1 2001 3000  - 8000 3000  2  -  -  3  -  -  - 

sip.conf

[5004] 
type=friend 
username=5004 
secret=5004 
host=dynamic 
context=testcontext 
nat=yes 
disallow=all 
allow=g729 
qualify=yes 
callerid="919999121312"<5004> 
+0

[添加一个新的编解码器到Android?](http://stackoverflow.com/questions/5192076/add-a-new-codec-to-android) – Macarse 2012-04-09 23:35:37

+0

SipDroid中的Java编解码器类只是包装对于位于[此处]的本地实现(http://code.google.com/p/sipdroid/source/browse/#svn/trunk/jni)。您需要获得G729的java或c/C++实现。我认为[Doubango](http://code.google.com/p/doubango/source/browse/#svn/branches/2.0/doubango/g729a%253Fstate%253Dclosed)支持G729。您需要将这些实现转移到您的项目中,并创建调用本机代码的java包装类。 – hovanessyan 2012-04-09 08:31:46

回答

1

你的星号日志看起来相当不错,支持的编解码器,但你需要在客户端的Android应用程序中的G729编码器(似乎是现在商业授权),请让我知道如果您有任何运气获取编解码器的开源许可证。

许可

G.729包括从几家公司的专利,并通过Sipro实验室电信许可。 Sipro Lab Telecom是G.729技术和专利池的授权知识产权许可管理员。[3] [4] [5] [6]在一些国家,使用G.729可能需要许可费和/或版税。[5]

来源:http://en.wikipedia.org/wiki/G.729

问候。

相关问题