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 set tcp_cfg.port = 0, so here it will 10! */
So can I also set tcp_cfg.port = 0 here ?
原始邮件
发件人: qiulang<qiulang@xxxxxxxxxxx>
收件人: pjsip list<pjsip@xxxxxxxxxxxxxxx>
发送时间: 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 Terente<terente.alex@xxxxxxxxx>
收件人: pjsip list<pjsip@xxxxxxxxxxxxxxx>
发送时间: 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@xxxxxxxxxxx> wrote:_______________________________________________Hi,I found pj_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 set app_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@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
_______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@xxxxxxxxxxxxxxx http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org