diff options
author | Peter Kozak <spag@golwen.net> | 2013-09-06 09:36:48 +0200 |
---|---|---|
committer | Peter Kozak <spag@golwen.net> | 2013-09-06 09:36:48 +0200 |
commit | cab241be042a53ade4e20a2a5abf78516fed6289 (patch) | |
tree | fd7f3b5dfdac28d46f7551941ee6da9d8f14220e | |
parent | 57adfe709214a1446c4954857ad9a72e0dc5da87 (diff) |
prevent event loops
-rw-r--r-- | misc/freeswitch/scripts/event/presence_update.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/misc/freeswitch/scripts/event/presence_update.lua b/misc/freeswitch/scripts/event/presence_update.lua index cf29ca9..24b19d5 100644 --- a/misc/freeswitch/scripts/event/presence_update.lua +++ b/misc/freeswitch/scripts/event/presence_update.lua @@ -128,7 +128,9 @@ function PresenceUpdate.presence_in(self, event) direction = false; end - if protocol == 'conf' then + if tostring(event:getHeader('event_origin')) == 'gemeinschaft' then + self.log:debug('[', uuid,'] PRESENCE_', call_direction:upper(),'_LOOP ignored - protocol: ', protocol, ', account: ', account, ', state: ', state); + elseif protocol == 'conf' then state = event:getHeader('answer-state'); local login = tostring(event:getHeader('proto')); self.log:info('[', uuid,'] PRESENCE_CONFERENCE_', call_direction:upper(), ' ', common.str.to_i(account), ' - identifier: ', account, ', state: ', state); |