软电话 java_一个开源的SIP软电话写在基于PJSIP java

This SIP softphone is written in Java as an eclipse RCP application. It uses the pjsip SIP stack for connecting to SIP servers. The phone runs on Windows and Linux. It would run on Mac OS too, but manually compiling it is necessary because of the JNI bindings to pjsip. The Java-JNI binding which are used by the phone are hosted on sourceforge.net, but are currently included in the SVN tree.

If you would like to obtain a commercial license, or need customisations of the phone for your environment, please contact us through our website http://www.acoveo.com.

In order to use the phone, just download the tarball/zip file for your platform, extract it wherever you would like to keep it and run the softphone/softphone.exe executable. It will then ask you to enter you SIP user name and password. As soon as the phone runs, click on the wrench button in the lower right c

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
pjsip一个开源SIP协议栈,可以用于实现基于SIP协议的电话呼叫。以下是一个简单的pjsip电话呼叫的示例代码: ```c #include <pjsua-lib/pjsua.h> int main() { pj_status_t status; pj_caching_pool cp; pj_pool_t *pool; pjsua_config cfg; pjsua_logging_config log_cfg; pjmedia_transport_config media_cfg; pjmedia_transport *media_transport; pjsua_acc_id acc_id; pjsua_call_id call_id; pj_str_t uri = pj_str("sip:[email protected]"); // Initialize pjsua status = pj_init(); pj_caching_pool_init(&cp, NULL, 0); pool = pj_pool_create(&cp.factory, "pjsua", 4000, 4000, NULL); pjsua_config_default(&cfg); cfg.cb.on_incoming_call = NULL; cfg.cb.on_call_media_state = NULL; cfg.cb.on_call_state = NULL; cfg.cb.on_reg_state = NULL; pjsua_logging_config_default(&log_cfg); log_cfg.console_level = 4; log_cfg.level = 4; status = pjsua_init(&cfg, &log_cfg, NULL); pjsua_transport_config cfg_transport; pjsua_transport_config_default(&cfg_transport); cfg_transport.port = 5060; status = pjsua_transport_create(PJSIP_TRANSPORT_UDP, &cfg_transport, NULL); pjsua_start(); // Register with SIP server pjsua_acc_config acc_cfg; pjsua_acc_config_default(&acc_cfg); acc_cfg.id = pj_str("sip:[email protected]"); acc_cfg.reg_uri = pj_str("sip:domain.com"); acc_cfg.cred_count = 1; acc_cfg.cred_info[0].realm = pj_str("domain.com"); acc_cfg.cred_info[0].scheme = pj_str("digest"); acc_cfg.cred_info[0].username = pj_str("username"); acc_cfg.cred_info[0].data_type = PJSIP_CRED_DATA_PLAIN_PASSWD; acc_cfg.cred_info[0].data = pj_str("password"); status = pjsua_acc_add(&acc_cfg, PJ_TRUE, &acc_id); // Make outgoing call pjsua_call_setting call_setting; pjsua_call_setting_default(&call_setting); status = pjsua_call_make_call(acc_id, &uri, &call_setting, NULL, NULL, &call_id); // Destroy pjsua pjsua_destroy(); pj_pool_release(pool); pj_caching_pool_destroy(&cp); return 0; } ``` 这段代码首先初始化了pjsua,然后注册到SIP服务器,最后发起一个呼叫。具体的调用过程可以参考pjsip官方文档。

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值