Commit Graph

25052 Commits

Author SHA1 Message Date
Kevin Harwell
944a13a427 alembic: script modifications due to errors
A couple of the scripts had errors that would not allow a full migration to
take place.  The extensions table needed to make its 'id' column a primary
key in order to work with mysql.  The other script ...add_endpoints... was
missing tables that it was trying to add columns to.

Added the primary key on id for extensions and added the tables in for the
missing pjsip configuration options.  While it is not ideal to modify already
released scripts this was a case where it had to be done due to errors in
the script and lacking a better alternative.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@407019 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-31 22:17:50 +00:00
Mark Michelson
a27abd02e6 Decouple subscription handling from NOTIFY/PUBLISH body generation.
When the PJSIP pubsub framework was created, subscription handlers were required
to state what event they handled along with what body types they knew how to
generate. While this serves well when implementing a base RFC, it has problems
when trying to extend the body to support non-standard or proprietary body
elements. The code also was NOTIFY-specific, meaning that when the time comes
that we start writing code to send out PUBLISH requests with MWI or presence
bodies, we would likely find ourselves duplicating code that had previously been
written.

This changeset introduces the concept of body generators and body supplements. A
body generator is responsible for allocating a native structure for a given body
type, providing the primary body content, converting the native structure to a
string, and deallocating resources. A body supplement takes the primary body
content (the native structure, not a string) generated by the body generator and
adds nonstandard elements to the body. With these elements living in their own
module, it becomes easy to extend our support for body types and to re-use
resources when sending a PUBLISH request.

Body generators and body supplements register themselves with the pubsub core,
similar to how subscription and publish handlers had done. Now, subscription
handlers do not need to know what type of body content they generate, but they
still need to inform the pubsub core about what the default body type for a
given event package is. The pubsub core keeps track of what body generators and
body supplements have been registered. When a SUBSCRIBE arrives, the pubsub core
will check that there is a subscription handler for the event in the SUBSCRIBE,
then it will check that there is a body generator that can provide the content
specified in the Accept header(s).

Because of the nature of body generators and supplements, it means
res_pjsip_exten_state and res_pjsip_mwi have been completely gutted. They no
longer worry about body types, instead calling
ast_sip_pubsub_generate_body_content() when they need to generate a NOTIFY body.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@407016 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-31 22:11:18 +00:00
Kevin Harwell
5eae91d73d res_pjsip_mwi: Subscribe fails when missing aor name
When subscribing to MWI (res_pjsip_mwi) and the sip uri did not contain a name
(ex: sip:<ip address>) then the subscription would fail since it would be unable
to locate an associated aor.  This patch makes it so that when a subscribe comes
with no aor name then it will subscribe to all aors on the located endpoint.

(closes issue ASTERISK-23072)
Reported by: Bob M
Review: https://reviewboard.asterisk.org/r/3164/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@407014 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-31 22:05:32 +00:00
Kinsey Moore
6ae6a70f93 PJSIP: Fix address for ACK in NAT situations
In NAT scenarios where a call is placed to a Grandstream phone,
res_pjsip will sometimes send the ACK to a 200 OK to the private
address of the device behind the NAT instead of the address of the NAT
device. This corrects that behavior by rewriting the address in the
Contact header in the incoming 200 OK and the dialog's target address
if necessary (since it has already been rewritten to the incorrect
private address).

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@407000 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-31 15:01:08 +00:00
Damien Wedhorn
894964d426 Skinny: fix up possible double unlock of chan.
Return before chan is possibly unlocked a second time when hanging up
a channel in SUBSTATE_OFFHOOK.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-31 05:28:14 +00:00
Corey Farrell
58fd3c2339 res_rtp_asterisk & udptl: fix port selection to work with SELinux restrictions
ast_bind to a port reserved for another program by SELinux causes
errno == EACCES.  This caused random failures when binding rtp or
udptl sockets.  Treat EACCES as a non-fatal error, try next port.

