diff options
author | Jan Hoffmann <info@cms-db.de> | 2017-04-27 20:36:20 +0200 |
---|---|---|
committer | Alfred E. Heggestad <alfred.heggestad@gmail.com> | 2017-04-27 20:36:20 +0200 |
commit | 51951d59cc2ce6b75c2bc5f75a0c37f51a94c469 (patch) | |
tree | adf89c2d93287cfaef69691684606529612605d6 /src/call.c | |
parent | ea12293e0a6764fb4655420de8e906bd42d90efd (diff) |
Call event handler for call progress/ringing after media has been set up (#240)
The handler of the progress event may want to access the audio object of the call (for example to change the
audio device). This is only possible if the media stream has already been started.
Diffstat (limited to 'src/call.c')
-rw-r--r-- | src/call.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1476,15 +1476,15 @@ static void sipsess_progr_handler(const struct sip_msg *msg, void *arg) break; } - if (media) - call_event_handler(call, CALL_EVENT_PROGRESS, call->peer_uri); - else - call_event_handler(call, CALL_EVENT_RINGING, call->peer_uri); - call_stream_stop(call); if (media) call_stream_start(call, false); + + if (media) + call_event_handler(call, CALL_EVENT_PROGRESS, call->peer_uri); + else + call_event_handler(call, CALL_EVENT_RINGING, call->peer_uri); } |