-
Notifications
You must be signed in to change notification settings - Fork 2
RubyFS stops listening after sending an event #6
Copy link
Copy link
Open
Description
I have code that looks like this to respond to MESSAGE_QUERY events from FreeSWITCH and respond by providing Message Waiting Indicator messages:
def self.handle_event(event)
return unless event.is_a? RubyFS::Event
case event.event_name
when "MESSAGE_QUERY"
begin
logger.debug "Received message query for #{event.content[:message_account]}"
mailbox_id, account_id = parse_address event.content[:message_account]
messages = WebApiClient.get_messages(account_id, mailbox_id) || EMPTY_MAILBOX
report mailbox_id, account_id, messages
rescue InvalidMailboxAddress
logger.error "Received MAILBOX_QUERY for an unrecognized mailbox: #{event.content[:message_account]}"
end
end
endThe first MESSAGE_QUERY received by Adhearsion is properly handled. You can see this in the packet capture here: https://gist.github.com/bklang/37d3b19f430af099718c#file-gistfile1-txt-L27
Lines 27-30 are Adhearsion talking to FreeSWITCH; every other line in that file is FreeSWITCH talking to Adhearsion.
The Adhearsion TRACE logs properly show all IES messages being received up to the point of sending the sendevent message. After that point, no further messages are logged, and the subsequent MESSAGE_QUERY events are ignored.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels