summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-05-08Merge "func_cdr: Allow empty value for CDR dialplan function."Joshua Colp
2017-05-08Merge "stream: ast_stream_clone() cannot copy the opaque user data."Joshua Colp
2017-05-08Merge "netsock2.c: Made get/set addr port avoid potential uninitialized memory."Joshua Colp
2017-05-08Merge "bridge: Fix returning to dialplan when executing Bridge() from AMI."Joshua Colp
2017-05-05stream: ast_stream_clone() cannot copy the opaque user data.Richard Mudgett
ast_stream_clone() cannot copy the opaque user data stored on a stream. We don't know how to clone the data so it isn't copied into the clone. Change-Id: Ia51321bf38ecbfdcc53787ca77ea5fd2cabdf367
2017-05-05netsock2.c: Made get/set addr port avoid potential uninitialized memory.Richard Mudgett
Change-Id: I532052bd7cd95a4b3565485fc01e2a1ea07ee647
2017-05-05func_cdr: Allow empty value for CDR dialplan function.Joshua Colp
A regression was introduced in 12 where passing an empty value to the CDR dialplan function was not longer allowed. This change returns to the behavior of 11 where it is permitted. ASTERISK-26173 Change-Id: I3f148203b54ec088007e29e30005a5de122e51c5
2017-05-04app_confbridge: Fix reference to cfg in menu_template_handlerGeorge Joseph
menu_template_handler wasn't properly accounting for the fact that it might be called both during a load/reload (which isn't really valid but not prevented) and by a dialplan function. In both cases it was attempting to use the "pending" config which wasn't valid in the latter case. aco_process_config is also partly to blame because it wasn't properly cleaning "pending" up when a reload was done and no changes were made. Both of these contributed to a crash if CONFBRIDGE(menu,template) was called in a dialplan after a reload. * aco_process_config now sets info->internal->pending to NULL after it unrefs it although this isn't strictly necessary in the context of this fix. * menu_template_handler now uses the "current" config and silently ignores any attempt to be called as a result of someone uses the "template" parameter in the conf file. Luckily there's no other place in the codebase where aco_pending_config is used outside of aco_process_config. ASTERISK-25506 #close Reported-by: Frederic LE FOLL Change-Id: Ib349a17d3d088f092480b19addd7122fcaac21a7
2017-05-04Merge "SDP: Replace SDP telephone_event option with dtmf option"Jenkins2
2017-05-04Merge "res_rtp_asterisk: Clearing the remote RTCP address causes RTCP failures"Jenkins2
2017-05-04bridge: Fix returning to dialplan when executing Bridge() from AMI.Joshua Colp
When using the Bridge AMI action on the same channel multiple times it was possible for the channel to return to the wrong location in the dialplan if the other party hung up. This happened because the priority of the channel was not preserved across each action invocation and it would fail to move on to the next priority in other cases. This change makes it so that the priority of a channel is preserved when taking control of it from another thread and it is incremented as appropriate such that the priority reflects where the channel should next be executed in the dialplan, not where it may or may not currently be. The Bridge AMI action was also changed to ensure that it too starts the channels at the next location in the dialplan. ASTERISK-24529 Change-Id: I52406669cf64208aef7252a65b63ade31fbf7a5a
2017-05-03bridge_simple: Added support for streamsKevin Harwell
This patch is the first cut at adding stream support to the bridging framework. Changes were made to the framework that allows mapping of stream topologies to a bridge's supported media types. The first channel to enter a bridge initially defines the media types for a bridge (i.e. a one to one mapping is created between the bridge and the first channel). Subsequently added channels merge their media types into the bridge's adding to it when necessary. This allows channels with different sized topologies to map correctly to each other according to media type. The bridge drops any frame that does not have a matching index into a given write stream. For now though, bridge_simple will align its two channels according to size or first to join. Once both channels join the bridge the one with the most streams will indicate to the other channel to update its streams to be the same as that of the other. If both channels have the same number of streams then the first channel to join is chosen as the stream base. A topology change source was also added to a channel when a stream toplogy change request is made. This allows subsystems to know whether or not they initiated a change request. Thus avoiding potential recursive situations. ASTERISK-26966 #close Change-Id: I1eb5987921dd80c3cdcf52accc136393ca2d4163
2017-05-03res_rtp_asterisk: Clearing the remote RTCP address causes RTCP failuresKevin Harwell
When a call gets put on hold RTP is temporarily stopped and Asterisk was setting the remote RTCP address to NULL. Then when RTCP data was received from the remote endpoint, Asterisk would be missing this information when publishing the rtcp_message stasis event. Consequently, message subscribers (in this case res_hep_rtcp) trying to parse the "from" field output the following error: "ast_sockaddr_split_hostport: Port missing in (null)" This patch makes it so the remote RTCP address is no longer set to NULL when stopping RTP. There was only one place that appeared to check if the remote RTCP address was NULL as a way to tell if RTCP was running. This patch added an additional check on the RTCP schedid for that case to make sure RTCP was truly not running. ASTERISK-26860 #close Change-Id: I6be200fb20db647e48b5138ea4b81dfa7962974b
2017-05-03Merge "channels/chan_sip.c: use binding IP address for outgoing TCP SIP ↵Joshua Colp
connections"
2017-05-02cleanup: Change severity of fread short-read warningSean Bright
Many sound files don't have a full frame's worth of data at EOF, so the warning messages were a bit too noisy. So we demote them to debug messages. Change-Id: I6b617467d687658adca39170a81797a11cc766f6
2017-05-02SDP: Replace SDP telephone_event option with dtmf optionRichard Mudgett
The telephone_event option was used as a flag and a bit mapped value in different places when it is a boolean. It is also inadequate to configure the DTMF operation of the RTP instance created for the stream. Change-Id: Ib1addeaf0ce86f07039f2f979cab29405dc5239b
2017-05-02Merge "res_pjsip_t38.c: Fix deadlock in T.38 framehook."Jenkins2
2017-05-02Merge "res_sdp_translator_pjmedia.c: Add TODO notes."Joshua Colp
2017-05-02Merge "SDP: Make SDP translation to/from internal representation more const."Joshua Colp
2017-05-02Merge "stream: Make ast_stream_topology_create_from_format_cap() allow NULL ↵Joshua Colp
cap."
2017-05-01Merge "SDP: Make ast_sdp_state_set_remote_sdp() return error."Jenkins2
2017-05-01Merge "res_pjsip_outbound_authenticator_digest: Add context to log messages"Jenkins2
2017-05-01Merge "SDP: Misc cleanups (Mostly memory leaks)"Jenkins2
2017-05-01Merge "SDP API: Add SSRC-level attributes"Jenkins2
2017-04-29res_pjsip_t38.c: Fix deadlock in T.38 framehook.Richard Mudgett
A deadlock can happen between a channel lock and a pjsip session media container lock. One thread is processing a reINVITE's SDP and walking through the session's media container when it waits for the channel lock to put the determined format capabilities onto the channel. The other thread is writing a frame to the channel and processing the T.38 frame hook. The T.38 frame hook then waits for the pjsip session's media container lock. The two threads are now deadlocked. * Made the T.38 frame hook release the channel lock before searching the session's media container. This fix has been done to several other frame hooks to fix deadlocks. ASTERISK-26974 #close Change-Id: Ie984a76ce00bef6ec9aa239010e51e8dd74c8186
2017-04-28res_pjsip_outbound_authenticator_digest: Add context to log messagesGeorge Joseph
There was no context info in this module's log messages so it was impossible to toubleshoot. Added endpoint or host to all messages and added the realms in the challenge for the "No auth credentials for any realm" message. Change-Id: Ifeed2786f35fbea7d141237ae15625e472acff9b
2017-04-28Merge "chan_vpb.cc: Fix compile error."Jenkins2
2017-04-27Merge "chan_sip: Trigger reinvite if the SDP answer is included in the SIP ACK"George Joseph
2017-04-27res_sdp_translator_pjmedia.c: Add TODO notes.Richard Mudgett
Change-Id: If27ca61f79accc882c3376d2e876d2b44aa1347b
2017-04-27SDP: Make SDP translation to/from internal representation more const.Richard Mudgett
Change-Id: I473a174b869728604b37c60853896b0c458bc504
2017-04-27stream: Make ast_stream_topology_create_from_format_cap() allow NULL cap.Richard Mudgett
Change-Id: Ie29760c49c25d7022ba2124698283181a0dd5d08
2017-04-27SDP: Make ast_sdp_state_set_remote_sdp() return error.Richard Mudgett
Change-Id: I7707c9d872c476d897ff459008652b35142a35e1
2017-04-27SDP: Misc cleanups (Mostly memory leaks)Richard Mudgett
Change-Id: I74431b385da333f2c5f5a6d7c55e70b69a4f05d2
2017-04-27chan_vpb.cc: Fix compile error.Richard Mudgett
Change-Id: I6d9edd34d8b2474222c86f44e379ead61e57a54f
2017-04-27Merge "channel: Add ability to request an outgoing channel with stream ↵Jenkins2
topology."
2017-04-27Merge "frame: Better handle interpolated frames."Jenkins2
2017-04-27Merge "res_pjsip_session: Add cleanup to ast_sip_session_terminate"Jenkins2
2017-04-27Merge "res_pjsip/res_pjsip_callerid: NULL check on caller id name string"Jenkins2
2017-04-27Merge "vector: defaults and indexes"Jenkins2
2017-04-27SDP API: Add SSRC-level attributesMark Michelson
RFC 5576 defines how SSRC-level attributes may be added to SDP media descriptions. In general, this is useful for grouping related SSRCes, indicating SSRC-level format attributes, and resolving collisions in RTP SSRC values. These attributes are used widely by browsers during WebRTC communications, including attributes defined by documents outside of RFC 5576. This commit introduces the addition of SSRC-level attributes into SDPs generated by Asterisk. Since Asterisk does not tend to use multiple SSRCs on a media stream, the initial support is minimal. Asterisk includes an SSRC-level CNAME attribute if configured to do so. This at least gives browsers (and possibly others) the ability to resolve SSRC collisions at offer-answer time. In order to facilitate this, the RTP engine API has been enhanced to be able to retrieve the SSRC and CNAME on a given RTP instance. res_rtp_asterisk currently does not provide meaningful CNAME values in its RTCP SDES items, and therefore it currently will always return an empty string as the CNAME value. A task in the near future will result in res_rtp_asterisk generating more meaningful CNAMEs. Change-Id: I29e7f23e7db77524f82a3b6e8531b1195ff57789
2017-04-27Merge "cleanup: Fix fread() and fwrite() error handling"Joshua Colp
2017-04-27Merge "pjproject_bundled: Add --disable-libwebrtc to configure"Jenkins2
2017-04-27res_pjsip_session: Add cleanup to ast_sip_session_terminateGeorge Joseph
If you use ast_request to create a PJSIP channel but then hang it up without causing a transaction to be sent, the session will never be destroyed. This is due ot the fact that it's pjproject that triggers the session cleanup when the transaction ends. app_chanisavail was doing this to get more granular channel state and it's also possible for this to happen via ARI. * ast_sip_session_terminate was modified to explicitly call the cleanup tasks and unreference session if the invite state is NULL AND invite_tsx is NULL (meaning we never sent a transaction). * chan_pjsip/hangup was modified to bump session before it calls ast_sip_session_terminate to insure that session stays valid while it does its own cleanup. * Added test events to session_destructor for a future testsuite test. ASTERISK-26908 #close Reported-by: Richard Mudgett Change-Id: I52daf6f757184e5544c261f64f6fe9602c4680a9
2017-04-27Merge "res_rtp_asterisk.c: Fix crash in RTCP DTLS operation."Jenkins2
2017-04-27channel: Add ability to request an outgoing channel with stream topology.Joshua Colp
This change extends the ast_request functionality by adding another function and callback to create an outgoing channel with a requested stream topology. Fallback is provided by either converting the requested stream topology into a format capabilities structure if the channel driver does not support streams or by converting the requested format capabilities into a stream topology if the channel driver does support streams. The Dial application has also been updated to request an outgoing channel with the stream topology of the calling channel. ASTERISK-26959 Change-Id: Ifa9037a672ac21d42dd7125aa09816dc879a70e6
2017-04-27Merge "sdp: Add support for T.38"Joshua Colp
2017-04-27Merge "SDP: Ensure SDPs "merge" properly."Joshua Colp
2017-04-26res_pjsip/res_pjsip_callerid: NULL check on caller id name stringKevin Harwell
It's possible for a name in a party id structure to be marked as valid, but the name string itself be NULL (for instance this is possible to do by using the dialplan CALLERID function). There were a couple of places where the name was validated, but the string itself was not checked before passing it to functions like 'strlen'. This of course caused a crashed. This patch adds in a NULL check before attempting to pass it into a function that is not NULL tolerant. ASTERISK-25823 #close Change-Id: Iaa6ffe9d92f598fe9e3c8ae373fadbe3dfbf1d4a
2017-04-26vector: defaults and indexesKevin Harwell
Added an pre-defined integer vector declaration. This makes integer vectors easier to declare and pass around. Also, added the ability to default a vector up to a given size with a default value. Lastly, added functionality that returns the "nth" index of a matching value. Also, updated a unit test to test these changes. Change-Id: Iaf4b51b2540eda57cb43f67aa59cf1d96cdbcaa5
2017-04-26frame: Better handle interpolated frames.Joshua Colp
Interpolated frames are frames which contain a number of samples but have no actual data. Audiohooks did not handle this case when translating an incoming frame into signed linear. It assumed that a frame would always contain media when it may not. If this occurs audiohooks will now immediately return and not act on the frame. As well for users of ast_trans_frameout the function has been changed to be a bit more sane and ensure that the data pointer on a frame is set to NULL if no data is actually on the frame. This allows the various spots in Asterisk that check for an interpolated frame based on the presence of a data pointer to work as expected. ASTERISK-26926 Change-Id: I7fa22f631fa28d540722ed789ce28e84c7f8662b