|Summary:||ASTERISK-11102: ChanIsAvail shouldn't generate warnings|
|Date Opened:||2007-12-22 13:33:26.000-0600||Date Closed:||2007-12-27 10:56:14.000-0600|
|Description:||I'm using ChanIsAvail() before dial() to determine what channel is available to place call. It works, but if sip or iax peer is unavalable or offline, ChanIsAvail generates annoying warnings to console and asterisk messages. |
I think this should be put into debug level.
****** ADDITIONAL INFORMATION ******
[Dec 22 20:19:40] -- Executing [591@from-b:2] ChanIsAvail("IAX2/b-8", "SIP/591&IAX2/591") in new stack
[Dec 22 20:19:40] == Using TOS bits 0
[Dec 22 20:19:40] == Using CoS mark 5
[Dec 22 20:19:40] WARNING: acl.c:212 ast_get_ip_or_srv: Unable to lookup '591'
[Dec 22 20:19:40] WARNING: chan_iax2.c:3121 create_addr: No such host: 591
|Comments:||By: Joshua C. Colp (jcolp) 2007-12-26 09:21:42.000-0600|
ChanIsAvail uses the same method as Dial to try to see if something is available to dial, so unless we want to make them both act the same way (which I do not think would be good) I am closing this out as won't fix.
By: pj (pj) 2007-12-27 09:06:00.000-0600
if I use ChanIsAvail() with option 's' it doesn't generate warnings,
imho, it should work consistently in both cases, it's no reason, from user perspective, why for non intrusive action, like simple check, are generated needless warning to console and messagess.
s - Consider the channel unavailable if the channel is in use at all.
By: Joshua C. Colp (jcolp) 2007-12-27 10:56:14.000-0600
's' queries the devicestate core see to whether the device is in use or not otherwise chanisavail actually tries to place an outgoing call to the device. What the channel driver does during that time is not under the control of chanisavail. The only way that it could work is to expand the API call that requests an outgoing call to a device to say whether to display warning/error information or not... and I don't want to go down that path.