summaryrefslogtreecommitdiff
path: root/res
AgeCommit message (Collapse)Author
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-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-20Merge "res_corosync: Change thread stack size" into 13Jenkins2
2017-06-20Merge "res_pjsip_mwi: unsubscribe unsolicited MWI on deleting endpoint last ↵Jenkins2
contact" into 13
2017-06-19Merge "res_stasis: Plug reference leak on stolen channels" into 13Jenkins2
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-16res_stasis: Plug reference leak on stolen channelsGeorge Joseph
When a stasis channel is stolen by another app, the control structure is unreffed but never unlinked from the app_controls container. This causes the channel reference to leak. Added OBJ_UNLINK to the callback in channel_stolen_cb. Also added some additional channel lifecycle debug messages to channel.c. ASTERISK-27059 #close Repoorted-by: George Joseph Change-Id: Ib820936cd49453f20156971785e7f4f182c56e14
2017-06-16res_pjsip: New endpoint option "notify_early_inuse_ringing"Alexei Gradinari
This option was added to control whether to notify dialog-info state 'early' or 'confirmed' on Ringing when already INUSE. The value "yes" is useful for some SIP phones (Cisco SPA) to be able to indicate and pick up ringing devices. ASTERISK-26919 #close Change-Id: Ie050bc30023543c7dfb4365c5be3ce58c738c711
2017-06-16Merge "res_ari: Add "module loaded" check to ari stubs" into 13Jenkins2
2017-06-16res_corosync: Change thread stack sizeJan Friesse
In Corosync 2.x libraries were changed to use LibQB IPC. Sadly LibQB IPC doesn't support copy-free access to received buffer, so Corosync libraries were rewritten to use stack as buffer. Mostly the needed stack size is quite small, but for all *_dispatch functions, 1MiB is needed. Asterisk function ast_pthread_create_background set stack size for new thread to much smaller AST_BACKGROUND_STACKSIZE (~500KiB). This results in Asterisk crash when running with Corosync 2.x. Patch solves this issue by creating it's own version of ast_pthread_create_background which sets stack size to much higher value (actually it's AST_BACKGROUND_STACKSIZE + 3MiB). Another problem may appear when "corosync show members" netconsole command is executed. It is also executed in thread and also has only 500KiB stack size. Sadly it calls corosync_cfg_get_node_addrs which again needs at least 1MiB stack. Solution is to use HAVE_COROSYNC_CFG_STATE_TRACK as a discriminator between Corosync 1.x and 2.x. If 1.x is found, nothing changes. If 2.x is found, NodeID is displayed instead of IP address. ASTERISK-25370 #close Reported by: mdu113 Change-Id: Id95b0d21ab6e708e7d74ad8786c587211676fa08
2017-06-15res_ari: Add "module loaded" check to ari stubsGeorge Joseph
The recent change to make the use of LOAD_DECLINE more consistent caused res_ari to unload itself before declining if the ari.conf file wasn't found. The ari stubs though still tried to use the configuration resulting in segfaults. This patch creates a new CHECK_ARI_MODULE_LOADED macro which tests to see if res_ari is actually loaded and causes the stubs to also decline if it isn't. The macro was then added to the mustache template's "load_module" function. ASTERISK-27026 #close Reported-by: Ronald Raikes Change-Id: I263d56efa628ee3c411bdcd16d49af6260c6c91d
2017-06-15Merge "res_pjsip_pubsub: Fix reference to released endpoint" into 13Jenkins2
2017-06-15Merge "res_pjsip_refer/session: Calls dropped during transfer" into 13Jenkins2
2017-06-14Merge "res_rtp_asterisk: Fix ssrc change for rtcp srtp" into 13George Joseph
2017-06-14Merge "res_pjsip_session: Correct inverted test in ↵Jenkins2
session_outgoing_nat_hook" into 13
2017-06-14res_pjsip_pubsub: Fix reference to released endpointGeorge Joseph
destroy_subscription was attempting to get the id of the subscription tree's endpoint after we'd already called ao2_cleanup on it causing a segfault. Moved the cleanup until after the debug statement and since endpoint could also be NULL at this point, check for that as well. ASTERISK-27057 #close Reported-by: Ryan Smith Change-Id: Ice0a7727f560cf204d870a774c6df71e159b1678
2017-06-14res_pjsip_session: Correct inverted test in session_outgoing_nat_hookGeorge Joseph
There was a typo introduced in commit 776ffd77 which was preventing the transport's external media address from being used. ASTERISK-27024 #close Reported-by: Christopher van de Sande patches: patch.diff submitted by Florian Floimair (license 6892) Change-Id: I7ec617171eaa2d86d2680b00cf37d5088adafc27
2017-06-14res_pjsip_transport_websocket: Add NULL check in get_write_timeoutJørgen H
Added check for NULL return value when calling ast_sorcery_retrieve_by_id in function get_write_timeout ASTERISK-27046 Change-Id: I9357717278da631c3a1cb502c412693929b0cb41
2017-06-14Merge "res_pjsip_mwi: don't create mwi subscriptions if initial unsolicited ↵Jenkins2
disabled" into 13
2017-06-14res_rtp_asterisk: Fix ssrc change for rtcp srtpGeorge Joseph
It looks like there was a copy/paste error in ast_rtp_change_source where if there was a rtcp srtp instance, instead of updating its ssrc we were updating the srtp instance ssrc twice. ASTERISK-27022 #close Reported-by: Michael Walton Change-Id: Ic88f3aee7227b401c58745ac265ff92c19620095
2017-06-13res_pjsip_refer/session: Calls dropped during transferKevin Harwell
When doing an attended transfer it's possible for the transferer, after receiving an accepted response from Asterisk, to send a BYE to Asterisk, which can then be processed before Asterisk has time to start and/or complete the transfer process. This of course causes the transfer to not complete successfully, thus dropping the call. This patch makes it so any BYEs received from the transferer, after the REFER, that initiate a session end are deferred until the transfer is complete. This allows the channel that would have otherwise been hung up by Asterisk to remain available throughout the transfer process. ASTERISK-27053 #close Change-Id: I43586db79079457d92d71f1fd993be9a3b409d5a
2017-06-12res_pjsip_mwi: don't create mwi subscriptions if initial unsolicited disabledAlexei Gradinari
If sending unsolicited mwi to all endpoints on startup is disabled (mwi_disable_initial_unsolicited=yes) do not need to create subscriptions. If there are many (thousands) realtime endpoints configured with unsolicited mwi and Vociemail Storage configured as ODBC or IMAP there will be huge number of DB/IMAP requests on startup. ASTERISK-26230 #close Change-Id: I50ae909639e3ee298b931a54def4b2b9e0fb86c5
2017-06-07pjsip: Extend 'asymmetric_rtp_codec' option to include us changing.Joshua Colp
PJSIP support in Asterisk differs from chan_sip in that it allows media to be sent as-is without transcoding provided the codecs were negotiated in the SDP. This is allowed according to the RFC. Support for this differs quite a lot though and some endpoints do not handle it well. This change extends the 'asymmetric_rtp_codec' option to also cover this case. When set to no (the default) the code behaves as chan_sip does - the best codec is selected and we will only ever send that, unless we change what we are sending if the remote side changes. When set to yes we will send media as-is without transcoding if the codec has been negotiated in the SDP. ASTERISK-26996 Change-Id: Ib1647f6902a0843e8c435946f831c2159e8d1d51
2017-06-07Merge "res_pjsip: Add support for returning only reachable contacts and use ↵Jenkins2
it." into 13
2017-06-06res_rtp_multicast: Use consistent timestamps when possibleSean Bright
When a frame destined for a MulticastRTP channel does not have timing information (such as when an 'originate' is done), we generate the RTP timestamps ourselves without regard to the number of samples we are about to send. Instead, use the same method as res_rtp_asterisk and 'predict' a timestamp given the number of samples. If the difference between the timestamp that we generate and the one we predict is within a specific threshold, use the predicted timestamp so that we end up with timestamps that are consistent with the number of samples we are actually sending. Change-Id: I2bf0db3541b1573043330421cbb114ff0f22ec1f
2017-06-06res_pjsip: Add support for returning only reachable contacts and use it.Joshua Colp
This introduces the ability for PJSIP code to specify filtering flags when retrieving PJSIP contacts. The first flag for use causes the query code to only retrieve contacts that are not unreachable. This change has been leveraged by both the Dial() process and the PJSIP_DIAL_CONTACTS dialplan function so they will now only attempt calls to contacts which are not unreachable. ASTERISK-26281 Change-Id: I8233b4faa21ba3db114f5a42e946e4b191446f6c
2017-06-06Merge "format: Reintroduce smoother flags" into 13Jenkins2
2017-06-06Merge "res_srtp: Add support for libsrtp2" into 13Joshua Colp
2017-06-01Merge "stasis_recording: Correct ast_asprintf error checking" into 13Jenkins2
2017-06-01Merge "res_pjsip: New endpoint option "refer_blind_progress"" into 13Jenkins2
2017-05-30stasis_recording: Correct ast_asprintf error checkingSean Bright
ASTERISK-27021 #close Reported by: Tim Morgan Change-Id: I0ac061f040093e806c3b1f4e2340864f3ce4dd75
2017-05-30format: Reintroduce smoother flagsSean Bright
In review 4843 (ASTERISK-24858), we added a hack that forced a smoother creation when sending signed linear so that the byte order was adjusted during transmission. This was needed because smoother flags were lost during the new format work that was done in Asterisk 13. Rather than rolling that same hack into res_rtp_multicast, re-introduce smoother flags so that formats can dictate their own options. Change-Id: I77b835fba0e539c6ce50014a984766f63cab2c16
2017-05-26res_srtp: Add support for libsrtp2Sean Bright
ASTERISK-25294 #close Reported by: Tzafrir Cohen ASTERISK-26976 #close Reported by: Alex Change-Id: I789b1c3d1ed31365bbd9339fa58ef36f48833c40
2017-05-26Merge "asterisk: Audit locking of channel when manipulating flags." into 13Jenkins2
2017-05-26Merge "res_agi: Fix malformed AGI usage response" into 13Jenkins2
2017-05-25Merge "res_agi: Allow configuration of audio format of EAGI pipe" into 13George Joseph
2017-05-25Merge "res_agi: Prevent crash when SET VARIABLE called without arguments" ↵Jenkins2
into 13
2017-05-24Merge "res_agi: Clarify 'RECORD FILE' documentation" into 13Jenkins2
2017-05-24Merge "res_rtp_asterisk: rtcp mux using the wrong srtp unprotecting ↵Jenkins2
algorithm" into 13
2017-05-23res_agi: Allow configuration of audio format of EAGI pipeSean Bright
This change allows the format of the EAGI audio pipe to be changed by setting the dialplan variable 'EAGI_AUDIO_FORMAT' to the name of one of the loaded formats. ASTERISK-26124 #close Change-Id: I7a10fad401ad2a21c68c2e7246fa357d5cee5bbd
2017-05-23res_agi: Clarify 'RECORD FILE' documentationSean Bright
Documented the 'beep' option in both the parameters list and the command description. ASTERISK-23839 #close Change-Id: I4970395c922dbdce3f7cf0f56d5b065ec9aa53ea
2017-05-23res_agi: Prevent crash when SET VARIABLE called without argumentsSean Bright
Explicitly check that the appropriate number of arguments were passed to SET VARIABLE before attempting to reference them. Also initialize the arguments array to zeroes before populating it. ASTERISK-22432 #close Change-Id: I5143607d80a2724f749c1674f3126b04ed32ea97
2017-05-23res_agi: Fix malformed AGI usage responseSean Bright
If the generated XML documentation for a command does not end with a \n, the postamble of the usage message does not appear on its own line. ASTERISK-25662 #close Change-Id: If190f1e9e37fe215fed95897d78d4a6e142b0020
2017-05-23res_format_attr_h26x: Trim blanks in fmtp attributesSean Bright
Some devices separate format attributes with a semicolon followed by a space, so trim blanks before trying to match them. ASTERISK-27008 #close Change-Id: Ia44cb2e4fef5c73dc541a29da79cb0e19c22d9cc
2017-05-22res_rtp_asterisk: rtcp mux using the wrong srtp unprotecting algorithmKevin Harwell
When using rtcp mux if an rtcp payload came in it would still use the srtp unprotect algorithm instead of the srtp unprotect rtcp method. Since rtcp data was being passed to the rtp unprotect method this would result in an error. This patch ensures that the correct unprotect method is chosen by making sure the passed in rtcp flag is appropriately set when rtcp mux is enabled and an rtcp payload is received. ASTERISK-26979 #close Change-Id: Ic5409f9d1a267f1d4785fc5aed867daaecca6241