Commit Graph

25469 Commits

Author SHA1 Message Date
Kinsey Moore
b09870e7da PJSIP: Handle headers in a list appropriately
The PJSIP header parsing function (pjsip_parse_hdr) can generate more
than one header instance from a single header field. These header
instances exist as a list attached to the returned header and must be
handled appropriately when they are added to a message or else only the
first header instance will be used. This changes the linked list
functions used in outbound proxy code to merge the lists properly.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406020 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-21 17:14:24 +00:00
Kinsey Moore
bf97a4c8d7 ARI: Support channel variables in originate
This adds back in support for specifying channel variables during an
originate without compromising the ability to specify query parameters
in the JSON body. This was accomplished by generating the body-parsing
code in a separate function instead of being integrated with the URI
query parameter parsing code such that it could be called by paths with
body parameters. This is transparent to the user of the API and
prevents manual duplication of code or data structures.

(closes issue ASTERISK-23051)
Review: https://reviewboard.asterisk.org/r/3122/
Reported by: Matt Jordan


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-21 14:15:21 +00:00
Damien Wedhorn
7affb5d332 Skinny: fix up handling of fragmented packets.
Bad offset in reading second or more fragment of skinny packets. Fixed
to offset by char (single byte) rather than size of req.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405982 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-20 23:18:15 +00:00
Richard Mudgett
bfc6b6c22f chan_dahdi/PRI: Suppress CONNECTED_LINE updates when nothing in the udpate is valid.
* Also simplified some subddress handling code.

(closes issue ASTERISK-23008)
Reported by: Michael Cargile
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405928 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-20 22:15:03 +00:00
Damien Wedhorn
22aac2e4d6 Skinny: fix up session logging.
Logging from the skinny session loop was providing some incorrect reasons
for exiting the loop. Cleaned up messages and handling so correct reason
displayed.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405924 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-20 21:53:02 +00:00
Jonathan Rose
d44c84fee0 chan_pjsip: Provide a means for tracking device state when holding/unholding
Previously PJSIP did not track hold/unhold and it would always simply be
'inuse'. This patch fixes that.

review: https://reviewboard.asterisk.org/r/3129/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405908 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-20 18:07:29 +00:00
Damien Wedhorn
6786133dfe Skinny: fix reversed device reset from CLI.
Existing code would do a full device restart when "skinny reset device"
was entered at the CLI and do a reset when "skinny reset device restart"
entered. 


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405893 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-18 23:57:57 +00:00
Sean Bright
34f9c44cb2 Make sure the maxptime attribute is added to the correct offers.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405877 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-17 22:05:04 +00:00
Scott Griepentrog
8ce01b96f4 pjsip: fix support for allow=all
This change adds improvements to support for allow=all in
pjsip.conf so that it functions as intended.  Previously,
the allow/disallow socery configuration would set & clear
codecs from the media.codecs and media.prefs list, but if
all was specified the prefs list was not updated.  Then a
call would fail when create_outgoing_sdp_stream() created
an SDP with no audio codecs.

A new function ast_codec_pref_append_all() is provided to
add all codecs to the prefs list - only those not already
on the list.  This enables the configuration to specify a
codec preference, but still add all codecs, and even then
remove some codecs, as shown in this example:

allow = ulaw, alaw, all, !g729, !g723

Also, the display order of allow in cli output is updated
to match the configuration by using prefs instead of caps
when generating a human readable string.

Finally, a change to create_outgoing_sdp_stream() skips a
codec when it does not have a payload code instead of the
call failing.

(closes issue ASTERISK-23018)
Reported by: xrobau
Review: https://reviewboard.asterisk.org/r/3131/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405875 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-17 21:32:18 +00:00
Scott Griepentrog
2f5ce04ab5 http: supported chunked Transfer-Encoding
This change implements support for HTTP Transfer-Encoding
chunked in both JSON and Form (post vars) body content. A
new function ast_http_get_contents() handles both regular
and chunked mode body, returning after the entire body is
received.

