Re: [pjsip] pj_sock_bind sometime failed for ipv6

Q
qiulang
Tue, Sep 13, 2016 7:32 AM

OK I found the reason. I just used the sample code here,

/* Add TCP IPv6 transport unless it's disabled. */
if (!app_config.no_tcp  app_config.ipv6) {
pjsua_acc_id aid;
pjsip_transport_type_e type = PJSIP_TRANSPORT_TCP6;

tcp_cfg.port += 10; /* b/c for v4 I settcp_cfg.port = 0, so here it will 10! */

So can I also settcp_cfg.port=0 here ?

原始邮件
发件人:qiulangqiulang@emicnet.com
收件人:pjsip listpjsip@lists.pjsip.org
发送时间:2016年9月13日(周二) 15:21
主题:Re: [pjsip] pj_sock_bind sometime failed for ipv6

I do’t want to set it to specfic port and that was why I set to 0 in the first place. Beside it only happened to ipv6

原始邮件
发件人:Alex Terenteterente.alex@gmail.com
收件人:pjsip listpjsip@lists.pjsip.org
发送时间:2016年9月13日(周二) 15:07
主题:Re: [pjsip] pj_sock_bind sometime failed for ipv6

Try to set the default port to 5060, or increase it to 5070 in the case of failure.

On 13 Sep 2016, at 09:59, qiulang qiulang@emicnet.com wrote:

Hi,

I foundpj_sock_bind sometime failed for ipv6 with the error message "pjsua_core.c Error creating SIP TCP listener: Address already in use [status=120048]“. If only happened to ipv6, ipv4 does not have this problem. And of course I setapp_config.udp_cfg.port= 0 to let pjsip choose any available port.

So any idea why and how to fix it ?

Thanks,

Qiulang


Visit our blog:http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

OK I found the reason. I just used the sample code here, /* Add TCP IPv6 transport unless it's disabled. */ if (!app_config.no_tcp app_config.ipv6) { pjsua_acc_id aid; pjsip_transport_type_e type = PJSIP_TRANSPORT_TCP6; tcp_cfg.port += 10; /* b/c for v4 I settcp_cfg.port = 0, so here it will 10! */ So can I also settcp_cfg.port=0 here ? 原始邮件 发件人:qiulangqiulang@emicnet.com 收件人:pjsip listpjsip@lists.pjsip.org 发送时间:2016年9月13日(周二) 15:21 主题:Re: [pjsip] pj_sock_bind sometime failed for ipv6 I do’t want to set it to specfic port and that was why I set to 0 in the first place. Beside it only happened to ipv6 原始邮件 发件人:Alex Terenteterente.alex@gmail.com 收件人:pjsip listpjsip@lists.pjsip.org 发送时间:2016年9月13日(周二) 15:07 主题:Re: [pjsip] pj_sock_bind sometime failed for ipv6 Try to set the default port to 5060, or increase it to 5070 in the case of failure. On 13 Sep 2016, at 09:59, qiulang qiulang@emicnet.com wrote: Hi, I foundpj_sock_bind sometime failed for ipv6 with the error message "pjsua_core.c Error creating SIP TCP listener: Address already in use [status=120048]“. If only happened to ipv6, ipv4 does not have this problem. And of course I setapp_config.udp_cfg.port= 0 to let pjsip choose any available port. So any idea why and how to fix it ? Thanks, Qiulang _______________________________________________ Visit our blog:http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org