[asterisk-bugs] [Asterisk 0016683]: [patch] warning about "Invalid peer port configuration" for realtime
Asterisk Bug Tracker
noreply at bugs.digium.com
Mon Jan 25 09:36:40 CST 2010
The following issue is now READY FOR TESTING.
======================================================================
https://issues.asterisk.org/view.php?id=16683
======================================================================
Reported By: wdoekes
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 16683
Category: Channels/chan_sip/DatabaseSupport
Reproducibility: always
Severity: trivial
Priority: normal
Status: ready for testing
Asterisk Version: SVN
JIRA:
Regression: No
Reviewboard Link:
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!): 242602
Request Review:
======================================================================
Date Submitted: 2010-01-24 03:10 CST
Last Modified: 2010-01-25 09:36 CST
======================================================================
Summary: [patch] warning about "Invalid peer port
configuration" for realtime
Description:
When my (x-lite) phone unregisters, asterisk sets the realtime sipregs info
to:
mysql> select ipaddr, port from asterisk_sipreg where name = '126680005';
+---------+------+
| ipaddr | port |
+---------+------+
| 0.0.0.0 | 0 |
+---------+------+
1 row in set (0.00 sec)
This is all perfectly fine. But then when I retrieve the info for the
account, I get a warning about the port being bad:
CLI> sip show peer 126680005 load
..
[2010-01-24 09:58:04] WARNING[31055]: chan_sip.c:22868 build_peer: Invalid
peer port configuration at line 0 : 0
This new warning was introduced in r221697.
-if (!realtime && peer->host_dynamic) {
- peer->defaddr.sin_port = htons(atoi(v->value));
-} else {
- peer->addr.sin_port = htons(atoi(v->value));
+if (!(port = port_str2int(v->value, 0))) {
+ ast_log(LOG_WARNING, "Invalid peer port configuration at line %d :
%s\n", v->lineno, v->value);
I suppose it shouldn't fire the warning when you're using realtime-dynamic
accounts.
See the attached diff.
Regards,
Walter Doekes
OSSO B.V.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2010-01-25 09:36 lmadsen Status new => ready for
testing
======================================================================
More information about the asterisk-bugs
mailing list