(closes issue ASTERISK-23068)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/3125/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405861 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-17 20:49:57 +00:00
Rusty Newton
129f642d3e Fixing some XML syntax issues with my previous commit at r405777 for ASTERISK-23071
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405843 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-17 18:54:32 +00:00
Rusty Newton
7ba6ac4954 Documentation: doc fixes across various parts of the code for ASTERISK issues 23061,23028,23046,23027
Fixes typos of "transfered" instead of "transferred" in various code. Fixes incorrect gosub param help text for app_queue.
Fixes Asterisk man pages containing unquoted minus signs. Adds note about the "textsupport" option in sip.conf.sample.

(issue ASTERISK-23061)
(issue ASTERISK-23028)
(issue ASTERISK-23046)
(issue ASTERISK-23027)
(closes issue ASTERISK-23061)
(closes issue ASTERISK-23028)
(closes issue ASTERISK-23046)
(closes issue ASTERISK-23027)
Reported by: Eugene, Jeremy Laine, Denis Pantsyrev
Patches:
 transferred.patch uploaded by Jeremy Laine (license 6561)
 hyphen.patch uploaded by Jeremy Laine (license 6561)
 sip.conf.sample.patch uploaded by Eugene (license 6360)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405829 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-17 17:14:16 +00:00
Rusty Newton
5a8ada8a3a res_pjsip: enhance documentation for mailboxes options, for both endpoints and aors
Made documentation more explicit as to the use of the both options.

(issue ASTERISK-23071)
(closes issue ASTERISK-23071)
Reported by: Matt Jordan


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405777 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-17 15:12:50 +00:00
Kevin Harwell
d8803b3518 res_pjsip: AOR option qualify_frequency not respected on startup
If an endpoint had previously dynamically registered a contact and the contact
information was successfully stored in astdb then upon restart the qualify
notifications would not be sent out if the qualify_frequency was set.  This was
due to the fact that only permanent contacts were being checked and scheduled
for qualifies on startup.  Modified the code to check and schedule all
registered contacts at startup.

(closes issue ASTERISK-23062)
Reported by: Rusty Newton
Review: https://reviewboard.asterisk.org/r/3124/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405748 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-16 20:05:31 +00:00
Kevin Harwell
b6439f1fef manager: Originate doesn't abort on failed format_cap allocation
action_originate responds to the remote system with an error when cap==NULL,
but doesn't return (abort the originate).  Patched to return.

(closes issue ASTERISK-23034)
Reported by: Corey Farrell
Patches:
     ASTERISK-23034.patch uploaded by coreyfarrell (license 5909)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-16 19:52:57 +00:00
Kinsey Moore
13839535af PJSIP: Fix outbound OPTIONS support
When path support was added and contacts were made available during
request creation and transmission, the code path used by outbound
qualify support was not modified correctly and was causing request
creation to fail. This ensures that outbound request creation with only
a contact and no dialog, endpoint, or uri can succeed which restores
qualify support.

Reported by: gtjoseph
Reported by: kharwell


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405743 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-16 19:32:26 +00:00
Kevin Harwell
bb2b6977a5 res_fax: check_modem_rate() returned incorrect rate for V.27
According to the new standard for V.27 and V.32 they are able to transmit
at a bit rate of 4,800 or 9,600.  The check_mode_rate function needed to be
updated to reflect this.  Also, because of this change the default 'minrate'
value was updated to be 4800.

(closes issue ASTERISK-22790)
Reported by: Paolo Compagnini
Patches:
     res_fax.txt uploaded by looserouting (license 6548)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405694 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-16 19:06:57 +00:00
Kevin Harwell
bdfc31cabd chan_pjsip: initial device state on endpoints is INVALID
When endpoints get loaded their device state gets set to 'INVALID' because the
channel driver has not been loaded yet.  Fixed by updating the device state for
every endpoint upon load of the channel driver.