(closes issue ASTERISK-23134)
Reported by: Corey Farrell
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406935 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-30 20:34:43 +00:00
Sean Bright
4fa0345f41 Make a NOTICE about an invalid channel name more useful.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406919 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-30 17:33:58 +00:00
Russell Bryant
f7de120782 queues.conf.sample Fix documented default for persistentmembers
Closes issue ASTERISK-22662
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406862 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-29 00:42:06 +00:00
Kevin Harwell
69f88f9221 res_pjsip_pubsub: potential crash on timeout
What seems to be happening is if a subscription has been terminated and the
subscription timeout/expires is less than the time it takes for all pending
transactions (currently on the subscription) to end then the subscription
timer will not have been canceled yet and sub will be null.  Since the
subscription has already been canceled nothing needs to be done so a null
check in the asterisk code is sufficient in working around this problem.

(closes issue ASTERISK-23129)
Reported by: Dan Jenkins


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-28 23:35:17 +00:00
Kevin Harwell
6a59e0817e cdr_radius, cel_radius: build agains libfreeradius-client
Asterisk's RADIUS module currently build against libradiusclient-ng, but this
project has been superseeded by libfreeradius-client. The API is 99% compatible
except that the header name has changed, the library name has changed, and
the configuration file location has changed.

(closes issue ASTERISK-22980)
Reported by: Jeremy Lainé
Patches:
     freeradius-client.patch uploaded by sharky (license 6561)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-28 23:17:12 +00:00
Kevin Harwell
2bd39b7913 res_pjsip,compat: INFINITY and NAN undefined
On some systems the values for INFINITY and NAN are not defined thus causing
a build error on those systems.  Added definitions for those if they had
not previously been defined.

(closes issue ASTERISK-23056)
Reported by: capouch
Patches:
     inf-nan-patch.txt uploaded by capouch (license 6564)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406788 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-28 20:42:41 +00:00
Kinsey Moore
cfea265903 ARI: Make double subscribe respond with success
Currently, attempting to subscribe an application to a device state
that it has already subscribed to will generate a 500 error response.
This will now be treated as a subscription refresh even though ARI
subscriptions don't currently support lifetimes and will respond with
the normal response for a successful subscription (200 OK).

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406775 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-28 19:13:30 +00:00
Scott Griepentrog
8e1dd2e740 rtp_engine: improved handling of get_rtp_info failure
In ast_rtp_instance_make_compatible(), after a failure of
channel tech call get_rtp_info() to return peer_instance,
the null pointer would be passed to ao2_ref, producing an
error that looked like a refernce counting problem but is
not.  This patch corrects that and adds helpful LOG_ERROR
messages to indicate which failure path occurred.

(issue AST-1276)
Review: https://reviewboard.asterisk.org/r/3156/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406723 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-28 16:41:43 +00:00
Richard Mudgett
fa0cef4a48 test_cdr.c, test_cel.c: Correctly destroy created bridges.
* Fixed the test_cel_attended_transfer_bridges_link unit test to also
account for the local channel link being destroyed now that the bridges
are actually destroyed.

* Made CDR unit test use its own version of do_sleep() from the CEL unit
tests.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406707 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-28 00:11:16 +00:00
Russell Bryant
d7e20c5cc2 Allow nested #includes in extconfig.conf
extconfig.conf was hard-coded to not allow nested includes for some reason.
The code has been this way since a patch was merged for ASTERISK-3333 (revision
4889), which was a significant update to this code ("Merge config updates").

I can't figure out any good reason why this should be limited.  This patch just
removes the limit and uses the default nesting depth limit.

Closes issue ASTERISK-17837

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406645 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-27 20:36:37 +00:00
Russell Bryant
396fb1749c Protect ast_filestream object when on a channel
The ast_filestream object gets tacked on to a channel via
chan->timingdata.  It's a reference counted object, but the reference
count isn't used when putting it on a channel.  It's theoretically
possible for another thread to interfere with the channel while it's
unlocked and cause the filestream to get destroyed.

