[asterisk-dev] device_state distribution issues
Klaus Darilion
klaus.mailinglists at pernau.at
Tue Nov 9 04:23:19 CST 2010
(resent due to size limit on mailing list)
Am 09.11.2010 00:21, schrieb Russell Bryant:
> On Tue, 2010-11-09 at 00:11 +0100, Klaus Darilion wrote:
>> Hi Russel! I just tried with AIS but the problem is still the same:
...
> Well that's no good.
>
> Could you try enabling a debug log in logger.conf, and set "core set
> debug 1"? There should be some messages that say what's happening when
> it tries to calculate the overall device state:
>
> Adding per-server state of<...> for<...>
> ...
> Aggregate devstate result is<...>
>
> That will at least tell us if it is seeing multiple state values, and if
> so, if it's determining the end result incorrectly.
Hi Russel!
Please find the debug log at http://pastebin.com/HxXxcriX
0. watcher (BLF) klaus3 is SUBSCRIBEd to SIP/klaus2 on server1
1. SIP/klaus2 on server2 calls Milliwatt
-> event is distributed to server1
-> NOTIFY
-> BLF is on
2. on server1, SIP/klaus9 calls SIP/klaus2
-> BLF is still on
3. on server1, SIP/klaus9->SIP/klaus2 hang up
-> NOTIFY state=terminated
-> BLF is off although SIP/klaus2 has still an active call on server2
4. SIP/klaus2 on server2 hangs up
-> event is distributed to server1
What seems strange to me is that in devicestate.c in function
process_collection(...) you iterate over the per-server states:
for (i = 0; i < collection->num_states; i++) {
ast_debug(1, "Adding per-server state of '%s' for '%s'\n",
ast_devstate2str(collection->states[i].state), device);
ast_devstate_aggregate_add(&agg, collection->states[i].state);
}
But the debug-message is always seen only once per state change. Thus,
to me it looks like as the processing does not process all states from
all servers but only the last received event.
regards
Klaus
More information about the asterisk-dev
mailing list