[Freeswitch-users] Missing CHANNEL_HANGUP event in mod_event_socket

Victor Toofic toofics at gmail.com
Wed Apr 1 13:19:26 PDT 2009


Hi all!!

I'm stuck trying to use mod_event_socket in outbound mode. The problem
that I'm facing is that while in a incoming call, using "myevents" to
monitor for the channel's events.. the event CHANNEL_HANGUP sometimes
arrives and sometimes doesn't. I can't figure it out why.

The dialplan is:

<extension name="9999">
  <condition field="destination_number" expression="^9999$">
    <action application="verbose_events" data="true"/>
    <action application="socket" data="192.168.251.1:8384 async full"/>
  </condition>
</extension>

The process that handles the connection does:

  1. connect
  2. myevents
     (received: Reply-Text: +OK Events Enabled)
  3. sendmsg\n call-command: execute\n execute-app-name: answer
     (received: Reply-Text: +OK)

after this it waits for events and/or for the other party to hangup the
call. (The DTMFs are for testing propourses).

Sometimes the events that the process receives are:

  <<"CHANNEL_PARK">>
  <<"CHANNEL_EXECUTE">>
  <<"CHANNEL_EXECUTE_COMPLETE">>
  <<"CHANNEL_EXECUTE">>
  <<"CHANNEL_ANSWER">>
  <<"CHANNEL_EXECUTE_COMPLETE">>
  <<"DTMF">>
  <<"DTMF">>
  <<"CHANNEL_HANGUP">>

(then it receives the "text/disconnect-notice" and the socket gets
closed)

and sometimes are:

  <<"CHANNEL_EXECUTE">>
  <<"CHANNEL_EXECUTE_COMPLETE">>
  <<"CHANNEL_EXECUTE">>
  <<"CHANNEL_ANSWER">>
  <<"CHANNEL_EXECUTE_COMPLETE">>
  <<"DTMF">>
  <<"DTMF">>

(then it receives the "text/disconnect-notice" and the socket gets
closed)

As you can see, even sometimes the first CHANNEL_PARK event doesn't
arrive. I'm very concerned about the missing CHANNEL_HANGUP event.

In the other hand I was watching the events in a inbound connection to
mod_event_socket with "event text all" and in this case there was no
problem, all the events arrived as expected.

Why in outbound mode some events get lost??
I'm missing something?? 

I've tried it in two different machines and the results are the same.
I'm using FreeSWITCH Version 1.0.3 (exported) on linux.

Thnks!!

--
Regards..
Victor Toofic





More information about the FreeSWITCH-users mailing list