summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-07-10Merge "bridge_native_rtp.c: Fix direct media video RTP instance ACL check." ↵Jenkins2
into 13
2017-07-10res_pjsip: Fix crash with from_user containing invalid characters.Benjamin Keith Ford
If the from_user field contains certain characters (like @, {, ^, etc.), PJSIP will return a null value for the URI when attempting to parse it. This causes a crash when trying to dial out through a trunk that contains these invalid characters in its from_user field. This change checks the configuration and ensures that an endpoint will not be created if the from_user contains an invalid character. It also adds a null check to the PJSIP URI parsing as a backup. ASTERISK-27036 #close Reported by: Maxim Vasilev Change-Id: I0396fdb5080604e0bdf1277464d5c8a85db913d0
2017-07-07json.c: Add backtrace log to find 'Invalid UTF-8 string' errorsRichard Mudgett
Change-Id: I9020ff9f2b3749904317c0c173f47a1bbed6f929
2017-07-07Merge "app_voicemail: Cleanup ODBC connection handling" into 13Jenkins2
2017-07-06res_rtp_asterisk.c: Fix TURN deadlock by using ICE session group lock.Richard Mudgett
When a message is received on the TURN socket, the code processing the message needs to call into the ICE/STUN session for further processing. This code path locks the TURN group lock then the ICE/STUN group lock. In another thread an ICE/STUN timer can fire off to send a keep alive message over the TURN socket. In this code path, the ICE/STUN group lock is obtained then the TURN group lock is obtained to send the packet. A classic deadlock case if the group locks are not the same. * Made TURN get created using the ICE/STUN session's group lock. NOTE: I was originally concerned that the ICE/STUN session can get recreated by ice_reset_session() for an event like RTCP multiplexing causing a change during SDP negotiation. In this case the TURN group lock would become different. However, TURN is also recreated as part of the ICE/STUN recreation in ice_create() when all known ICE candidates are added to the new ICE session. While the ICE/STUN and TURN sessions are being recreated there is a period where the group locks could be different. ASTERISK-27023 #close Patches: res_rtp_asterisk-turn-deadlock-fix.patch (license #6502) patch uploaded by Michael Walton (modified) Change-Id: Ic870edb99ce4988a8c8eb6e678ca7f19da1432b9
2017-07-06Merge "Fix alembic branches" into 13Joshua Colp
2017-07-06Fix alembic branchesGeorge Joseph
Change-Id: I04f607f084bda9b1b7f626e8e9735c37dc751187
2017-07-05Merge "core: Fix segfault when invoking 'data get' CLI command" into 13Jenkins2
2017-07-05Merge "pjproject_bundled: Allow passing configure options to bundled" into 13Jenkins2
2017-07-05bridge_native_rtp.c: Fix direct media video RTP instance ACL check.Richard Mudgett
The video stream was using the audio stream RTP instance addresses to check if the video RTP gets directed to an allowed direct media Access Control List (ACL) address. There is no guarantee that the video RTP instance uses the same addresses as the audio RTP instance. This looks like it has been a bug since v11 when direct media ACL was first added to chan_sip and then faithfully reproduced through a couple code refactorings into the new bridging architecture. Change-Id: I8ddd56320e0eea769f3ceed3fa5b6bdfb51d681a
2017-07-05Merge "pjsip_distributor.c: Fix deadlock with TCP type transports." into 13George Joseph
2017-07-05Merge "chan_sip: Only when different, add TCP|TLS in autodomain (SIP Domain ↵Jenkins2
Support)." into 13
2017-07-05Merge "pjsip_distributor.c: Fix unidentified_requests hash functions." into 13Jenkins2
2017-07-05Merge "bridge_native_rtp: Keep rtp instance refs on bridge_channel" into 13Jenkins2
2017-07-05Merge "chan_pjsip: Fix ability to send UPDATE on COLP" into 13George Joseph
2017-07-05Merge "channel: Clear channel flag in error branch." into 13Jenkins2
2017-07-05core: Fix segfault when invoking 'data get' CLI commandSean Bright
Invoking 'data get /asterisk/core/channeltypes' caused a crash because of an assumption of a tech's capabilities to be non-NULL. The 'Surrogate' tech, however, does have a NULL capabilities member, resulting in a crash. ASTERISK-27108 #close Change-Id: I2fbe7715681f43d5565d1e1599269468c26b0e0a
2017-07-03chan_sip: Only when different, add TCP|TLS in autodomain (SIP Domain Support).Alexander Traud
When sip.conf contained tcpenable=yes and autodomain=yes, the TCP domain was added in any case, because of a local Boolean-negation error of the return value of ast_sockaddr_cmp. After fixing this error for TCP and TLS, the TLS domain was still always added with tlsenable=yes, because the domains were not compared just on the address but also on the port – and TLS is always on a different port than UDP/TCP. ASTERISK-27106 Change-Id: I14fe9e319e238320b094016980445ef3a5b3337c
2017-07-03chan_sip: Fix a typo for tlsbindaddr in autodomain (SIP Domain Support).Alexander Traud
Because of a copy-and-paste error when the struct ast_sockaddr changed, tlsbindaddr was not added, when sip.conf contained autodomain=yes; see "show sip domains" on the command-line interface (CLI) of Asterisk. ASTERISK-27106 Change-Id: I3d0957150017c223136968ef1266f275d0d6695e
2017-07-01app_voicemail: Cleanup ODBC connection handlingSean Bright
The primary focus of this patch is adding a missing call to ast_odbc_release_obj(), but is also a general cleanup of the ODBC related code in app_voicemail. ASTERISK-27093 #close Change-Id: I8e285142eaeb3146b4287a928276b70db76c902b
2017-07-01channel: Clear channel flag in error branch.Corey Farrell
Clear channel flag AST_FLAG_END_DTMF_ONLY in ast_waitfordigit_full when ast_read returns NULL. ASTERISK-27100 #close Change-Id: Id3039e9a4e74e0cb359f636c9fd0c9740ebf7d9d
2017-06-30Merge "app_queue: Fix returning to dialplan when a queue is empty" into 13Jenkins2
2017-06-30pjsip_distributor.c: Fix deadlock with TCP type transports.Richard Mudgett
When a SIP message comes in on a transport, pjproject obtains the lock on the transport and pulls the data out of the socket. Unlike UDP, the TCP transport does not allow concurrent access. Without concurrency the transport lock is not released when the transport's message complete callback is called. The processing continues and eventually Asterisk starts processing the SIP message. The first thing Asterisk tries to do is determine the associated dialog of the message to determine the associated serializer. To get the associated serializer safely requires us to get the dialog lock. To send a request or response message for a dialog, pjproject obtains the dialog lock and then obtains the transport lock. Deadlock can result because of the opposite order the locks are obtained. * Fix the deadlock by obtaining the serializer associated with the dialog another way that doesn't involve obtaining the dialog lock. In this case, we use an ao2 container to hold the associated endpoint and serializer. The new locks are held a brief time and won't overlap other existing lock times. ASTERISK-27090 #close Change-Id: I9ed63f4da9649e9db6ed4be29c360968917a89bd
2017-06-30pjsip_distributor.c: Fix unidentified_requests hash functions.Richard Mudgett
The OBJ_SEARCH_xxx defines should not be used as if they were individual bits. They represent a multi-bit enumeration value field. Change-Id: I32abc9a475396dab02402a7014357dd94284e17b
2017-06-30Merge "res_rtp_asterisk: Fix issues with ICE renegotiation." into 13Jenkins2
2017-06-30pjproject_bundled: Allow passing configure options to bundledGeorge Joseph
There wasn't any good way to pass options like --host or --build down to the pjproject configure which makes cross-compiling difficult. * Added a new PJPROJECT_CONFIGURE_OPTS environment variable which can be used to pass arbitrary options to pjproject configure. * Automatically set the pjproject configure --host and --build options to match those supplied for the asterisk configure. ASTERISK-27097 #close Reported-by: Kinsey Moore Change-Id: I5fa776e110262851173002a26ffe1172e4c35b2e
2017-06-29chan_pjsip: Fix ability to send UPDATE on COLPGeorge Joseph
When connected_line_method is "invite", we're supposed to determine if the client can support UPDATE and if it can, send UPDATE instead of INVITE to avoid the SDP renegotiation. Not only was pjproject not setting the PJSIP_INV_SUPPORT_UPDATE flag, we were testing that invite_tsx wasn't NULL which isn't always the case. * Updated chan_pjsip/update_connected_line_information to drop the requirement that invite_tsx isn't NULL. * Submitted patch to pjproject sip_inv.c that sets the PJSIP_INV_SUPPORT_UPDATE flag correctly. * Updated pjsip.conf.sample to clarify what happens when "invite" is specified. ASTERISK-27095 Change-Id: Ic2381b3567b8052c616d96fbe79564c530e81560
2017-06-29app_queue: Fix returning to dialplan when a queue is emptyIvan Poddubny
The fix for ASTERISK-25665 introduced a regression. The return value of queue_exec used to be 0 in case of leavewhenempty but it was changed to -1 (returned from wait_our_turn and passed transparently by queue_exec), thus leading to hangup instead of returning back to dialplan. This commit resets the value back to 0 in this case, restoring original behavior. ASTERISK-27065 #close Reported by: Marek Cervenka Change-Id: Id9c83b75aeda463250155e88c5004be52bbca5ac
2017-06-29Merge "app_voicemail: IMAP connection control" into 13Jenkins2
2017-06-28res_rtp_asterisk: Fix issues with ICE renegotiation.Joshua Colp
When re-inviting to add more streams it is possible for the role of existing ICE sessions to be changed to the incorrect value. This results in subsequent refreshes within the sessions getting a role conflict and the ICE session breaking down. This change only sets the role to be the new value if an ICE renegotiation is actually going to happen, otherwise the existing role is preserved. As well if we encounter a situation where a unidirectional ICE negotiation happens and the other side does not send us candidates we will not store any information for sending traffic, even though we know where they are reachable. This change fixes this by using the source of the ICE traffic itself as the target if no candidates are known and we receive some ICE traffic. ASTERISK-27088 Change-Id: I71228181e358917fcefc3100fad21b2fc02a59a9
2017-06-27bridge_native_rtp: Keep rtp instance refs on bridge_channelGeorge Joseph
There have been reports of deadlocks caused by an attempt to send a frame to a channel's rtp instance after the channel has left the native bridge and been destroyed. This patch effectively causes the bridge channel to keep a reference to the glue and both the audio and video rtp instances so what gets started will get stopped. ASTERISK-26978 #close Reported-by: Ross Beer Change-Id: I9e1ac49fa4af68d64826ccccd152593cf8cdb21a
2017-06-27res/res_pjsip_t38: fix incorrect increment of media_countTorrey Searle
The T38 sdp callback incorrectly has a side effect of incrementing the media_count. This can lead to core dumps. Change-Id: I7bb2f4987de4046ec52cfc34e5ea0662dae32af8
2017-06-23res_pjsip: Add DTMF INFO Failback modeTorrey Searle
The existing auto dtmf mode reverts to inband if 4733 fails to be negotiated. This patch adds a new mode auto_info which will switch to INFO instead of inband if 4733 is not available. ASTERISK-27066 #close Change-Id: Id185b11e84afd9191a2f269e8443019047765e91
2017-06-22res/res_pjsip_t38 ensure t38 requests get rejected quicklyTorrey Searle
arm the t38 webhook always, so we can correctly reject a T38 negotiation request when t38 is disabled on a channel Change-Id: Ib1ffe35aee145d4e0fe61dd012580be11aae079d
2017-06-21res_pjsip_mwi.c: Eliminate RAII_VAR in contact delete observerRichard Mudgett
Change-Id: I0bc97c6608de1d1a4228826b3b3be43f162f05f3
2017-06-21res_pjsip_mwi: update unsolicited MWI subscriptions on updating contactAlexei Gradinari
Do not need to unsubscribe/subscribe on creating the ednpoint's contact. The modified function create_mwi_subscriptions_for_endpoint adds the subscription only if it does not exist. The subscriptions aren't added for active contacts which are retrieved on startup from realtime if mwi_disable_initial_unsolicited=yes. Because the mwi_contact_added is not called. So the subscriptions also should be created on updating contact. ASTERISK-26230 #close Change-Id: I47e265af9296ca09aa42a316fdacac104148cee4
2017-06-21Merge "core_local: local channel data not being properly unref'ed and ↵Jenkins2
unlocked" into 13
2017-06-21Merge "bridge: stuck channel(s) after failed attended transfer" into 13Joshua Colp
2017-06-21core_local: local channel data not being properly unref'ed and unlockedKevin Harwell
In an earlier version of Asterisk a local channel [un]lock all functions were added in order to keep a crash from occurring when a channel hung up too early during an attended transfer. Unfortunately, when a transfer failure occurs and depending on the timing, the local channels sometime do not get properly unlocked and deref'ed after being locked and ref'ed. This happens because the underlying local channel structure gets NULLed out before unlocking. This patch reworks those [un]lock functions and makes sure the values that get locked and ref'ed later get unlocked and deref'ed. ASTERISK-27074 #close Change-Id: Ice96653e29bd9d6674ed5f95feb6b448ab148b09
2017-06-21bridge: stuck channel(s) after failed attended transferKevin Harwell
If an attended transfer failed it was possible for some of the channels involved to get "stuck" because Asterisk was not hanging up the transfer target. This patch ensures Asterisk hangs up the transfer target when an attended transfer failure occurs. ASTERISK-27075 #close Change-Id: I98a6ecd92d3461ab98c36f0d9451d23adaf3e5f9
2017-06-20Merge "res_corosync: Change thread stack size" into 13Jenkins2
2017-06-20Merge "cdr: fix mistake spelling of a word for Unanswered." into 13Jenkins2
2017-06-20Merge "res_pjsip_mwi: unsubscribe unsolicited MWI on deleting endpoint last ↵Jenkins2
contact" into 13
2017-06-20cdr: fix mistake spelling of a word for Unanswered.Rodrigo Ramírez Norambuena
Change-Id: I7a610bef369924523a445c7e849ee88cc45dc5df
2017-06-19app_voicemail: IMAP connection controlAlexei Gradinari
A new global option "imap_poll_logout" was added to specify whether need to disconnect from the IMAP server after polling of mailboxes. ASTERISK-27068 #close Closing IMAP connection after loading mailbox from voicemail.conf ASTERISK-24052 #close Change-Id: Ib7558ba04516240a32b65f42e9be64372a0ae12a
2017-06-19Merge "res_stasis: Plug reference leak on stolen channels" into 13Jenkins2
2017-06-19Merge "app_voicemail: IMAP logout on reload/unload" into 13George Joseph
2017-06-19Merge "res_pjsip: New endpoint option "notify_early_inuse_ringing"" into 13Jenkins2
2017-06-16res_pjsip_mwi: unsubscribe unsolicited MWI on deleting endpoint last contactAlexei Gradinari
If the endpoint's last contact is deleted unsolicited MWI has to be unsubscribed. ASTERISK-27051 #close Change-Id: I33e174e0b9dba0998927d16d6d100fda5c7254e0
2017-06-16Merge "formats/format_g729: Fix typo in comment" into 13Jenkins2