This pull request separates Monitor/MixMonitor from Tropo's native startCallRecording. The existing startCallRecording method still takes JSON arguments so the enhanced functionality is available. MixMonitor respects the Asterisk syntax so is compatible with existing AGI applications.
Also, we now use the sessionID for the channel unique variable. This allows AGI applications to use the unique ID to send REST events to Tropo by referencing the channel unique ID.
Finally, some additional safety was added to avoid infinite loops on the socket read loop.
This pull request separates Monitor/MixMonitor from Tropo's native startCallRecording. The existing startCallRecording method still takes JSON arguments so the enhanced functionality is available. MixMonitor respects the Asterisk syntax so is compatible with existing AGI applications.
Also, we now use the sessionID for the channel unique variable. This allows AGI applications to use the unique ID to send REST events to Tropo by referencing the channel unique ID.
Finally, some additional safety was added to avoid infinite loops on the socket read loop.