[asterisk-bugs] [Asterisk 0013491]: unable to place outgoing call on TE Port
Asterisk Bug Tracker
noreply at bugs.digium.com
Sat Oct 4 18:28:51 CDT 2008
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=13491
======================================================================
Reported By: avalentin
Assigned To: crich
======================================================================
Project: Asterisk
Issue ID: 13491
Category: Channels/chan_misdn
Reproducibility: always
Severity: minor
Priority: normal
Status: assigned
Asterisk Version: 1.6.0-rc6
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Disclaimer on File?: N/A
Request Review:
======================================================================
Date Submitted: 2008-09-16 09:55 CDT
Last Modified: 2008-10-04 18:28 CDT
======================================================================
Summary: unable to place outgoing call on TE Port
Description:
Beginning with SVN Revision 132967 asterisk is unable to place outgoing
calls on TE ports. In SVN Revision 132966 everything works fine.
It seems that this change is responsible for that (132966:132967):
@@ -3121,8 +3134,8 @@
struct timeval now;
gettimeofday(&now, NULL);
if (!bc->in_use) {
- if (bc->last_used.tv_sec < now.tv_sec) {
- cb_log(0,bc->port, "channel with stid:%x for one
second still in use!\n", bc->b_stid);
+ if (misdn_lib_port_is_pri(bc->port) &&
bc->last_used.tv_sec == now.tv_sec ) {
+ cb_log(2,bc->port, "channel with stid:%x for one
second still in use! (n:%d lu:%d)\n", bc->b_stid, (int) now.tv_sec, (int)
bc->last_u
sed.tv_sec);
return 1;
}
}
Console output with debugging enabled:
*CLI> P[ 0] MGMT: SSTATUS: L1_ACTIVATED
P[ 1] MGMT: SSTATUS: L2_RELEASED
P[ 1] MGMT: SSTATUS: L2_ESTABLISH
-- Attempting call on MISDN/1/012341212 for application Echo() (Retry
1)
P[ 1] There is no free channel on port (1)
[Sep 16 17:02:12] WARNING[28356]: chan_misdn.c:3333 misdn_request: Could
not create channel on port:1 with extensions:012341212
[Sep 16 17:02:12] NOTICE[28356]: channel.c:3309 __ast_request_and_dial:
Unable to request channel MISDN/1/012341212
[Sep 16 17:02:12] NOTICE[28356]: pbx_spool.c:346 attempt_thread: Call
failed to go through, reason (0) Call Failure (not BUSY, and not NO_ANSWER,
maybe Circuit busy or down?)
By removing the patch above everything seems to work as expected.
We tried 4 Port Cards, Fritzcards and USB TAs. Everytime the same error.
======================================================================
----------------------------------------------------------------------
(0093173) wolfelectronic (reporter) - 2008-10-04 18:28
http://bugs.digium.com/view.php?id=13491#c93173
----------------------------------------------------------------------
i made some changes to isdn_lib.c to fix the problem:
1) test_inuse is called 3 times in the code, line 3191, 3206 and 3218. the
interresting thing is that line 3191 expects test_inuse to return 1 if the
channel is in use and line 3206 and 3218 expect test_inuse to return 1 if
the channel is free. so i changed line 3191 to fix this mismatch.
2) test_inuse returns 0 if the channel is in use and the only time it
returns 1 is if the port is a pri port and the channel wasn't free for more
than 1 second. As far as i understand the code this behaviour is not
correct. I changed test_inuse to
a) return 0 if the channel is in use, regardless of the type
b) return 0 if the channel is a pri and wasn't free for at least 1 second
c) return 1 if the channel is a pri and was free for more than 1 second
d) return 1 if the channel is a bri and free
this changes worked fine for my system, but i have only bri cards in it,
so i could not test with pri cards. i have uploaded my file and i hope
somebody can benefit from my changes
Issue History
Date Modified Username Field Change
======================================================================
2008-10-04 18:28 wolfelectronic Note Added: 0093173
======================================================================
More information about the asterisk-bugs
mailing list