diff options
-rw-r--r-- | misc/freeswitch/scripts/event/presence_update.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/misc/freeswitch/scripts/event/presence_update.lua b/misc/freeswitch/scripts/event/presence_update.lua index fd85f03..cf29ca9 100644 --- a/misc/freeswitch/scripts/event/presence_update.lua +++ b/misc/freeswitch/scripts/event/presence_update.lua @@ -134,6 +134,9 @@ function PresenceUpdate.presence_in(self, event) self.log:info('[', uuid,'] PRESENCE_CONFERENCE_', call_direction:upper(), ' ', common.str.to_i(account), ' - identifier: ', account, ', state: ', state); self:conference(direction, account, domain, state, uuid); elseif protocol == 'sip' or protocol == 'any' then + if common.str.blank(state) then + state = event:getHeader('answer-state'); + end if protocol == 'sip' and common.str.blank(state) then self.log:debug('[', uuid,'] PRESENCE_', call_direction:upper(),' no state - protocol: ', protocol, ', account: ', account); return; |