(closes issue ASTERISK-23065)
Reported by: Rusty Newton
Review: https://reviewboard.asterisk.org/r/3123/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405643 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-16 16:35:12 +00:00
Jonathan Rose
16e03f0b08 Remove subversion conflict tag accidentally left in CHANGES
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-15 16:48:47 +00:00
Jonathan Rose
31462fa4dc Include CHANGES info for r405553
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-15 16:39:32 +00:00
Joshua Colp
7bbeb58312 cel_manager: Don't crash if configuration file is invalid.
The cel_manager module did not properly handle the case where the
configuration file was invalid. The module will now output a warning
message and disable itself if this occurs.

Reported by: Bryan Walters
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405583 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-15 16:36:09 +00:00
Kinsey Moore
6cd901ab8e PJSIP: Add Path header support
This adds Path support to chan_pjsip in res_pjsip_path.c with minimal
additions in res_pjsip_registrar.c to store the path and additions in
res_pjsip_outbound_registration.c to enable advertisement of path
support to registrars and intervening proxies.

Path information is stored on contacts and is enabled via Address of
Record (AoRs) and Registration configuration sections.

While adding path support, it became necessary to be able to add SIP
supplements that handled messages outside of sessions, so a framework
for handling these types of hooks was added in parallel to the
already-existing session supplements and several senders of
out-of-dialog requests were refactored as a result.

(closes issue ASTERISK-21084)
Review: https://reviewboard.asterisk.org/r/3050/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-15 13:14:06 +00:00
Jonathan Rose
1859c07f4f ARI: Add mailboxes resource for controlling and polling external MWI
Adds the following AMI commands:
PUT mailboxes/mailboxName
    modifies mailbox state and implicitly creates new mailboxes
GET mailboxes/mailboxName
    retrieves a JSON representation of a single mailbox if it exists
GET mailboxes
    retrieves a JSON array of all mailboxes
DELETE mailbox/mailboxName
    deletes a mailbox
Note that res_mwi_external must be loaded for these functions to
actually do anything.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405553 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-14 23:26:40 +00:00
Richard Mudgett
f7e34f5c31 string container: Remove unnecessary RAII_VAR usage and string object lock.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405541 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-14 21:44:10 +00:00
Scott Griepentrog
fb95c44fbe chan_sip: fix Local From tag on outbound register regression
In ASTERISK-12117, an improvement to insure consistant local from tags
on outbound registrations resulted in an undesirable behavior - caused
by leftover unexpired sip_pvt dialogs (with the previous cseq number),
resulting in many uncessary REGISTER requests.  Instead of significant
rework of transmit_register(), this change deletes the dialogs after a
200 OK response indiciating a successful registration, keeping the old
dialogs from interfering with normal operation.

(closes issue ASTERISK-22946)
Reported by: Stephan Eisvogel
Review: https://reviewboard.asterisk.org/r/3109/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-14 18:13:57 +00:00
Richard Mudgett
f7f5466bd5 verbosity: Fix performance of console verbose messages.
The per console verbose level feature as previously implemented caused a
large performance penalty.  The fix required some minor incompatibilities
if the new rasterisk is used to connect to an earlier version.  If the new
rasterisk connects to an older Asterisk version then the root console
verbose level is always affected by the "core set verbose" command of the
remote console even though it may appear to only affect the current
console.  If an older version of rasterisk connects to the new version
then the "core set verbose" command will have no effect.

* Fixed the verbose performance by not generating a verbose message if
nothing is going to use it and then filtered any generated verbose
messages before actually sending them to the remote consoles.

* Split the "core set debug" and "core set verbose" CLI commands to remove
the per module verbose support that cannot work with the per console
verbose level.

* Added a silent option to the "core set verbose" command.

* Fixed "core set debug off" tab completion.

