summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Hoffmann <info@cms-db.de>2017-04-27 20:36:20 +0200
committerAlfred E. Heggestad <alfred.heggestad@gmail.com>2017-04-27 20:36:20 +0200
commit51951d59cc2ce6b75c2bc5f75a0c37f51a94c469 (patch)
treeadf89c2d93287cfaef69691684606529612605d6
parentea12293e0a6764fb4655420de8e906bd42d90efd (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.
-rw-r--r--src/call.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/call.c b/src/call.c
index 529b5ac..c057dd4 100644
--- a/src/call.c
+++ b/src/call.c
@@ -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);
}