Commit Graph

25469 Commits

Author SHA1 Message Date
Rusty Newton
24def593a5 pjsip.conf: privkey_file should be priv_key_file, mediaencryption=yes should be mediaencryption=sdes
privkey_file was missed in the snake case update. An example included an invalid value for the mediaencryption option.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@414780 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-28 20:52:13 +00:00
Matthew Jordan
21281af657 AMI/ARI: Update version numbers
Update the semantic versioning of ARI to 1.3.0 and AMI to 2.3.0 to account for
backwards compatible changes going from 12.2.0 to 12.3.0.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@414765 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-28 17:45:49 +00:00
Matthew Jordan
7be30fb57a ast-db-manage/cdr/env.py: Don't fail if a config file can't be loaded
When generating SQL files via the repotools alembic_creator.py script, a
configuration object is used programatically with SQLAlechemy, as opposed to
a configuration file. This patch ignores failures to interpret a config file,
as ... there isn't one in this case.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@414763 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-28 17:43:36 +00:00
Richard Mudgett
8e5cb1b250 res_pjsip_session: Fix leaked video RTP ports.
Simply enabling PJSIP to negotiage a video codec (e.g., h264) would leak
video RTP ports if the codec were not negotiated by an incoming call.

* Made add_sdp_streams() associate the handler with the media stream if
the handler handled the media stream.  Otherwise, when the
ast_sip_session_media object was destroyed it didn't know how to clean up
the RTP resources.

* Fixed sdp_requires_deferral() associating the handler with the media
stream when deciding if the SDP processing needs to be deferred for T.38.
Like the leaked video RTP ports, the T.38 handler needs to clean up
allocated resources from deciding if SDP processing needs to be deffered.

* Cleaned up some dead code in handle_incoming_sdp() and
sdp_requires_deferral().

ASTERISK-23721 #close
Reported by: cervajs

Review: https://reviewboard.asterisk.org/r/3571/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@414749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-28 16:54:31 +00:00
Richard Mudgett
9df8c67a44 app_agent_pool: Return to dialplan if the agent fails to ack the call.
Improvements to the agent pool functionality.

* AgentRequest no longer hangs up the caller if the agent fails to connect
with the caller.  It now continues in the dialplan.

* AgentRequest returns AGENT_STATUS set to NOT_CONNECTED if the agent
failed to connect with the call.  Most likely because the agent did not
acknowledge the call in time or got disconnected.

* The agent alerting play file configured by the agent.conf custom_beep
option can now be disabled by setting the option to an empty string.  The
agent is effectively alerted to a call presence when MOH stops.

* Fixed bridge reference leak when the agent connects with a caller.

ASTERISK-23499 #close
Reported by: Matt Jordan

Review: https://reviewboard.asterisk.org/r/3551/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@414747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-28 16:24:54 +00:00
Joshua Colp
f72066ddb9 res_config_odbc: Use dynamically sized buffers to store row data so values do not get truncated.
ASTERISK-23582 #close
ASTERISk-23582 #comment Reported by: Walter Doekes

Review: https://reviewboard.asterisk.org/r/3557/
........

Merged revisions 414693 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 414694 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@414695 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-28 11:37:00 +00:00
Walter Doekes
b30bd9a8e4 chan_unistim: Unlock mutex in rare OOM condition.
#ASTERISK-23792 #close
Reported by: Peter Whisker

Review: https://reviewboard.asterisk.org/r/3567/
........

Merged revisions 414677 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@414678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-28 09:43:03 +00:00
Walter Doekes
4b1e43831c chan_sip: Start session timer at 200, not at INVITE.
Asterisk started counting the session timer at INVITE while the other
end correctly started at 200. This meant that for short session-expiries
(90 seconds) combined with long ringing times (e.g. 30 seconds), asterisk
would wrongly assume that the timer was hit before the other end thought
it was time to send a session refresh. This resulted in prematurely
ended calls.

