java sip g719,如何添加G729 codeC在Android应用程序?

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: <5003>5003>

From: <5004>;tag=z9hG4bK808116935004>

Call-ID: 082004294635@10.0.2.15

CSeq: 2 INVITE

Contact: <5004>5004>

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]

Regards.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: Java SIP客户端是一种基于Java的软件应用程序,它可以通过SIP(Session Initiation Protocol)协议来建立、维护和终止通信会话。它可以实现IP电话(VoIP)、视频会议、实时文本聊天和在线游戏等多种应用。Java SIP客户端具有以下特点: 1. 跨平台性强:Java程序可以在不同的操作系统上运行,因此Java SIP客户端可以在Windows、Mac OS X、Linux等多种操作系统上使用,便于用户实现跨平台的通信。 2. 开源软件:Java SIP客户端常用的开源软件包括Jain-SIPSIP Communicator、Linphone等,可以使用户免费使用并自由修改和分发软件。此外,开源软件具有可控性强、安全性高等特点。 3. 界面友好:Java SIP客户端可以具备图形用户界面(GUI),提供用户友好的操作界面和多种语言支持,以满足用户不同需求。 4. 易于扩展:Java SIP客户端可以通过编写插件、脚本等方式来扩展其功能,如加入语音识别、翻译等功能,增强其应用性。 总之,Java SIP客户端是一种方便、可靠、免费、易用的通信工具,具有广泛的应用前景。 ### 回答2: Java SIP客户端是一种基于Java语言的用于与SIP服务器进行通信的客户端程序。SIP是一种基于HTTP和SMTP的呼叫控制协议,用于建立、管理和终止实时会话,如语音和视频会议。Java SIP客户端可以充当多种角色,如用户终端、电话或会议设备等。 Java SIP客户端的主要功能包括呼叫建立、呼叫保持、呼叫转移、会议控制等。通过网络与SIP服务器进行通信,从而实现各种呼叫控制功能。另外,Java SIP客户端可以提供音频和视频编解码功能,以及媒体协商和传输功能,从而确保实时会话的质量。 Java SIP客户端通常采用开源软件来实现。其中较为常见的开源SIP客户端有Jitsi等。此外,许多商业软件提供商也提供Java SIP客户端开发工具包,以帮助开发人员更加便捷地开发SIP客户端应用程序。 总之,Java SIP客户端是一种重要的实时会话应用程序,它为用户提供了方便快捷的呼叫控制功能,为企业和个人用户实现实时通信提供了有力支持。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值