* Made "core show settings" list the current console verbosity in addition
to the root console verbosity.

* Changed the default verbose level of the 'verbose' setting in the
logger.conf [logfiles] section.  The default is now to once again follow
the current root console level.  As a result, using the AMI Command action
with "core set verbose" could again set the root console verbose level and
affect the verbose level logged.

(closes issue AST-1252)
Reported by: Guenther Kelleter

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-14 18:03:06 +00:00
Matthew Jordan
fee9b184c6 Blocked revisions 405380
........
chan_sip: Hangup transferer/transferee when transfer to Parking fails

When performing a SIP transfer to a Park extension, if the Park fails, chan_sip
will currently not hang up either the transferer or the transfer target. This
results in the channels being orphaned with no thread to service frames,
resulting in stuck channels.

This patch immediately hangs up the two channels if a Park fails.

(closes issue ASTERISK-22834)
Reported by: rsw686
Tested by: rsw686

(closes issue ASTERISK-23047)
Reported by: Tommy Thompson
Tested by: Tommy Thomspon

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405381 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-14 15:33:26 +00:00
Damien Wedhorn
dd48e4334a Skinny: do not add call to missed calls list if answered elsewhere.
Patch updates skinny devices with a SKINNY_CONNECTED callstate if an
inbound ringing or callwaiting call is answered elsewhere.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405367 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-14 03:12:01 +00:00
Matthew Jordan
df67188b75 Blocked revisions 405362
........
res/Makefile: alias dist-clean to distclean

A 'make distclean' is equivalent to 'make dist-clean' in the top most Makefile.
This patch updates the res/Makefile to recognize both distclean and dist-clean.
Note that this is needed for removing build.mak, which can run into problems
if the source file of Asterisk or its path is changed after build.mak is
generated.

(issue ASTERISK-22480)
Reported by: Matt Jordan


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405363 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-13 21:46:49 +00:00
Jonathan Rose
005591423c PJSIP: Backport r405270 - Unhold on reinvite without SDP
Adds behavior to unhold on a reinvite without an SDP section
Review: https://reviewboard.asterisk.org/r/3106/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-13 17:09:11 +00:00
Kinsey Moore
e4a177b2a3 res_pjsip: Fix CLI tab completion issues
This fixes several issues with the new res_pjsip CLI tab completion
such as output of headers during tab completion and being able to 
tab-complete more items than the code actually handled (further items
would simply be ignored).

(closes issue ASTERISK-23081)
Review: https://reviewboard.asterisk.org/r/3115/
Reported by: xrobau


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405338 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-13 13:28:55 +00:00
Joshua Colp
0cafdf6e26 res_ari: Fix various memory leaks.
This change fixes a few memory leaks that were found based
on a mailing list post.

1. Some JSON response messages were never freed. This was
caused by the documentation stating that message references
were stolen when in reality they were not. The code now follows
the documentation and usage has been updated.

2. HTTP response headers were never freed.

3. The variable list for wildcards paths was never freed.

(closes issue ASTERISK-23128)
Reported by: Kenneth Watson (on list)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405325 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-12 22:23:12 +00:00
Matthew Jordan
bf63402b99 CDRs: Synchronize dialplan applications that manipulate CDRs with the engine
In https://reviewboard.asterisk.org/r/3057/, applications and functions that
manipulate CDRs were made to interact over Stasis. This was done to
synchronize manipulations of CDRs from the dialplan with the updates the
engine itself receives over the message bus.

This change rested on a faulty premise: that messages published to the CDR
topic or to a topic that forwards to the CDR topic are synchronized with the
messages handled by the CDR topic subscription in the CDR engine. This is not
the case. There is no ordering guaranteed for two messages published to the
same topic; ordering is only guaranteed if a message is published to the same
subscriber.

Stasis was modified in r405311 to allow a publisher to synchronize on the
subscriber. This patch uses that API to synchronize the CDR publishers with
the CDR engine message router, which maintains the overall topic subscription.

