如何添加G729 codeC在Android应用程序? [英] How to add g729 codec in Android application?
问题描述
我正在开发制作和接收呼叫的SIP应用程序,我想添加的G729 codeC在我的应用程序。
在开源项目 SipDroid 目前我在做分析。如果我想使该应用程序支持G729 codeC怎么办?
有中的 org.sipdroid。codeCS package.how确实创造了这种.java文件为G729 codeC的?
任何建议和响应将是AP preciated。
星号的日志信息
找到RTP音频格式101
找到音频描述格式的电话事件ID 101
发现RTP视频格式103
找到视频描述格式H263-1998的ID 103
功能:我们 - 0x100处(G729),同行 - 音频=为0x0(无)/视频=的0x100000(h263p)/文=为0x0(无),结合 - 为0x0(无)
非codeC功能(DTMF):我们 - 为0x1(电话事件|),同行 - 为0x1(电话事件|),结合 - 为0x1(电话事件|)
【4月9日18时00分25秒]公告[3813]:chan_sip.c:9187 process_sdp:**不兼容codeCS **,不接受此优惠!
SDP
来:其中,SIP:5003@192.168.1.17>
来源:< SIP:5004@192.168.1.17> ;;标签= z9hG4bK80811693
呼叫ID:082004294635@10.0.2.15
这个Cseq:2 INVITE
联系方式:其中,SIP:5004@10.0.2.15:36252;运输= UDP>
到期日:3600
用户代理:MySipdroid。 !/2.4测试/ SDK
授权:摘要用户名=5004,境界=星号,现时=6264308a,URI =SIP:5003@192.168.1.17,算法= MD5,响应=fb6dfb528d362657ef01458f96653adb
内容长度:137
内容类型:应用/ SDP
V = 0
o=5004@192.168.1.17 0 0 IN IP4 10.0.2.15
S =会话的SIP / SDP
c = IN IP4 10.0.2.15
T = 0 0
M =音频21000 RTP / AVP
A = FMTP:18 annexb =无
< ------------->
---(13头7线)---
发送到192.168.1.17:35370(NAT)
使用INVITE请求为依据请求 - 082004294635@10.0.2.15
从192.168.1.17:35370发现对'5004'的'5004'
==使用SIP RTP的CoS标记5
功能:我们 - 0x100处(G729),同行 - 音频=为0x0(无)/视频=为0x0(无)/文=为0x0(无),结合 - 为0x0(无)
非codeC功能(DTMF):我们 - 为0x1(电话事件|),同行 - 为0x0(没有),结合 - 为0x0(无)
[04月10日12时01分05秒]公告[3524]:chan_sip.c:9187 process_sdp:没有兼容的codeCS,不接受此优惠!
显示翻译的结果
核心显示翻译
格式之间的转换时间(微秒)进行数据一秒
源格式(行)目标格式(列)
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 - 2001年1 1 1001 2001年3000 - 8000 3000 2 - - 3 - - 2
阿劳 - 2000年1 - 2001年1 1001 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年 - 2001年1 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年1 1001 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年1 1001 2001年3000 - 8000 3000 2 - - 3 - - -
sip.conf
[5004]
类型=朋友
用户名= 5004
秘密= 5004
主机=动态
上下文=的TestContext
NAT = YES
禁止=所有
允许= G729
出线= YES
来电显示=919999121312< 5004>
你的星号日志看起来pretty的良好支持codeC,但你需要的G729连接codeR在客户端Android应用程序(似乎是现在商业授权),请让我知道,如果你有任何运气得到的codeC的开源许可证。
许可
G.729包括来自多家公司的专利,并通过Sipro实验室电信许可。 Sipro实验室电信授权的知识产权许可管理员G.729技术和专利池。[3] [4] [5] [6]在一些国家,使用G.729可能需要许可费和/或特许权使用费。[5]
来源: http://en.wikipedia.org/wiki/G.729
问候。
i am developing a SIP application for making and receiving a call and i want to add the G729 codec in my application.
currently i am doing analysis on open source project SipDroid. if i want to make that application to support G729 codec how to do that?
there is a different codecs configuration file in org.sipdroid.codecs package.how do create the this kind of .java file for G729 codec?
Any suggestion and response will be appreciated.
Log message of asterisk
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:5003@192.168.1.17>
From: <sip:5004@192.168.1.17>;tag=z9hG4bK80811693
Call-ID: 082004294635@10.0.2.15
CSeq: 2 INVITE
Contact: <sip:5004@10.0.2.15:36252;transport=udp>
Expires: 3600
User-Agent: MySipdroid. !/2.4 beta/sdk
Authorization: Digest username="5004", realm="asterisk", nonce="6264308a", uri="sip:5003@192.168.1.17", algorithm=MD5, response="fb6dfb528d362657ef01458f96653adb"
Content-Length: 137
Content-Type: application/sdp
v=0
o=5004@192.168.1.17 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 - 082004294635@10.0.2.15
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!
Result of Show Translation
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>
your asterisk logs looks pretty good to support the codec, but you need the g729 encoder on your client android application (seems to be a commercial license for now), please let me know if you have any luck on getting an opensource license of the codec.
Licensing
G.729 includes patents from several companies and is licensed by Sipro Lab Telecom. Sipro Lab Telecom is the authorized Intellectual Property Licensing Administrator for G.729 technology and patent pool.[3][4][5][6] In a number of countries, the use of G.729 may require a license fee and/or royalty fee.[5]
Source: http://en.wikipedia.org/wiki/G.729
Regards.
这篇关于如何添加G729 codeC在Android应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!