title: Freeswitch ESL events filtering
body: <p>FreeSWITCH (Version 1.7.0 -907-0b3f776 64bit)</p>
  
  <p>I have been using Freeswitch Python ESL, but I noticed the following:
  I created 2 calls using originate command:</p>
  
  <pre><code>originate {ignore_early_media=true,bridge_early_media=false,originate_timeout=24,call_timeout=24,execute_on_answer='sched_hangup 18',origination_uuid=5d56e91e-dfb7-4269-92cd-2967fa2d1d81,origination_caller_id_number=+18623079305}sofia/gateway/asterisk/+14084070000 handle_calls
  </code></pre>
  
  <p>Each call is created with a new ESL instance.</p>
  
  <p><strong>Flow:</strong></p>
  
  <p>API request -> HTTP -> Celery Task -> New ESL instance -> Send originate request.</p>
  
  <p><a href="https://i.stack.imgur.com/oIoOT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oIoOT.png" alt="enter image description here"></a></p>
  
  <p>I collected packet capture and ESL Logs and when a call is answered:
  I started seeing duplicated EVENTS for CHANNEL_ANSWER over the same TCP Socket. I filtered using the SRC port, not the Freeswitch DST port. Further debugs shows that I'm receiving ALL events (The ones I subscribed) for ALL active calls. </p>
  
  <p>When I subscribe to events should I receive ALL events for ALL calls over the same socket? Is this expected behavior? 
  Or am I supposed to receive only events of the instance of the call used by originate command?</p>
  
  <pre><code>events = "BACKGROUND_JOB " \
                       "CHANNEL_OUTGOING " \
                       "CHANNEL_CREATE " \
                       "CHANNEL_ANSWER " \
                       "RECORD_START " \
                       "CHANNEL_HANGUP " \
                       "CHAN_NOT_IMPLEMENTED "
  
  
  self.connection.events("plain", events)
  </code></pre>
  
  <p>Right now I'm filtering using: Channel-Call-UUID, after I receive the event. Is this the best approach?</p>
  
  <p><a href="http://pastebin.com/8jwprN7M" rel="nofollow noreferrer">http://pastebin.com/8jwprN7M</a></p>