(closes issue ASTERISK-22884)
Reported by: Matt Jordan

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405312 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-12 21:58:32 +00:00
Matthew Jordan
dde2d41715 stasis: Add methods to allow for synchronous publishing to subscriber
This patch adds an API call to Stasis that allows a publisher to publish a
stasis message that will not return until a specific subscriber handles the
message. Since a subscriber can have their own forwarding topic which orders
messages from many topics, this allows a publisher who knows of that subscriber
to synchronize to that subscriber regardless of the forwarding relationships
between topics.

This is of particular use for dialplan applications that need to synchronize
on a particular subscriber's handling of a message.

(issue ASTERISK-22884)
Reported by: Matt Jordan

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-12 21:55:11 +00:00
Mark Michelson
08e624708d Print "<unknown>" for artificial endpoint in PJSIP security events.
Previously, this printed a UUID, which was not very clear when dealing
with an artificial endpoint.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-10 19:39:23 +00:00
Richard Mudgett
eeb41848e0 Logging callid: Fix some sizeof() references per coding guidelines.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-10 18:00:47 +00:00
Damien Wedhorn
68463c28c4 Fix chan_dahdi copile issue in dev-mode.
Error "unused variable i in dahdi_create_channel_range" when compiling
in dev-mode. Small restructure to dahdi_create_channel_range to move 
the for(x) loop and int i,x to a block within the IFDEF.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-09 23:45:20 +00:00
Kevin Harwell
b2409f9458 res_pjsip_messaging: potential for field values in from/to headers to be missing
Added in ability to specify display name format ("name" <sip:name@ipaddr:port>)
for a given URI and made sure it was fully propagated to the outgoing message.
Also made it so outoing messages in res_pjsip always send as "sip:".

(closes issue ASTERISK-22924)
Reported by: Anthony Messina
Review: https://reviewboard.asterisk.org/r/3094/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-09 23:36:24 +00:00
Kinsey Moore
d7f5a0be5d astobj2: Correct ao2_iterator opacity violations
This corrects the ao2_iterator opacity violations in
res_pjsip_session.c by adding a global function to get the number of
elements inside the container hidden behind the iterator.

(closes issue ASTERISK-23053)
Review: https://reviewboard.asterisk.org/r/3111/
Reported by: Richard Mudgett


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-09 20:25:24 +00:00
Kevin Harwell
a4d8398013 res_rtp_asterisk: Fails to resume WebRTC call from hold
In ast_rtp_ice_start if the ice session create check list failed, start check
was never initiated and ice_started was never set to true.  Upon re-entering
the function (for instance, [un]hold) it would try to create the check list
again with duplicate remote candidates.

Fixed so that if the create check list fails the necessary data structures
are properly re-initialized for any subsequent retries.

Note, it was decided to not stop ice support (by calling ast_rtp_ice_stop) on a
check list failure because it possible things might still work.  However, a
debug message was added to help with any future troubleshooting.

(closes issue ASTERISK-22911)
Reported by: Vytis Valentinavičius
Patches:
     works_on_my_machine.patch uploaded by xytis (license 6558)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-09 16:51:19 +00:00
Matthew Jordan
c8ed6fc892 app_confbridge: Fix crash caused when waitmarked/marked users leave together
When waitmarked users join a ConfBridge, the conference state is transitioned
from EMPTY -> INACTIVE. In this state, the users are maintined in a waiting
users list. When a marked user joins, the ConfBridge conference transitions
from INACTIVE -> MULTI_MARKED, and all users are put onto the active list of
users. This process works correctly.

When the marked user leaves, if they are the last marked user, the MULTI_MARKED
state does the following:
(1) It plays back a message to the bridge stating that the leader has left the
    conference. This requires an unlocking of the bridge.