This changes the session timer to start counting first at 200 like RFC
says it should.

(Also removed a few excess NULL checks that would never hit, because if
they did, asterisk would have crashed already.)

ASTERISK-22551 #close
Reported by: i2045 

Review: https://reviewboard.asterisk.org/r/3562/
........

Merged revisions 414620 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 414628 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@414636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-27 21:21:29 +00:00
Walter Doekes
01332cad9b res_config_odbc: Fix old and new ast_string_field memory leaks.
The ODBC realtime driver uses ^NN parameter encoding to cope with the
special meaning of the semi-colon. A semi-colon in a field is
interpreted as if the key was supplied twice, something which isn't
otherwise possible with fixed database columns. E.g. allow=alaw;ulaw
is parsed as allow=alaw and allow=ulaw. A literal semi-colon is
rewritten to ^3B when stored in the database.

The module uses a stringfield to efficiently store the encoded
parameters. However, this stringfield wasn't always freed in some
off-nominal cases.

Commit r413241 fixed initialization so the encoding for INSERT and
DELETE queries wouldn't crash. (Only SELECTs and UPDATEs worked
apparently.) But that commit forgot the frees. This change cleans
that up.

Review: https://reviewboard.asterisk.org/r/3555/
........

Merged revisions 414564 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 414565 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@414566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-27 20:02:06 +00:00
Matthew Jordan
af9c05456e core_unreal: Prevent double free of core_unreal pvt
When a channel is destroyed (such as via ast_channel_release in off nominal
paths in core_unreal), it will attempt to free (via ast_free) the channel tech
pvt. This is problematic for a few reasons:
1. The channel tech pvt is an ao2 object in core_unreal. Free'ing the pvt
   directly is no good.
2. The channel tech pvt's reference count is dropped just prior to calling
   ast_channel_release, resulting in the pvt's destruction. Hence, the
   channel destructor is free'ing an invalid pointer.

This patch keeps the dropping of the reference count, but sets the pvt to
NULL on the channel prior to releasing it. This models what would occur if the
channel was hung up directly.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@414542 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-25 02:30:51 +00:00
Matthew Jordan
0a800bb1bc test_cel: Fix unit tests broken due to event def changes from res_corosync
This patch instructs test_cel to skip any IE types it doesn't care about. The
addition of the raw and bitfield types caused the tests to fail.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@414528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-23 17:35:52 +00:00
Kinsey Moore
b2992655d1 Fix signed/unsigned build warnings
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@414474 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-23 14:35:00 +00:00
Scott Griepentrog
3c34202363 ARI: Add ability to raise arbitrary User Events
User events can now be generated from ARI.  Events can be signalled with
arbitrary json variables, and include one or more of channel, bridge, or
endpoint snapshots.  An application must be specified which will receive
the event message (other applications can subscribe to it).  The message
will also be delivered via AMI provided a channel is attached.  Dialplan
generated user event messages are still transmitted via the channel, and
will only be received by a stasis application they are attached to or if
the channel is subscribed to.

This change also introduces the multi object blob mechanism used to send
multiple snapshot types in a single message.  The dialplan app UserEvent
was also changed to use multi object blob, and a new stasis message type
created to handle them.

ASTERISK-22697 #close
Review: https://reviewboard.asterisk.org/r/3494/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@414405 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-22 16:08:55 +00:00
Richard Mudgett
8c6805e3c9 app_meetme: Don't interrupt MOH for waitmarked users.
Occasionally, when the last marked user leaves the conference, waitmarked
users don't get MOH if MOH is supposed to be played while a waitmarked
user is waiting for another marked user.

* Made not interrupt MOH when the user is a waitmarked user.  The
waitmarked user doesn't need to hear any leave announcements from the
conference as the user would have already heard different leave
announcements if they were enabled.  Apparently DAHDI occasionally sends
unending non-silent streams to these users or a normal user still in the
conference has continuous high background noise.  These non-silent streams
cause MOH to be suspended while the never ending "announcement" is played.

Issue caused by ASTERISK-13680.

AST-1349 #close
Reported by: Tyler Stewart

Review: https://reviewboard.asterisk.org/r/3543/
........

Merged revisions 414401 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 414402 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@414404 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-22 16:00:42 +00:00
Jonathan Rose
11d1a417a5 res_pjsip_refer: Fix bugs involving Parking/PJSIP/transfers
PJSIP would never send the final 200 Notify for a blind transfer
when transferring to parking. This patch fixes that. In addition,
it fixes a reference leak when performing blind transfers to
non-bridging extensions.

Review: https://reviewboard.asterisk.org/r/3485/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@414400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-22 15:44:11 +00:00
Matthew Jordan
4a6d2b4175 UPGRADE: Add note for REF_DEBUG flag
........

Merged revisions 414345 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 414346 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@414347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-22 14:01:05 +00:00
Matthew Jordan
10a58f6a7c res_corosync: Update module to work with Stasis (and compile)
This patch fixes res_corosync such that it works with Asterisk 12. This
restores the functionality that was present in previous versions of
Asterisk, and ensures compatibility with those versions by restoring the
binary message format needed to pass information from/to them.

The following changes were made in the core to support this:
 * The event system has been partially restored. All event definition and
   event types in this patch were pulled from Asterisk 11. Previously, we had
   hoped that this information would live in res_corosync; however, the
   approach in this patch seems to be better for a few reasons:
   (1) Theoretically, ast_events can be used by any module as a binary
       representation of a Stasis message. Given the structure of an ast_event
       object, that information has to live in the core to be used universally.
       For example, defining the payload of a device state ast_event in
       res_corosync could result in an incompatible device state representation
       in another module.
   (2) Much of this representation already lived in the core, and was not
       easily extensible.
   (3) The code already existed. :-)
 * Stasis message types now have a message formatter that converts their
   payload to an ast_event object.
 * Stasis message forwarders now handle forwarding to themselves. Previously
   this would result in an infinite recursive call. Now, this simply creates a
   new forwarding object with no forwards set up (as it is the thing it is
   forwarding to). This is advantageous for res_corosync, as returning NULL
   would also imply an unrecoverable error. Returning a subscription in this
   case allows for easier handling of message types that are published directly
   to an aggregate topic that has forwarders.

Review: https://reviewboard.asterisk.org/r/3486/

ASTERISK-22912 #close
ASTERISK-22372 #close



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@414330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-22 11:51:56 +00:00
Richard Mudgett
8073a91ce9 core_unreal: Only block media frames when a generator is on both ends of an unreal channel.
The fix for ASTERISK-12292 was a bit too aggressive.  You could have
generators pointed at each other on local channels but need to get other
kinds of frames such as DTMF or CONNECTED_LINE frames accross.
........

Merged revisions 414269 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 414270 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@414272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-21 22:17:37 +00:00
Scott Griepentrog
f4ec322326 pbx.c: prevent potential crash from recursive replace()
Recurisve usage of replace() resulted in corruption of the
temporary string storage and potential crash.  By changing
the string to be allocated separtely per instance, this is
eliminated.

ASTERISK-23650 #comment Reported by: Roel van Meer
ASTEIRSK-23650 #close

Review: https://reviewboard.asterisk.org/r/3539/
........

Merged revisions 414214 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 414215 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@414216 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-21 19:07:35 +00:00
Paul Belanger
bad0d47429 Replace __ast_answer with ast_raw_answer in app_control_answer
While load testing an ARI application, I noticed asterisk was returning HTTP 500
internal server errors on channels/:id/answer.  After talking to #asterisk-dev,
the issue appeared to be a lack of media flowing after __ast_answer() was
called.  So now, we call ast_raw_answer instead and no longer wait for media.

ASTERISK-23758 #close
Review: https://reviewboard.asterisk.org/r/3549/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@414195 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-19 19:50:44 +00:00
Alexandr Anikin
e068a8ee2e chan_ooh323: fix h323_log full path name
* fix to use astlogdir option for h323_log file instead of hardcoded

ASTERISK-23754 #close

Reported by: Igor Goncharovsky
Patches:
	ooh323_logger_patch.diff
........

Merged revisions 414152 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 414153 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@414154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-19 13:46:37 +00:00
Matthew Jordan
ec93bb462b Undo r414122
The Test Suite caught a few problems, undoing until those are resolved


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@414137 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-19 01:09:39 +00:00
Matthew Jordan
dc0de28db0 bridge_native_rtp/bridge_channel: Fix direct media issues due to frame hook
This patch fixes issues with direct media bridges that occur after a blind
transfer. These issues were caught by the (currently failing)
pjsip/transfers/blind_transfer/caller_direct_media test.

The test currently fails primarily for two reasons:
(1) When Bob and Charlie (the transfer target and the transfer destination)
    enter a bridge together, the framehook remains on the transfer target
    channel until both channels are in the bridge. As it consumes voice frames,
    the initial bridge type is a simple bridge. The framehook is removed when
    both channels are in the bridge; however, this does not currently cause the
    bridging framework to re-evaluate the bridge. This patch adds a
    AST_SOFTHANGUP_UNBRIDGE poke to the transfer target channel when a
    framehook is removed so the bridge can re-evaluate itself.

(2) When a channel leaves a native RTP bridge, it may be leaving due to being
    hung up. Sending a re-INVITE to a channel that is about to be hung up is
    not nice - in fact, there's a good chance we'll send the BYE request before
    the channel has had a chance to send back a 200 OK. To be somewhat nicer,
    this patch adds a function to channel.h that allows the bridging framework
    to query for exactly why a channel is leaving a bridge via the channel's
    soft hangup flags. This allows it to only send the re-INVITE if there's a
    chance the channel will survive the native bridging experience.

Review: https://reviewboard.asterisk.org/r/3535/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@414122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-18 20:29:12 +00:00
Richard Mudgett
dd321a97da chan_dahdi: Fix analog dialtone detection.
* Check if waitingfordt (waitfordialtone) is enabled in dahdi_read() to
allow the DSP to operate early enough to detect dialtone.

* Made use the correct variable in my_check_waitingfordt().

ASTERISK-23709 #close
Reported by: Steve Davies
Patches:
      dialtone_detect_fix (license #5012) patch uploaded by Steve Davies

Review: https://reviewboard.asterisk.org/r/3534/
........

Merged revisions 414067 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 414068 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@414069 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-16 20:05:24 +00:00
Richard Mudgett
7871d90d05 sig_pri.c: Pull the pri_dchannel() PRI_EVENT_RING case into its own function.
* Populate the CALLERID(ani2) value (and the special CALLINGANI2 channel
variable) with the ANI2 value in addition to the PRI specific ANI2 channel
variable.

* Made complete snapshot staging with the channel lock held.  All channel
snapshots need to be done while the channel lock is held.
........

Merged revisions 414050 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@414051 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-16 17:30:10 +00:00
Richard Mudgett
57e5757323 app_meetme: Fix overwrite of DAHDI conference data structure.
Starting a conference recording using the admin menu overwrites the DAHDI
conference data structure used to modify the admin user's conference mute
mode.

* Made no longer pass the user's DAHDI conference data structure into the
menu functions.  The menu now uses its own DAHDI conference data
structure to start the recording channel.

* Moved the unlock conf->playlock to before playing the conf-full message.
No sense keeping the lock while that prompt is playing.  The user is never
going to get into the conference at that point.
........

Merged revisions 413991 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 413992 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413993 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-15 21:54:06 +00:00
Walter Doekes
1cfd64bc99 res_musiconhold: Minor cleanup.
Fix a few free()'s that should be ast_free()'s. Reverted an old
workaround that isn't necessary. Reorder a tiny bit of code.
Remove a bit of commented-out code.

Review: https://reviewboard.asterisk.org/r/3536/
........

Merged revisions 413894 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 413895 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-14 15:39:10 +00:00
Jonathan Rose
518dbd92f6 chan_sip: Add TLS and SRTP status to CLI command 'sip show channel'
ASTERISK-23564 #close
Reported by: Patrick Laimbock
Review: https://reviewboard.asterisk.org/r/3474/
........

Merged revisions 413876 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413877 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-13 18:01:24 +00:00
Walter Doekes
32e364a2a0 h264: Fix H264 SDP payload format.
https://tools.ietf.org/html/rfc3984#section-8.1 says profile-level-id
takes 3 bytes in base16 (6 hex digits).

This fixes video setup in certain cases.

ASTERISK-23664 #close
ASTERISK-23664 #comment Patch r3530.patch uploaded by Guillaume Maudoux.
Review: https://reviewboard.asterisk.org/r/3530/
........

Merged revisions 413791 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-13 13:52:27 +00:00
Walter Doekes
7bc77b51a4 rtp: Fix case typo in H263+ mime.
http://tools.ietf.org/html/rfc3555#section-4.2.6 says the canonical
mime subtype is "H263-1998", not "h263-1998". Original code was added
in r183101 on 2009-03-19 02:26:50 +0100.

This fixes issues with Polycom phones.

ASTERISK-23665 #close
ASTERISK-23665 #comment Patch r3529.patch uploaded by Guillaume Maudoux, backported by me.
Review: https://reviewboard.asterisk.org/r/3529/
........

Merged revisions 413787 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 413788 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-13 13:36:41 +00:00
Richard Mudgett
8a3898cf5d chan_dahdi/sig_pri: Prevent unnecessary PROGRESS events when overlap dialing is enabled.
When overlap dialing is enabled, the lack of inband audio available
information in the SETUP_ACKNOWLEDGE events causes an interoperability
problem with SIP.  sig_pri doesn't know if there is dialtone present when
a SETUP_ACKNOWLEDGE is received so it assumes it is there and posts an
AST_CONTROL_PROGRESS frame.  The SIP channel driver then sends out a 183
Session Progress and blocks the desired 180 Ringing message when the
ALERTING message comes in.

* Made the configure script detect if the installed version of libpri
supports the SETUP_ACKNOWLEDGE enhancements.

* Using the new API, made generate an AST_CONTROL_PROGRESS frame on an
incoming SETUP_ACKNOWLEDGE message when the message indicates inband audio
is present instead of assuming that dialtone is present.

* Using the new API, made SETUP_ACKNOWLEDGE send out an inband audio
available indication only if dialtone is expected.  The change also makes
the fallback behaviour of sending the PROGRESS message better by sending
it only if dialtone is expected.

* Changed receiving a PROCEEDING message to not generate an
AST_CONTROL_PROGRESS frame if the progress indication ie indicates
non-end-to-end-ISDN.  This helps interoperability with SIP.

* Changed sending a PROCEEDING message in response to an
AST_CONTROL_PROCEEDING frame to not indicate inband audio available.  It
was silly to do so anyway because the channel driver doesn't know if
inband audio is even available.  This helps interoperability with SIP.

This patch and a corresponding change in libpri work together to allow
Asterisk to control the inband audio available progress indication ie on
the SETUP_ACKNOWLEDGE message when dialtone is present.

AST-1338 #close
Reported by: Tyler Stewart

Review: https://reviewboard.asterisk.org/r/3521/
........

Merged revisions 413714 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 413765 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-13 00:25:17 +00:00
Richard Mudgett
aa0b833bf6 Fix compiler warning from GCC 4.10 fixup.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413766 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-13 00:16:16 +00:00
Jonathan Rose
530f6840c9 app_chanspy: Fix a test that was failing on account of r413551
ASTERISK-23381 #close
ASTERISK-23381 #comment Reported by: Robert Moss
Review: https://reviewboard.asterisk.org/r/3505/
........

Merged revisions 413710 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413712 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-12 22:23:30 +00:00
Joshua Colp
c7eb0933b2 framehooks: Add callback for determining if a hook is consuming frames of a specific type.
In the past framehooks have had no capability to determine what frame types a hook
is actually interested in consuming. This has meant that code has had to assume they
want all frames, thus preventing native bridging.

This change adds a callback which allows a framehook to be queried for whether it
is consuming a frame of a specific type. The native RTP bridging module has also
been updated to take advantange of this, allowing native bridging to occur when
previously it would not.

ASTERISK-23497 #comment Reported by: Etienne Lessard
ASTERISK-23497 #close

Review: https://reviewboard.asterisk.org/r/3522/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413681 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-11 02:05:26 +00:00
Joshua Colp
1ccc4e5b70 Undoing framehook support. Issues were uncovered by Bamboo.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413667 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-11 01:07:44 +00:00
Joshua Colp
47fc94f095 framehooks: Add callback for determining if a hook is consuming frames of a specific type.
In the past framehooks have had no capability to determine what frame types a hook
is actually interested in consuming. This has meant that code has had to assume they
want all frames, thus preventing native bridging.

This change adds a callback which allows a framehook to be queried for whether it
is consuming a frame of a specific type. The native RTP bridging module has also
been updated to take advantange of this, allowing native bridging to occur when
previously it would not.

ASTERISK-23497 #comment Reported by: Etienne Lessard
ASTERISK-23497 #close

Review: https://reviewboard.asterisk.org/r/3522/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413650 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-10 18:45:42 +00:00
Kinsey Moore
e4169a44a3 Fix 32bit build for func_env
........

Merged revisions 413592 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 413595 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413597 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-09 23:13:19 +00:00
Kinsey Moore
8778568e82 Allow Asterisk to compile under GCC 4.10
This resolves a large number of compiler warnings from GCC 4.10 which
cause the build to fail under dev mode. The vast majority are
signed/unsigned mismatches in printf-style format strings.
........

Merged revisions 413586 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 413587 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413588 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-09 22:39:22 +00:00
Jonathan Rose
17c45486de app_chanspy: Fix a bug where Barge mode could fail
If the barge audiohook was attached prior to the spyee and its peer
actually being bridged, the audiohook would not be applied and the
connected peer would not be able to hear audio from the spy when the
spy is in barge mode.

(closes issue ASTERISK-23381)
Reported by: Robert Moss
Review: https://reviewboard.asterisk.org/r/3505/
........

Merged revisions 413551 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413556 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-09 16:35:16 +00:00
Joshua Colp
85637ed389 app_queue: Extend documentation for various Manager actions and events.
........

Merged revisions 413485 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 413486 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413487 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-08 00:35:45 +00:00
Richard Mudgett
c43360d936 app_confbridge: Fixed "CBAnn" channels not going away.
Fixed a ref leak in conf_handle_talker_cb() everytime the conference
bridge was found to report a channel's talker status change.  The
resulting leak caused the "CBAnn" channels and the conference bridge to
never be destroyed.

Thanks to Richard Kenner on the asterisk-user's list for locating the
problem.

Reported by: Richard Kenner


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413454 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-07 20:58:03 +00:00
Richard Mudgett
5ce91ec687 app_confbridge: Fix ref leak in CLI "confbridge kick" command.
Fixed ref leak in the CLI "confbridge kick" command when the channel to be
kicked was not in the conference.
........

Merged revisions 413451 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-07 20:34:58 +00:00
Mark Michelson
9ca83558ef Fix encoding of custom prepare extra data.
Patches:
	res_config_odbc-take2.patch by John Hardin (License #6512)
........

Merged revisions 413396 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 413397 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413398 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-07 17:50:52 +00:00
Mark Michelson
5bb7b34385 Improve XML sanitization in NOTIFYs, especially for presence subtypes and messages.
Embedded carriage return line feed combinations may appear in presence subtypes
and messages since they may be derived from user input in an instant messenger
client. As such, they need to be properly escaped so that XML parsers do not
vomit when the messages are received.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413372 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-06 22:00:31 +00:00
Mark Michelson
168d9ccc04 Check for an act on failures to update contacts during registration.
There was an underlying issue in a realtime backend where database updates
would fail. Since we were not checking for failure, we would end up in a
strange state where the old database entry was still present but Asterisk
thought that it had been updated. Now when an entry fails to update, we
print a warning and delete the old contact from sorcery so there is no
mismatch between foreground and backend state.

Patches:
	res_pjsip_registrar.patch by John Hardin (License #6512)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413358 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-06 17:46:44 +00:00
Mark Michelson
9534a884c5 Ensure that all parts of SQL UPDATEs and DELETEs are encoded.
Patches:
	res_config_odbc.patch by John Hardin (License #6512)
........

Merged revisions 413304 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 413305 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-06 17:05:19 +00:00
Mark Michelson
75515f9474 Correct variable traversal logic in res_config_odbc's update_odbc function.
Closes issue ASTERISK-23675
Reported by Leando Dardini
Patches:
	asterisk-23675-odbc-linkedlist-traversal_12.diff uploaded by Michael L. Young (license #5026)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-02 20:35:16 +00:00
Mark Michelson
92a0e5b593 Prevent crashes in res_config_odbc due to uninitialized string fields.
Patches:
    odbc-crash.patch by John Hardin (License #6512)
........

Merged revisions 413241 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 413251 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-02 20:27:05 +00:00
Mark Michelson
85f4843bb0 Return the number of rows affected by a SQL insert, rather than an object ID.
The realtime API specifies that the store callback is supposed to return the number
of rows affected. res_config_pgsql was instead returning an Oid cast as an int, which
during any nominal execution would be cast to 0. Returning 0 when more than 0 rows were
inserted causes problems to the function's callers.

To give an idea of how strange code can be, this is the necessary code change to fix
a device state issue reported against chan_pjsip in Asterisk 12+. The issue was that
the registrar would attempt to insert contacts into the database. Because of the 0
return from res_config_pgsql, the registrar would think that the contact was not successfully
inserted, even though it actually was. As such, even though the contact was query-able
and it was possible to call the endpoint, Asterisk would "think" the endpoint was unregistered,
meaning it would report the device state as UNAVAILABLE instead of NOT_INUSE.

The necessary fix applies to all versions of Asterisk, so even though the bug reported
only applies to Asterisk 12+, the code correction is being inserted into 1.8+.

Closes issue ASTERISK-23707
Reported by Mark Michelson
........

Merged revisions 413224 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 413225 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-02 20:02:53 +00:00
Richard Mudgett
44d19433d9 res_pjsip_refer: Add Referred-By header on INVITE for blind transfers.
Per rfc3892, the Referred-By header in a REFER must be copied into the
referenced request (IE.  The outgoing INVITE to the transfer target).

* Automatically put the Referred-By header in the outgoing INVITE message
if the SIPREFERREDBYHDR channel variable is defined with a value.

* Made chan_sip.c:get_refer_info() set SIPREFERREDBYHDR for inheritance so
chan_pjsip has a better chance to interoperate.

* Fixed refer_blind_callback() and refer_incoming_refer_request() to not
modify the data in the pointer returned by pjsip_msg_find_hdr_by_name().
It seems wrong to modify that data since the calling routine doesn't own
the buffer.

ASTERISK-23501 #close
Reported by: John Bigelow

Review: https://reviewboard.asterisk.org/r/3514/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@413210 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-02 16:33:59 +00:00