summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-10-03chan_pjsip: Fix deadlock when masquerading PJSIP channels.Richard Mudgett
Performing a directed call pickup resulted in a deadlock when PJSIP channels were involved. A masquerade needs to hold onto the channel locks while it swaps channel information between the two channels involved in the masquerade. With PJSIP channels, the fixup routine needed to push a fixup task onto the PJSIP channel's serializer. Unfortunately, if the serializer was also processing a task that needed to lock the channel, you get deadlock. * Added a new control frame that is used to notify the channels that a masquerade is about to start and when it has completed. * Added the ability to query taskprocessors if the current thread is the taskprocessor thread. * Added the ability to suspend/unsuspend the PJSIP serializer thread so a masquerade could fixup the PJSIP channel without using the serializer. ASTERISK-24356 #close Reported by: rmudgett Review: https://reviewboard.asterisk.org/r/4034/ ........ Merged revisions 424471 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@424472 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-03sorcery: Prevent SEGV in sorcery_wizard_create when there's no create functionGeorge Joseph
When you call ast_sorcery_create() you don't necessarily know which wizard is going to be invoked. If it happens to be a wizard like 'config' that doesn't have a 'create' virtual function you get a segfault in the sorcery_wizard_create callback. This patch catches the null function pointer, does an ast_assert, and logs an error. Review: https://reviewboard.asterisk.org/r/4044/ ........ Merged revisions 424447 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@424448 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-03PJSIP: Restore functional default for callerid_privacyKinsey Moore
The pjsip config option default fixups from r424263 altered the functional default from "allowed_not_screened" to "allowed". This change restores the functional default value when none is provided. ........ Merged revisions 424426 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@424427 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-03Manager: Add missing fields and documentation for CoreShowChannelsKinsey Moore
This corrects some issues introduced in the responses to the CoreShowChannels AMI command as well as adding documentation for the responses. The command in Asterisk 12 was missing the following fields: Duration, Application, ApplicationData, and BridgedChannel and BridgedUniqueID (replaced with BridgeId). ASTERISK-24262 #close Reported by: Mitch Claborn Review: https://reviewboard.asterisk.org/r/4040/ ........ Merged revisions 424423 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@424424 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-03res_pjsip_session: Reduce SDP size by removing duplicate connection lines.Joshua Colp
Due to the architecture of how media streams are handled each individual handler adds connection details (IP address) for it. The first media stream is then used as the top level SDP connection line. In practice each line ends up being the same so to reduce the SDP size stream-level connection information is also added to the SDP if it differs from the top level SDP connection line. ........ Merged revisions 424414 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@424415 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-02res_pjsip: Make transport cipher option accept a comma separated list of ↵Richard Mudgett
cipher names. Improvements to the res_pjsip transport cipher option. * Made the cipher option accept a comma separated list of OpenSSL cipher names. Users of realtime will be glad if they have more than one name to list. * Added the CLI command 'pjsip list ciphers' so a user can know what OpenSSL names are available for the cipher option. * Updated the cipher option online XML documentation to specify what is expected for the value. * Updated pjsip.conf.sample to not indicate that ALL is acceptable since ALL does not imply a preference order for the ciphers and PJSIP does not simply pass the string to OpenSSL for interpretation. ASTERISK-24199 #close Reported by: Joshua Colp Review: https://reviewboard.asterisk.org/r/4018/ ........ Merged revisions 424393 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@424394 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-02Alembic: Add enumerator value to sippeers -> directmedia - 'outgoing'Jonathan Rose
The 'outgoing' value was left off of the enumerator when first creating the column. This patch adds it, and should gracefully upgrade keeping the existing data in tact. ASTERISK-23781 #close Reported by: Stephen More Review: https://reviewboard.asterisk.org/r/4013/ ........ Merged revisions 424372 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@424373 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-02res_pjsip: document use of rewrite_contact in sample confScott Griepentrog
Without setting rewrite_contact, an invite to an endpoint behind NAT will not reach it - unless the endpoint itself uses STUN or TURN to discover it's public URI. Thus, the use of this should be in the sample documentation. Review: https://reviewboard.asterisk.org/r/4036/ ........ Merged revisions 424337 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@424338 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-01chan_pjsip: Fix an assertion for channels that lack formats on creationJonathan Rose
ASTERISK-24222 #close Reported by: Mark Michelson Review: https://reviewboard.asterisk.org/r/4017/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@424333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-01res_hep: Release allocation reference to configuration.Corey Farrell
ASTERISK-24362 #close Reported by: Corey Farrell Review: https://reviewboard.asterisk.org/r/4026/ ........ Merged revisions 424312 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@424313 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-01res_pjsip: Add 'dtls_fingerprint' option to configure DTLS fingerprint hash.Joshua Colp
During the latest update to DTLS-SRTP support the ability to configure the hash used for fingerprints was added. This gave us two supported ones: SHA-1 and SHA-256. The default was accordingly updated to SHA-256. Unfortunately this configuration ability was not exposed within res_pjsip. This change adds a dtls_fingerprint option that controls it. #SIPit31 ........ Merged revisions 424290 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@424291 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-01res_pjsip_sdp_rtp: Accept DTLS attributes in top level, not just media session.Joshua Colp
#SIPit31 ........ Merged revisions 424287 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@424288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-01PJSIP: Handle defaults properlyKinsey Moore
This updates the code behind PJSIP configuration options with custom handlers to deal with the assigned default values properly where it makes sense and adjusting the default value where it doesn't. Before applying this patch, there were several cases where the default value for an option would prevent that config section from loading properly. Reported by: Thomas Thompson Review: https://reviewboard.asterisk.org/r/4019/ ........ Merged revisions 424263 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@424266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-01PJSIP: Force transport on contact rewriteKinsey Moore
If contact rewriting is enabled but the contact differs in transport from what is actually being used, messages after the initial INVITE transaction can be sent to an incorrect transport/port combination. In the case where this bug occurred the remote party never received a BYE since it was sent to the remote party's TCP port over UDP. Review: https://reviewboard.asterisk.org/r/4032/ ........ Merged revisions 424244 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@424245 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-01chan_sip: Simplify some unref code by removing unlink_peer_from_tables.Walter Doekes
ASTERISK-22945 #related Reported by: ibercom Patches: asterisk11-chan_sip-simplifies.patch uploaded by ibercom (License #6599) ........ Merged revisions 424181 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 424182 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 424183 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@424184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-01chan_sip: Remove excess ref of realtime peer before sip_poke_peer.Walter Doekes
The peer is referenced at the end of sip_poke_peer, it should not get an extra ref before the call to sip_poke_peer. This fixes a memory leak. ASTERISK-22945 #close Reported by: ibercom Tested by: Yuriy Gorlichenko Patches: asterisk11.patch uploaded by ibercom (License #6599) Review: https://reviewboard.asterisk.org/r/4031/ ........ Merged revisions 424176 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 424177 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 424178 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@424179 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-30res_pjsip_sdp_rtp: Don't place an extra whitespace before 'rport' and don't ↵Joshua Colp
put IPv6 addresses in brackets. #SIPit31 ........ Merged revisions 424155 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@424156 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-30res_rtp_asterisk: Ensure that the base and mapped address for candidates is ↵Joshua Colp
present in SDP. This change fixes an issue where ICE candidates put into the SDP did not contain the 'raddr' and 'rport' information for server reflexive and relay candidates. #SIPit31 ........ Merged revisions 424151 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 424152 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@424153 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-29pjsip_cli: Suppress header print on error or no objectsGeorge Joseph
If there's an error on the pjsip command line or there are no objects, don't print the column headers. ASTERISK-24350 #close Reported-by: Brad Latus Tested-by: George Joseph Tested-by: Brad Latus Review: https://reviewboard.asterisk.org/r/4025/ ........ Merged revisions 424128 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@424129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-29autosupport: Fix bashism.Walter Doekes
'==' is bashism (bashspecific, fails when dash is /bin/sh). Anyway, a 'case' works better there. Originally committed in r375059 and r375060 on 2012-10-16 21:13:08. ASTERISK-20567 #close Reported by: Tzafrir Cohen ........ Merged revisions 424117 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 424125 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@424126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-29Simplify UUID generation in several places.Richard Mudgett
Replace code using ast_uuid_generate() with simpler and faster code using ast_uuid_generate_str(). The new code avoids a malloc(), free(), and copy. ........ Merged revisions 424103 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@424105 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-29threadpool.c: Minor cleanup fixes.Richard Mudgett
* Fix threadpool_alloc() prototype. * Add missing off-nominal NULL check of pool in threadpool_alloc(). * searializer_create() does not need to create the object with a lock as the lock is not used. ........ Merged revisions 424096 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@424097 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-27res_pjsip_session: Add additional checks for delaying session refreshes.Joshua Colp
There are certain situations which no checks existed for which need to prevent session refreshes. This includes sending a session refresh with SDP before SDP negotiation has completed and sending a session refresh before the dialog itself has been established. Checks for these have been added. Additionally COLP related UPDATEs were including SDP when it is not needed. Review: https://reviewboard.asterisk.org/r/4008/ ........ Merged revisions 424056 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@424057 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-26res_fax: Fix out of bounds error in update_modem_bits().Richard Mudgett
ASTERISK-24357 #close Reported by: Jeremy Laine Patches: res_fax_bounds.patch (license #6561) patch uploaded by Jeremy Laine Modified patch to not use magic numbers. ........ Merged revisions 423979 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 423983 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 423987 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@423992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-26docs: Escape unescaped minus sign in asterisk.8 manpage.Walter Doekes
ASTERISK-23768 #close Reported by: Jeremy Lainé Patches: escape_manpage_hyphen.patch uploaded by Jeremy Lainé (License #6561) ........ Merged revisions 423915 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 423916 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 423917 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@423918 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-25res_pjsip.c: Add missing off nominal cleanup in ast_sip_push_task_synchronous().Richard Mudgett
* Made memset the std struct in ast_sip_push_task_synchronous() because if DEBUG_THREADS is enabled then uninitialized lock tracking data is used. ........ Merged revisions 423894 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@423895 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-24pjsip_options.c: Fix race condition stopping periodic out of dialog OPTIONS ↵Richard Mudgett
request. The crash on the issues is a result of an invalid transport configuration change when asterisk is restarted. The attempt to send the qualify request fails and we cleaned up. However, the callback is also called which results in a double unref of the objects involved. * Put a wrapper around pjsip_endpt_send_request() to detect when the passed in callback is called because of an error so callers can know to not cleanup. * Made send_request_cb() able to handle repeated challenges (Up to 10). * Fix periodic endpoint qualify OPTIONS sched deletion race by avoiding it. The sched entry will no longer self stop and must be externally stopped. * Added REF_DEBUG description tags to struct sched_data in pjsip_options.c. * Fix some off-nominal ref leaks in schedule_qualify(), qualify_and_schedule(). * Reordered pjsip_options.c module start/stop code to cleanup better on error. ASTERISK-24295 #close Reported by: Rogger Padilla Review: https://reviewboard.asterisk.org/r/3954/ ........ Merged revisions 423866 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@423867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-24chan_sip: Unref outbound proxy structure on dialog/pvt destruction.Walter Doekes
Make sure outbound proxy refs are always unreffed on dialog destruction. Review: https://reviewboard.asterisk.org/r/4016/ ........ Merged revisions 423800 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 423801 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 423802 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@423803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-23Make CDR and CEL unit tests less FRACKy.Mark Michelson
Prior to this commit, CDR and CEL tests were expected to trigger FRACKs (i.e. assertions) due to the fact that the channels they create have no formats on them. Some code was independently added recently that attempts to prevent FRACKs from occurring by failing early when attempting to set up translation paths if one or both channels support no formats. Unfortunately, this attempt to be helpful made the CDR and CEL tests go from simply FRACKing to outright failing and in some cases, failing so badly as to crash Asterisk. This commit seeks to correct past mistakes by adding the ulaw format to channels created by the CDR and CEL unit tests. This makes setting up translation paths succeed, eliminates previously-seen FRACKs, and ultimately causes the unit tests to succeed again. Review: https://reviewboard.asterisk.org/r/4014 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@423783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-22chan_sip: On INVITE retransmission, don't add an extra 503 response.Walter Doekes
INVITE arrives to asterisk, asterisk responds Busy(). If the INVITE is retransmitted, asterisk would generate a 503 in addition to the 486. Thanks Torrey Searle for providing a working regression test. ASTERISK-24335 #close Review: https://reviewboard.asterisk.org/r/4003/ Patches: retrans_486_invite.patch uploaded by Torrey Searle (License #5334) ........ Merged revisions 423720 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 423721 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 423722 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@423723 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-22cli.c: Fix tab completion "module load" when MALLOC_DEBUG is enabled.Walter Doekes
r421600 conflicted with r155763. ASTERISK-24348 #close ........ Merged revisions 423657 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 423658 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 423659 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@423660 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-21main/channel: Unlock channel in off-nominal pathMatthew Jordan
In r423414 (13) / r423415 (trunk), an API call that determines if a format capability structure is empty was added. This returns true if the format capability structure is completely empty or "none". A check for this was added in channel.c's set_format call. Unfortunately, when this check was true, it returned from the function while still holding the channel lock. This caused the CDR unit tests - which have a tendency to create channels with no formats - to deadlock. Whoops. This patch unlocks the channel on the off-nominal path. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@423641 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-20rest-api/api-docs/events.json: Remove non-compliant 'extends' attributeMatthew Jordan
Prior to the release of Swagger 1.2, the attribute 'extends' was being promoted as a possible way to show that a particular object extends an existing object. Instead, the Swagger specification went with the 'subTypes' attribute in the base object. This patch removes the unsupported attribute; the object that the offending objects proposed to extend already lists them in its 'subTypes' attribute. ASTERISK-24300 #close Reported by: Bradley Watkins ........ Merged revisions 423620 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@423621 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-20rest-api/api-docs: Correct basePath in resources to match top resources fileMatthew Jordan
The resources.json file that defines the resource JSON files used with ARI references a basePath of 'http://localhost:8088/ari'. This does not match what is defined in the resource files themselves, 'http://localhost:8088/stasis'. The correct base path is the one that includes 'ari' in the URL; this patch updates the various resource JSON files to have the correct basePath. ASTERISK-24339 #close Reported by: Bradley Watkins ........ Merged revisions 423617 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@423618 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-19res_pjsip_notify: Fix crash on unload/load and don't say the module doesn't ↵Joshua Colp
exist on reload. When unloading the module did not unregister the CLI commands causing a crash upon load when they were registered again. When reloading the module the return value from the config options framework was not checked to determine if an error occurred or not. This caused a message to be output saying the module did not exist when reloading if no changes were present. AST-1433 #close AST-1434 #close ........ Merged revisions 423579 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@423580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-19res_pjsip_sdp_rtp.c: Fix native formats containing formats that were not ↵Richard Mudgett
negotiated. Outgoing PJSIP calls can result in non-negotiated formats listed in the channel's native formats if video formats are listed in the endpoint's configuration. The resulting call could then use a non-negotiated format resulting in one way audio. * Simplified the update of session->req_caps in set_caps(). Why do something in five steps when only one is needed? AFS-162 #close Review: https://reviewboard.asterisk.org/r/4000/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@423561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-19Stasis_channels: Resolve unfinished Dials when doing masqueradesJonathan Rose
Masquerades into channels that are in the dialing state don't end their dial and this goes against the model for things like CDRs and generating Dial end manager actions and such. ASTERISK-24237 #close Reported by: Richard Mudgett Review: https://reviewboard.asterisk.org/r/3990/ ........ Merged revisions 423525 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@423530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-19chan_iax2: Fix a crash when using chan_iax2 jitterbuffer settingsJonathan Rose
Caused by format changes in Asterisk 13 ASTERISK-24265 #close Reported by: Dafi Ni Review: https://reviewboard.asterisk.org/r/3999/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@423524 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-19PJSIP: Prevent T38 framehook being put on wrong channelKinsey Moore
This change gives framehooks a reverse-direction masquerade callback in addition to chan_fixup_cb similar to the callback added to datastores to handle the same situation. The new callback provides the same parameters as the fixup callback, but is called on the new channel's framehooks before moving framehooks from the old channel to the new channel. This gives the framehooks an oppurtunity to decide whether they should remain on the new channel or be removed. This new callback is used to prevent the PJSIP T.38 framehook from remaining on a masqueraded channel if the new channel is not also a PJSIP channel. This was causing a crash when a local channel was masqueraded into a PJSIP channel and the framehook was executed on the local channel since the channel's tech private data was not structured as expected. Review: https://reviewboard.asterisk.org/r/4001/ ........ Merged revisions 423503 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@423504 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-18res_pjsip: Don't require a password when doing userpass authentication.Sean Bright
An empty password is valid for username/password authentication so we should allow password to be empty/not supplied. Review: https://reviewboard.asterisk.org/r/3988 ........ Merged revisions 423481 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@423482 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-18utils: Create ast_strsep function that ignores separators inside quotesGeorge Joseph
This function acts like strsep with three exceptions... * The separator is a single character instead of a string. * Separators inside quotes are treated literally instead of like separators. * You can elect to have leading and trailing whitespace and quotes stripped from the result and have '\' sequences unescaped. Like strsep, ast_strsep maintains no internal state and you can call it recursively using different separators on the same storage. Also like strsep, for consistent results, consecutive separators are not collapsed so you may get an empty string as a valid result. Tested by: George Joseph Review: https://reviewboard.asterisk.org/r/3989/ ........ Merged revisions 423476 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@423478 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-18Add subscription state test events.Mark Michelson
These are needed for a set of batched notification RLS tests that are about to be committed to the testsuite. Review: https://reviewboard.asterisk.org/r/3967 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@423462 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-18res_pjsip_endpoint_identifier_ip: Fix parsing of match value with CIDRJonathan Rose
Also fixes comma separates match lists ASTERISK-24290 #close Reported by: Ray Crumrine Review: https://reviewboard.asterisk.org/r/3995/ ........ Merged revisions 423417 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@423425 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-18bridge_softmix.c: Made use ao2_replace() instead of the inline equivalent.Richard Mudgett
* Clarified some read/write format comments. * Fixed a doxygen tag typo. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@423423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-18astobj2.c/refcounter.py: Fix to deal with invalid object refs.Richard Mudgett
* Make astob2 REF_DEBUG output an invalid object line when an invalid ao2 object ref/unref is attempted. This is similar to the constructor/destructor lines. * Fixed refcounter.py to handle skewed objects that have constructor/destructor states. * Made refcounter.py highlight the invalid ao2 object refs by putting them in their own section of the processed output file. * Made refcounter.py highlight unreffing an object by more than one that results in a negative ref count and the object being destroyed. The abnormally destroyed object is reported in the invalid and finalized object sections of the output. Review: https://reviewboard.asterisk.org/r/3971/ ........ Merged revisions 423349 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 423400 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 423416 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@423418 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-18Add API call to determine if format capability structure is "empty".Mark Michelson
Empty here means that there are no formats in the format_cap structure or the only format in it is the "none" format. I've added calls to check the emptiness of a format_cap in a few places in order to short-circuit operations that would otherwise be pointless as well as to prevent some assertions from being triggered in cases where channels with no formats are used. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@423414 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-18res_fax_spandsp: Properly handle cleanup before starting FAXes.Mark Michelson
If faxing fails at a very early stage, then it is possible for us to pass a NULL t30 state pointer to spandsp, which spandsp is none too pleased with. This patch ensures that we pass the correct pointer to spandsp in the situation where we have not yet set our local t30 state pointer. ASTERISK-24301 #close Reported by Matt Jordan Patches: ASTERISK-24301-fax.diff Uploaded by Mark Michelson (License #5049) ........ Merged revisions 423360 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 423365 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@423372 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-18res_pjsip_pubsub: Add some type safety when generating NOTIFY bodies.Mark Michelson
res_pjsip_pubsub has two separate checks that it makes when a SUBSCRIBE arrives. * It checks that there is a subscription handler for the Event * It checks that there are body generators for the types in the Accept header The problem is, there's nothing that ensures that these two things will actually mesh with each other. For instance, Asterisk will accept a subscription to MWI that accepts pidf+xml bodies. That doesn't make sense. With this commit, we add some type information to the mix. Subscription handlers state they generate data of type X, and body generators state that they consume data of type X. This way, Asterisk doesn't end up in some hilariously mismatched situation like the one in the previous paragraph. ASTERISK-24136 #close Reported by Mark Michelson Review: https://reviewboard.asterisk.org/r/3877 Review: https://reviewboard.asterisk.org/r/3878 ........ Merged revisions 423344 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@423348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-18res_pjsip: ami: Fix error in AMI output when an endpoint has no transportGeorge Joseph
When no transport is associated to an endpoint, the AMI output for PJSIPShowEndpoint indicates an error instead of silently ignoring the missing transport. This patch causes the error to appear only if a transport was specified on the endpoint and the transport doesn't exist. It also fixes an issue with counting the objects that were actually found. ASTERISK-24161 #close ASTERISK-24331 #close Tested by: George Joseph Review: https://reviewboard.asterisk.org/r/3998/ ........ Merged revisions 423282 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@423284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-18Only install dahdi_span_config_hook if DAHDI is enabledDavid M. Lee
This patch changes the install to only install the hook script if DAHDI is enabled. It also adds the script to the uninstall task, and moves the DAHDI_UDEV_HOOK_DIR variable so that it's not between the _MAKEOPTS variables and their comment. This allows installs which specify a --prefix to work normally, as long as they don't enable DAHDI. Review: https://reviewboard.asterisk.org/r/3972/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@423281 65c4cc65-6c06-0410-ace0-fbb531ad65f3