Use the astobj2 reference count to make sure that as long as this code
path is holding on the ast_filestream and passing it into the file.c
playback code, that it knows it's valid.

Bug reported by Leif Madsen.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406574 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-27 01:19:18 +00:00
Richard Mudgett
dc21fbc644 tcptls.c: Add missing cleanup on off nominal path.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406516 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-26 23:03:05 +00:00
Joshua Colp
c573b00ea1 res_pjsip_session: Be less strict with core requested outgoing capabilities.
The core may (depending on circumstances) request a single codec on outgoing
calls. Many channel drivers ignore or treat this as a suggestion while still
including configured codecs. The res_pjsip_session logic treated this as
an explicit request, leaving out other configured codecs.

This change makes res_pjsip_session behave like other channel driver and simply
adds the requested codec to the list.

(closes issue ASTERISK-23082)
Reported by: xrobau

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406489 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-26 02:10:22 +00:00
Richard Mudgett
3037924c69 CEL: Protect data structures during reload and shutdown.
The CEL data structures need to be protected during a configuration reload
and shutdown.  Asterisk crashed during a shutdown because CEL events were
still in flight and the CEL data structures were already destroyed.

* Protected the cel_backends, cel_dialstatus_store, and cel_linkedids ao2
containers with a global ao2 object wrapper.

* Added NULL checks before use of the cel_backends, cel_dialstatus_store,
and cel_linkedids ao2 containers in case the CEL module is already
shutdown.

* Fixed overloading of the cel_linkedids held objects reference count.
During shutdown any held objects would be leaked.

* Fixed memory leak of cel_linkedids held objects if the LINKEDID_END is
not being tracked.  The objects in the cel_linkedids container were not
removed if the LINKEDID_END event is not used.

* Added access protection to the cel_backends container during the CLI
"cel show status" command.

* Made cel_backends, cel_dialstatus_store, and cel_linkedids use the
standard ao2 callback templates for the hash and cmp functions.

* Eliminated unnecessary uses of RAII_VAR().

* Made ast_cel_engine_init() cleanup alocated resources on failure.

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

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-24 23:29:57 +00:00
Richard Mudgett
a6958468d3 manager: Register atexit shutdown routine only once.
* Made register atexit shutdown routine only once in __init_manager().

* Fixed some initial load failure conditions in __init_manager().

* Made reset options to defaults on reload when the reload will actually
happen.

* Removed unnecessary container traversals of the white/black filters
during manager_free_user().

* ast_free() does not need a NULL check before calling.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406401 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-24 22:14:57 +00:00
Jonathan Rose
577a036b45 res_config_pgsql: Fix a memory leak and use RAII_VAR for cleanup when practical
Review: https://reviewboard.asterisk.org/r/3141/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406389 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-24 21:25:47 +00:00
Richard Mudgett
d8a4d2ce7e manager: Protect data structures during shutdown.
Occasionally, the manager module would get an "INTERNAL_OBJ: bad magic
number" error on a "core restart gracefully" command if an AMI connection
is established.

* Added ao2_global_obj protection to the sessions global container.

* Fixed the order of unreferencing a session object in session_destroy().

* Removed unnecessary container traversals of the white/black filters
during session_destructor().

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406342 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-24 18:04:54 +00:00
Mark Michelson
6e4ce20286 Today is not my day for writing code that compiles.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-23 23:41:53 +00:00
Michael L. Young
e5ea048c26 res_config_mysql: Fix Setting The Column Name Incorrectly
When support for a realtime sorcery module was added in revision 386731, the
wrong property was accidentally used for setting the column name to be updated
in the database table.  This patch fixes the typo.

