From 45df25a579edd5423c9d319758d109a74fe8ef33 Mon Sep 17 00:00:00 2001 From: Mark Michelson Date: Tue, 30 May 2017 09:12:47 -0500 Subject: chan_pjsip: Add support for multiple streams of the same type. The stream topology (list of streams and order) is now stored with the configured PJSIP endpoints and used during the negotiation process. Media negotiation state information has been changed to be stored in a separate object. Two of these objects exist at any one time on a session. The active media state information is what was previously negotiated and the pending media state information is what the media state will become if negotiation succeeds. Streams and other state information is stored in this object using the index (or position) of each individual stream for easy lookup. The ability for a media type handler to specify a callback for writing has been added as well as the ability to add file descriptors with a callback which is invoked when data is available to be read on them. This allows media logic to live outside of the chan_pjsip module. Direct media has been changed so that only the first audio and video stream are directly connected. In the future once the RTP engine glue API has been updated to know about streams each individual stream can be directly connected as appropriate. Media negotiation itself will currently answer all the provided streams on an offer within configured limits and on an offer will use the topology created as a result of the disallow/allow codec lines. If a stream has been removed or declined we will now mark it as such within the resulting SDP. Applications can now also request that the stream topology change. If we are told to do so we will limit any provided formats to the ones configured on the endpoint and send a re-invite with the new topology. Two new configuration options have also been added to PJSIP endpoints: max_audio_streams: determines the maximum number of audio streams to offer/accept from an endpoint. Defaults to 1. max_video_streams: determines the maximum number of video streams to offer/accept from an endpoint. Defaults to 1. ASTERISK-27076 Change-Id: I8afd8dd2eb538806a39b887af0abd046266e14c7 --- configs/samples/pjsip.conf.sample | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'configs/samples') diff --git a/configs/samples/pjsip.conf.sample b/configs/samples/pjsip.conf.sample index 3b93bb61f..ed5f93e71 100644 --- a/configs/samples/pjsip.conf.sample +++ b/configs/samples/pjsip.conf.sample @@ -779,6 +779,10 @@ ; The value "yes" is useful for some SIP phones ; (Cisco SPA) to be able to indicate and pick up ; ringing devices. +;max_audio_streams= ; The maximum number of allowed negotiated audio streams + ; (default: 1) +;max_video_streams= ; The maximum number of allowed negotiated video streams + ; (default: 1) ;==========================AUTH SECTION OPTIONS========================= ;[auth] -- cgit v1.2.3