Hi,<br><br>Digging on this case :<br><br><div class="gmail_quote">2009/5/26 Olivier <span dir="ltr"><<a href="mailto:oza-4h07@myamail.com">oza-4h07@myamail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>In my sip.conf, I've got :<br>[general](+)<br>
; register=>tcp://<a href="mailto:trunk4ipbx%3Apassword@192.168.100.129" target="_blank">trunk4ipbx:password@192.168.100.129</a><br>
register=><a href="mailto:trunk4ipbx%3Apassword@192.168.100.129" target="_blank">trunk4ipbx:password@192.168.100.129</a><br><br>When I'm using the TCP line instead of the other, I've got :<br>[May 26 17:58:42] NOTICE[2859]: chan_sip.c:20169 sip_parse_host: '/' is not a valid port number on line 25 of sip.conf. using default.<br>
[May 26 17:58:42] WARNING[2859]: chan_sip.c:6560 sip_register: Format for registration is [transport://]user[:secret[:authuser]]@domain[:port][/extension][~expiry] at line 25<br><br><br>Is this "register=>tcp://<a href="mailto:trunk4ipbx%3Apassword@192.168.100.129" target="_blank">trunk4ipbx:password@192.168.100.129</a>" statement correct ?<br>
<br>Regards<br>
</blockquote></div><br><br>I read in chan_sip.c that block inside sip_register :<br><br> /* split [/contact][~expiry] */<br> expire = strchr(buf, '~');<br> if (expire)<br> *expire++ = '\0';<br>
callback = strrchr(buf, '/'); // My comment: contact is search at the end of input register line<br> if (callback)<br> *callback++ = '\0';<br> if (ast_strlen_zero(callback))<br>
callback = "s";<br><br> sip_parse_host(buf, lineno, &username, &portnum, &transport);<br><br>Given an input line such as "register=>tcp://<a href="mailto:trunk4ipbx%3Apassword@192.168.100.129" target="_blank">trunk4ipbx:password@192.168.100.129</a>", register line is truncated as the last occurence of '/' is the "tcp://" string.<br>
When commenting out this "callback = strrchr(buf, '/');" , input line "register=>tcp://<a href="mailto:trunk4ipbx%3Apassword@192.168.100.129" target="_blank">trunk4ipbx:password@192.168.100.129</a>" seems to be processed appropriately.<br>
<br>My question is "is this legal to input register lines without any /contact field ?<br>If positive, then there is a bug is 1.6.1.<br>If negative, would you agree to have a more appropriate logging than "sip_parse_host: '/' is not a valid port number ..." ?<br>
<br>Regards<br><br><br>