(closes issue ASTERISK-23177)
Reported by: Denis
Tested by: Denis
Patches:
    asterisk-23177-use-field-name.diff by Michael L. Young (license 5026)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-23 22:54:26 +00:00
Mark Michelson
466120a29f Fix presence body errors found during testing:
* PIDF bodies were reporting an "open" state in many cases where
  it should have been reporting "closed"
* XPIDF bodies had XML nodes placed incorrectly within the hierarchy.
* SIP URIs in XPIDF bodies did not go through XML sanitization
* XML sanitization had some errors:
    * Right angle bracket was being replaced with "&rt;" instead of "&gt;"
	* Double quote, apostrophe, and ampersand were not being escaped.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-23 21:09:35 +00:00
Mark Michelson
b6a2953a53 Fix presence body errors found during testing:
* PIDF bodies were reporting an "open" state in many cases where
  it should have been reporting "closed"
* XPIDF bodies had XML nodes placed incorrectly within the hierarchy.
* SIP URIs in XPIDF bodies did not go through XML sanitization
* XML sanitization had some errors:
    * Right angle bracket was being replaced with "&rt;" instead of "&gt;"
	* Double quote, apostrophe, and ampersand were not being escaped.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406294 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-23 21:00:24 +00:00
Scott Griepentrog
24969c3e4e pbx.c: Pre-initialize timezone to avoid crash on destroy
In ast_build_timing, initialize the timezone value to NULL
in order to avoid deferencing an uninitialized value later
when calling ast_destroy_timing.  The timezone value could
be uninitialized if ast_build_timing were to fail due to a
zero length time string.

(closes issue ASTERISK-22861)
Reported by: Sebastian Murray-Roberts
Review: https://reviewboard.asterisk.org/r/3134/
Patches:
     ast_build_timing-initialize-timezone.patch uploaded by coreyfarrell (license 5909)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-22 22:23:16 +00:00
Kinsey Moore
8315073c11 ConfBridge: Fix channel parameter documentation
Confbridge AMI and CLI commands for mute, unmute, and setting the
single video source can accept channel prefixes in lieu of a full
channel name, but documentation states only that it is required and is
a channel name. This corrects the documentation.

(closes issue PQ-1397)
Reported by: Steve Pitts
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-22 19:34:15 +00:00
Kinsey Moore
e2826acf41 chan_sip: Decline image streams on unsupported transports
This change allows chan_sip to decline individual image streams over
unsupported transports in the SDP of the 200 response. Previously,
an image stream offer with RTP/AVP as the transport would cause
chan_sip to respond with a 488.

(closes issue ASTERISK-22988)
Reported by: adomjan
Original patch by: adomjan
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406172 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-22 18:32:21 +00:00
Kinsey Moore
e445cc726e res_stasis_playback: Correct error argument order
Several of the playback error messages for invalid media input in
res_stasis_playback.c had the media name and channel name reversed.
They now correctly identify the channel name and media name.

Reported by: skrusty


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-22 14:00:01 +00:00
Rusty Newton
88417eb71d res_pjsip: Documentation improvement for Endpoint and AOR mailbox options.
Making the help text for both more explicit regarding the format of mailbox identifiers. i.e. clarifying the format for app_voicemail mailboxes vs mailboxes from external MWI sources through modules such as res_external_mwi.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406133 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-21 21:47:13 +00:00
Walter Doekes
45978ab658 manager: Clarify eventfilter documentation. Textual changes only.
Review: https://reviewboard.asterisk.org/r/3133/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406081 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-21 21:06:39 +00:00
Kinsey Moore
fee916ab70 chan_mgcp: Enforce locking for oseq
This restricts direct usage of global oseq so that all accesses are
locked and threads are not racing to get oseq values that they did not
claim.

This also fixes a build error in res_pktccops under dev mode.

(closes issue ASTERISK-23100)
Reported by: adomjan
Patch by: adomjan
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406049 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-21 20:20:25 +00:00
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