(2) It moves waitmarked users back to the waiting list
(3) It transitions to the appropriate state: in this case, INACTIVE

However, because it plays the prompt back to the bridge before moving the users
and before finishing the state transition, this creates a race condition: with
the bridge unlocked, waitmarked users who leave the conference (or are kicked
from it) can cause a state transition of the bridge to another state before
the conference is transitioned to the INACTIVE state. This causes the state
machine to get a bit wonky, often leading to a crash when the MULTI_MARKED state
attempts to conclude its processing.

This patch fixes this problem:
(1) It prevents kicked users from being kicked again. That's just a nicety.
(2) More importantly, it fixes the race condition by only playing the prompt
    once the state has transitioned correctly to INACTIVE. If waitmarked users
    sneak out during the prompt being played, no harm no foul.

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

Note that the patch committed here is essentially the same as uploaded by
Simon Moxon on ASTERISK-22740, with the addition of the double kick prevention.

(closes issue AST-1258)
Reported by: Steve Pitts

(closes issue ASTERISK-22740)
Reported by: Simon Moxon
patches:
  ASTERISK-22740.diff uploaded by Simon Moxon (license 6546)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405216 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-09 15:49:40 +00:00
Walter Doekes
8c61a2a873 "Minimun" typo.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405162 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-09 14:14:13 +00:00
Mark Michelson
aa3835f397 Use proper case for checking if digest authentication is used.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405131 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-08 16:48:12 +00:00
Kinsey Moore
678bebb459 pbx_lua: Add support for Lua 5.2
This adds support for Lua 5.2 in pbx_lua which is available on newer
operating systems.

(closes issue ASTERISK-23011)
Review: https://reviewboard.asterisk.org/r/3075/
Reported by: George Joseph
Patch by: George Joseph
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-08 16:28:36 +00:00
Kinsey Moore
9e553991b1 Add the missing part of r400140
When the patch to add retry-on-forbidden-response was committed, part
of the patch for chan_sip was not committed which caused the feature to
be entirely nonfunctional. This corrects the code in question.

(closes issue ASTERISK-17138)
Review: https://reviewboard.asterisk.org/r/2874
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405083 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-07 21:19:22 +00:00
Joshua Colp
20e8368203 res_pjsip_acl: Fix another case of assuming a contact will always contain a URI.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405034 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-07 19:55:05 +00:00
Joshua Colp
5043f3bab1 res_pjsip_nat: Don't assume a Contact header will always contain a URI.
If the 'rewrite_contact' option was enabled and a Contact header was received
which contained a '*' a crash would occur.

This change makes the res_pjsip_nat module ignore the Contact header if it
contains only a '*'.

(closes issue ASTERISK-23101)
Reported by: Matt Jordan


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405019 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-07 14:55:26 +00:00
Richard Mudgett
5a3bc1609e app_voicemail: Explicitly set defaultenabled=yes
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-06 21:54:23 +00:00
Richard Mudgett
096974809f External MWI AMI support.
The external MWI AMI interface provides a thin wrapper around the core
external MWI resource.

The resource adds the following AMI actions:
MWIGet,
MWIDelete, and
MWIUpdate.

(closes issue AFS-46)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404954 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-06 17:48:14 +00:00
Richard Mudgett
f9f467b142 External MWI core support.
* The core external MWI resource provides for MWI message counts
persistence using sorcery.  With sorcery, the user is able to configure
which sorcery wizzard backend to use if the default astdb is not desired.

* The core external MWI resoruce provides some debugging CLI commands
enabled by defining MWI_DEBUG_CLI.

The debugging CLI commands are:
"mwi delete all",
"mwi delete like <regex>",
"mwi delete mailbox <mailbox>",
"mwi list all",
"mwi list like <regex>",
"mwi show mailbox <mailbox>", and
"mwi update mailbox <mailbox> [<new> [<old>]]".

(closes issue AFS-43)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404952 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-06 17:43:32 +00:00