[Home]

Summary:ASTERISK-15530: 'interval' option doesn't work
Reporter:pj (pj)Labels:
Date Opened:2010-01-27 08:56:18.000-0600Date Closed:2015-02-25 20:18:08.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Addons/chan_mobile
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) debug.txt
Description:When I disconnect mobile phone from chan_mobile, it takes about 55sec that chan_mobile reconnect again, even I have 'interval=10' in chan_mobile.conf

two disconnect/reconnect tests:
[Jan 27 15:45:58]     -- Bluetooth Device E61 has disconnected.
[Jan 27 15:46:54]     -- Bluetooth Device E61 has connected, initializing...

[Jan 27 15:47:05]     -- Bluetooth Device E61 has disconnected.
[Jan 27 15:47:59]     -- Bluetooth Device E61 has connected, initializing...


****** ADDITIONAL INFORMATION ******

chan_mobile.conf

[adapter]
interval=10     ; Number of seconds between trying to connect to devices.
id=blue
address=00:24:2B:FA:F3:DE

[E61]
address=00:12:D1:86:91:C5
port=28
context=incoming-mobile
adapter=blue
Comments:By: Matthew Nicholson (mnicholson) 2010-01-27 08:59:59.000-0600

Please post a log with the debug level turned up to at least 5.  I believe that chan_mobile is experiencing failures when attempting to connect to your device during that 55 sec period.

By: pj (pj) 2010-01-27 09:56:13.000-0600

debug uploaded, it seems, that chan_mobile doesn't try to reconnect in intervals specified in chan_mobile.conf, but in random intervals

By: Leif Madsen (lmadsen) 2010-03-23 10:30:46

Unassigning this from mnicholson for now as he isn't likely to work on it anytime soon.

By: Matt Jordan (mjordan) 2013-01-15 11:45:25.654-0600

Please note that {{chan_mobile}} is an extended support module. As such, development effort for it typically comes from the Asterisk open source community. Response times may reflect that.

By: Matt Jordan (mjordan) 2015-02-25 20:17:52.041-0600

This actually was not a bug. The 'interval' option is only applicable in the {{general}} section:

{code}
/* parse [general] section */
for (v = ast_variable_browse(cfg, "general"); v; v = v->next) {
if (!strcasecmp(v->name, "interval")) {
if (!sscanf(v->value, "%d", &discovery_interval)) {
ast_log(LOG_NOTICE, "error parsing 'interval' in general section, using default value\n");
}
}
}
{code}

It is a global setting, and cannot be defined at the adapter level.