Commit Graph

25375 Commits

Author SHA1 Message Date
Kinsey Moore
b0655b6439 PJSIP: Fix some bad spacing
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408943 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-26 13:46:44 +00:00
Kinsey Moore
a4dfffc124 PJSIP: Prevent crash if channel has gone away
It is currently possible for an ast_sip_session to exist without an
associated channel as is the case when a new invite is coming in or
just after a hangup is issued on a chan_pjsip channel. Part of the
attended transfer code assumed the channel would be non-NULL and used
it as such causing a crash. This bug was exposed thanks to the attended
transfer ARI test in the test suite.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408941 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-26 13:33:52 +00:00
Kevin Harwell
4cf4c0c61a res_pjsip_exten_state: Presence for digium phones
Added presence support for digium phones.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408882 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-25 17:50:54 +00:00
Kevin Harwell
138767895c res_pjsip_send_to_voicemail: transferring to voicemail for digium phones
Added the ability for transferring directly to voicemail on digium phones.
Added a new module that checks for the presence of a custom header and/or
diversion header within a sip REFER.  If either is found and they specify
a sending to voicemail action then variables are added to the channel
allowing the user access to them in the dialplan.  Dialplan can then be
written that branches based upon these values allowing, for instace, for
a single number to be used for dialing and/or accessing voicemail directly.

Also fixed a problem where the PJSIP_HEADER function was allowing non pjsip
channels through (checked to make sure it has the correct channel type before
proceeding).

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408880 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-25 17:45:27 +00:00
Rusty Newton
fdbad7a21f configs/voicemail.conf.sample - Make mailcmd sample text more explicit
Made the wording a bit more explicit. Didn't really change the meaning.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408878 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-25 17:43:59 +00:00
Matthew Jordan
91991bbfe0 main: Initialize dialplan providing core components prior to module pre-load
It is possible to pre-load pbx_config. As a result, pbx_config - which will
load and parse the dialplan - will attempt to use various dialplan components,
such as device state providers and presence state providers, prior to them
being initialized by the core. This would lead to a crash, as the components
had not created their Stasis cache entries.

This patch moves a number of core component initializations before the module
pre-load. This guarantees that if someone does pre-load pbx_config - or other
pbx modules - that the Stasis caches for the various core components are
created.

(closes issue ASTERISK-23320)
Reported by: xrobau

(closes issue ASTERISK-23265)
Reported by: Andrew Nagy
Tested by: Andrew Nagy, Rusty Newton


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408855 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-22 19:56:23 +00:00
Alexandr Anikin
ef7783822d ignore AST_CONTROL_PVT_CAUSE_CODE without any messages
(closes issue ASTERISK-23336)
Reported by: Alexander Semych
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408839 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-22 17:57:07 +00:00
Corey Farrell
695f77ac12 Remove extra defines of AST_PBX_MAX_STACK.
* Ensure AST_PBX_MAX_STACK is only defined in extconf.h and pbx.h.
* Fix incorrect function parameters in utils/extconf.c.

(closes issue ASTERISK-23141)
Reported by: Maxim
Review: https://reviewboard.asterisk.org/r/3241/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408787 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-22 02:29:55 +00:00
Kevin Harwell
47c449122c rtp_engine: Dynamic payload change in rtp mapping not supported
Asterisk didn't support the dynamic payload change in rtp mapping in the 200
OK response.

Scenario:
Asterisk sends the INVITE proposing alaw and telephone-event, it proposes
rtpmap:101 for telephone-event.  Peer responds with 2xx, it answers with
alaw and telephone-event also, but it proposes a different rtpmap number
(rtpmap:103) for telephone-event.

Expected Behaviour:
Asterisk should honour the rtpmapping in the response and send DTMF packets
using 103 as payload type for DTMF.

Actual Behaviour: Asterisk sends DTMF packets using payload type 101.

With this patch asterisk now supports changes that can occur in the rtp mapping
in the response.

(closes issue ASTERISK-23279)
Reported by: NITESH BANSAL
Review: https://reviewboard.asterisk.org/r/3225/
Patches:
     dynamic_payload_change.patch uploaded by nbansal (license 6418)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408730 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-21 18:34:15 +00:00
Richard Mudgett
f6875db8e7 manager: Fix AMI Status action of a single channel.
Fixed use of uninitialized ao2 container iterator in an off-nominal
condition.  Either a memory allocation error or the requested channel is
an internal channel not exposed to the outside.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408715 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-21 18:17:14 +00:00
Richard Mudgett
f064222b89 json: Fix off-nominal json ref counting issues.
* Fixed off-nominal json ref counting issue with using the following API
calls: ast_json_object_set() and ast_json_array_append().

* Fixed off-nominal error reporting in ast_ari_endpoints_list().

* Fixed some miscellaneous off-nominal json ref counting issues in
report_receive_fax_status() and dial_to_json().


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408713 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-21 17:49:07 +00:00
Richard Mudgett
8090faebf1 json: Fix json API wrapper code for json library versions earlier than 2.3.0.
* Fixed json ref counting issue with json API wrapper code for
ast_json_object_update_existing() and ast_json_object_update_missing()
when the json library is earlier than version 2.3.0.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408711 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-21 17:43:00 +00:00
Kevin Harwell
fcb8c05420 rtp_engine: Output mixup in ${CHANNEL(rtpqos,audio,all)}
Fixed the output of CHANNEL(rtpqos,audio,all) to use txjitter instead
of rxjitter.

(closes issue ASTERISK-23261)
Reported by: rsw686
Patches:
     rtpqos.patch uploaded by rsw686 (license 5887)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408649 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-21 16:20:27 +00:00
Kevin Harwell
a72f07544a channel.c: MOH is not working for transferee after attended transfer
Updated the code to check to see if MOH is playing on the transferor and if
so then start it on the channel that replaces it during a masquerade.

Example scenario of the problem:
Alice calls Bob and then Bob begins the attended transfer process into a queue.
Upon going on hold Alice hears music and so does Bob once he is in the queue.
Bob then transfers Alice into the queue and then music for Alice stops even
though she should be hearing it since has now replaced Bob in the queue.

The problem that was occurring is that once the channel was masqueraded the app
(queues, confbridge, etc...) had no way of knowing that the channel had just
been swapped out thus it did not start music for the present channel.

Credit to Olle Johansson for pointing me in the right direction on this issue.

(closes issue ASTERISK-19499)
Reported by: Timo Teräs
Review: https://reviewboard.asterisk.org/r/3226/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408644 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-21 15:44:55 +00:00
Alexandr Anikin
8ec5ab8b33 Fix type of roundTripDelay variables
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408591 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-21 10:42:40 +00:00
Michael L. Young
eec7d62f14 app_chanspy: Documentation Update To Clarify "x" Option
When using the "x" option (specify a DTMF digit to exit the application), it is
not obvious in the documentation that this only works when spying on a channel.
If a channel being used to spy on other channels is waiting to connect to a
channel or is no longer attached to a channel, the DTMF is ignored.

As noted on the issue tracker, since there are workarounds available and this is
a rarely used option we are opting for a documentation change here.

(closes issue ASTERISK-22661)
Reported by: Chris Hillman
Patches:
    asterisk-22661-doc-clarify-chan_spy.diff
                                     uploaded by Michael L. Young (license 5026)

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-21 00:49:19 +00:00
George Joseph
db64b734c1 pjsip_cli: Add pjsip commands 'show registrations' and 'show contacts'.
Added 'show registrations' and 'show contacts' to pjsip cli to make things
a little more consistent.  The output is exactly the same as the list command.

Just needed to add entries to their respective ast_cli_entry structures.

(closes issue ASTERISK-23275)
Review: http://reviewboard.asterisk.org/r/3210/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-20 21:09:47 +00:00
George Joseph
d048c19120 pjsip_cli: Fix memory leak in ast_sip_cli_print_sorcery_objectset.
Fixed memory leaks in ast_sip_cli_print_sorcery_objectset and
ast_variable_list_sort.  

(closes issue ASTERISK-23266)
Review: http://reviewboard.asterisk.org/r/3200/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408520 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-20 20:52:03 +00:00
George Joseph
31b4edae7f sorcery: Create sorcery instance registry.
In order to retrieve an arbitrary sorcery instance from a dialplan function
(or any place else) there needs to be a registry of sorcery instances.

ast_sorcery_init now creates a hashtab as a registry.

ast_sorcery_open now checks the hashtab for an existing sorcery instance
matching the caller's module name.  If it finds one, it bumps the 
refcount and returns it.  If not, it creates a new sorcery instance,
adds it to the hashtab, then returns it.

ast_sorcery_retrieve_by_module_name is a new function that does a hashtab 
lookup by module name.  It can be called by the future dialplan function.

res_pjsip/config_system needed a small change to share the main res_pjsip 
sorcery instance.

tests/test_sorcery was updated to include a test for the registry.

(closes issue ASTERISK-22537)
Review: http://reviewboard.asterisk.org/r/3184/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408518 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-20 20:42:36 +00:00
Matthew Jordan
1253c28633 res_pjsip: Update documentation for 'use_avpf' option
When 'use_avpf' is set to True, inbound offers must use the AVPF/SAVPF RTP
profile. However, when 'use_avpf' is set to False, Asterisk will accept
both AVP/SAVP or AVPF/SAVPF RTP profiles in inbound offers. The documentation
previously implied that Asterisk would reject AVPF/SAVPF if 'use_avpf' was
set to False and a UA offered said profile in an INVITE request.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408502 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-20 19:02:13 +00:00
Rusty Newton
42ccec9dda apps/app_queue - Fix incorrect Macro parameter documentation
Macro is executed on the called channel, not the calling channel.

(closes issue ASTERISK-23069)
Reported By: Bryan Anderson
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-20 02:43:11 +00:00
Richard Mudgett
21a7a6f146 config: Add file size and nanosecond resolution fields to the cached modified config file information.
Repeatedly modifying config files and reloading too fast sometimes fails
to reload the configuration because the cached modification timestamp has
one second resolution.

* Added file size and nanosecond resolution fields to the cached config
file modification timestamp information.  Now if the file size changes or
the file system supports nanosecond resolution the modified file has a
better chance of being detected for reload.

* Added a missing unlock in an off-nominal code path.

(closes issue AST-1303)

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408389 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-19 19:07:42 +00:00
Richard Mudgett
e9d641a2de res_sorcery_astdb.c: Fix regex handling and keep simple prefix matching performance.
The sorcery astDB wizzard does not handle regex correctly if the pattern
begins with an anchor character.

This patch attempts to convert the anchored regex pattern to a prefix
pattern supported by astDB for performance reasons.  If it is not able to
convert the pattern it falls back to getting all astDB members of the
family and doing a normal regex pattern matching on the retrieved records.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408385 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-19 18:26:17 +00:00
Alexandr Anikin
771ab0b35d process receiveAndTransmit user input remote caps instead of receive only
send receiveAndTransmit user input our caps instead of receive only
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-19 12:00:27 +00:00
Alexandr Anikin
c3efd95c90 Allow different socket and signalling ip on h.323 connection if gk mode is active
Reported by: Gabriele Odone
Patches:
	ASTERISK-22738-1.patch
Tested by: Gabriele Odone
(closes issue ASTERISK-22738)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-19 10:20:02 +00:00
Richard Mudgett
a0f1e41fe0 alembic: Add svn:ignore *.pyc to directories and svn:executable to *.py files.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408297 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-18 19:18:35 +00:00
Mark Michelson
cb791f0275 Store SIP User-Agent information in contacts.
When an endpoint sends a REGISTER request to Asterisk, we now will
associate the User-Agent header with all contacts that were bound in
that REGISTER request.




git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-17 15:21:59 +00:00
Matthew Jordan
fe6f1d5d0a pbx: Handle a completely empty dialplan during a context merge
It is highly unlikely, but - at least in Asterisk 12 - theoretically possible
to load Asterisk with no dialplan whatsoever. If that occurs, and some other
module (that is not a pbx module) attempts to merge its contexts into the
dialplan, the existing merge routine will crash. This is because it is not
insane, and rightly believes that you provided some sort of dialplan,
somewhere.

This patch will gracefully merge the contexts in such a case. Note that this
is highly unlikely to occur in 1.8/11, as features will most likely provide
some dialplan via parking. However, in Asterisk 12, parking is now provided
by res_parking, and hence may create its dialplan later.

(closes issue ASTERISK-23297)
Reported by: CJ Oster

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408220 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-16 03:23:14 +00:00
Matthew Jordan
374cd971f9 buildsystem: Unbreak the build (infloop) on Asterisk 11+
Apparently r408084 ( https://reviewboard.asterisk.org/r/3212/ ) broke the
build. This patch fixes it by ignoring the .lastclean dependencies if the
MENUSELECT_EMBED variable is not defined.

patches:
  tmp.diff uploaded by wdoekes (License 5674)

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408194 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-16 01:49:05 +00:00
Scott Griepentrog
23966a1c6d ARI: correct upper/lower case URI discrepancies
URI's are supposed to be case sensitive and all
lower case.  In practice some portions of URI's
in ARI are case insensitive and others are not,
such as TECH, which in one instance would match
a lower case name and in another would not.  In
this patch, the ast_endpoint_lastest_snapshot()
function is modified to change the TECH portion
to full upper case before lookup. This resolves
the discrepancy noted by the reporter.  However
I chose to avoid forcing the /ari prefix of the
URI's to be lower case for now.  Except for the
two cases here, all URI's should be lower case,
unless they are part of a resource name or id.

Review: https://reviewboard.asterisk.org/r/3211/
Reported by: Zane Conkle
(closes issue ASTERISK-23125)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408140 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-14 21:44:34 +00:00
Scott Griepentrog
3ad378592c format.c: correct possible null pointer dereference
In ast_format_sdp_parse and ast_format_sdp_generate
the check checks for a valid interface and function
were potentially confusing, and hid an error in the
test of the presence of the function that is called
later.  This patch clears up and corrects the test.

Review: https://reviewboard.asterisk.org/r/3208/
(closes issue ASTERISK-23098)
Reported by: marcelloceschia
Patches:
     main_format.patch uploaded by marcelloceschia (license 6036)
	 ASTERISK-23098.patch uploaded by coreyfarrell (license 5909)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-14 21:28:18 +00:00
Walter Doekes
e628b1488d buildsystem: Don't force main to depend on everything else.
Directory 'main' only needs to depend on embedded modules. If no
module embedding is selected, the dependency is dropped.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408085 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-14 13:29:22 +00:00
Matthew Jordan
e56f01903d chnan_sip: Set SIP_DEFER_BYE_ON_TRANSFER prior to calling bridge blind transfer
This patch moves setting SIP_DEFER_BY_ON_TRANSFER prior to calling
ast_bridge_transfer_blind. This prevents a BYE from being sent prior to the
NOTIFY request that informs the transferor if the transfer succeeded or failed.

This patch also clears said flag from the off nominal NOTIFY paths in the
local_attended_transfer code, as once we've sent the NOTIFY request it is safe
to send by the BYE request.

This was caught by the blind-transfer-accountcode test in the Asterisk Test
Suite.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408069 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-14 12:39:11 +00:00
Mark Michelson
600c528e92 Remove all PJSIP MWI-specific use from our MWI code.
PJSIP has built-in MWI code that could be useful to some
degree, but our utilization of the API actually made our
code a bit more cluttered since we had to have special
cases peppered throughout.

With this change, we move to using the pjsip_evsub API
instead, which streamlines the code by removing special
cases.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408005 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-13 18:50:30 +00:00
Mark Michelson
39f87c16a9 Fix crash in AMI PJSIPShowEndpoint action.
If an AOR has no permanent contacts, then the
permanent_contacts container is never allocated.
This makes the code safe in the face of NULLs.

I also changed the variable that counts contacts
from "num" to "total_contacts" since there are now
two variables that are indicate numbers of things.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@407988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-13 15:45:52 +00:00
Walter Doekes
a36b55313f realtime: Fix ast_update2_realtime() on raspberry pi.
The old code depended on undefined va_arg behaviour: calling a function
twice with the same va_list parameter and expecting it to continue where
it left off. The changed code behaves like the manpage says it should.

Also added a bunch of early returns to trap errors (e.g. OOM) instead of
crashing.

The problem was found by Julian Lyndon-Smith. The deviant behaviour on
the raspberry PI also uncovered another bug (fixed in r407875) in the
res_config_pgsql.so driver.

Reported by: jmls
Tested by: jmls
Review: https://reviewboard.asterisk.org/r/3201/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@407968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-12 08:18:37 +00:00
Matthew Jordan
2b080d139b ari/resource_channels: Add channel variables earlier in the creation process
This patch tweaks the behaviour of POST /channels with channel variables such
that the variables are passed into the pbx.c routines that perform the
origination. This allows the variables to be assigned to the newly created
channels immediately upon their construction, as opposed to be assigned after
the originate has completed.

The upshot of this is that the variables are available on the channels if
they execute in the dialplan, as opposed to only being available once the
channels are answered.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@407937 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-11 03:16:18 +00:00
Walter Doekes
4a4d8f7ab5 res_config_pgsql: Fix ast_update2_realtime calls.
Fix so multiple updates from a single call works (add missing ',').
Remove bogus ast_free's that weren't supposed to be there.
Moved a few spaces for readability.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@407875 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-10 16:43:29 +00:00
Kinsey Moore
56c607a818 ConfBridge: Correct prompt playback target
Currently, when the first marked user enters the conference that
contains waitmarked users, a prompt is played indicating that the user
is being placed into the conference. Unfortunately, this prompt is
played to the marked user and not the waitmarked users which is not
very helpful.

This patch changes that behavior to play a prompt stating
"The conference will now begin" to the entire conference after adding
and unmuting the waitmarked users since the design of confbridge is not
conducive to playing a prompt to a subset of users in a conference in
an asynchronous manner.

(closes issue PQ-1396)
Review: https://reviewboard.asterisk.org/r/3155/
Reported by: Steve Pitts
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@407858 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-10 15:54:45 +00:00
Richard Mudgett
3ecfc29b8c chan_iax2: Add some more iaxs[] NULL checks to a routine already full of them.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@407766 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-07 20:48:16 +00:00
Matthew Jordan
a5de26cb35 security_events: Fix assertion failure in dev-mode on optional IE parsing
When formatting an optional IE, the value is, of course, optional. As such, it
is entirely appropriate for ast_json_object_get to return NULL. If that occurs,
we now simply skip the IE that was requested, as it was not provided by the
entity that raised the event.

Thanks to George Joseph (gtjoseph) for catching this and reporting it in
#asterisk-dev


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@407750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-07 20:09:01 +00:00
Matthew Jordan
d8ef1239ae funcs/func_cdr: Handle empty time values when extracting parsed values
When extracting timestamps that are parsed, time stamp values that are not set
(time values of 0.000000) should not actually result in a parsed string. The
value should be skipped, and the result of the CDR function should be an
empty string.

Prior to this patch, the result was fed to the time formatting, which would
result in an output of a date/time in 1969.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@407747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-07 19:36:15 +00:00
Richard Mudgett
723b89510d chan_iax2: Block unnecessary control frames to/from the wire.
Establishing an IAX2 call between Asterisk v1.4 and v1.8 (or later)
results in an unexpected call disconnect.  The problem happens because
newer values in the enum ast_control_frame_type are not consistent between
the branch versions of Asterisk.

For example:
1) v1.4 calls v1.8 (or later) using IAX2

2) v1.8 answers and sends a connected line update control frame.  (on v1.8
AST_CONTROL_CONNECTED_LINE = 22)

3) v1.4 receives the control frame as an end-of-q (on v1.4
AST_CONTROL_END_OF_Q = 22)

4) v1.4 disconnects the call once the receive queue becomes empty.

Several things are done by this patch to fix the problem and attempt to
prevent it from happening again in the future:

* Added a warning at the definition of enum ast_control_frame_type about
how to add new control frame values.

* Made block sending and receiving control frames that have no reason to
go over the wire.

* Extended the connectedline iax.conf parameter to also include the
redirecting information updates.

* Updated the connectedline iax.conf parameter documentation to include a
notice that the parameter must be "no" when the peer is an Asterisk v1.4
instance.

(closes issue AST-1302)

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@407729 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-07 18:18:26 +00:00
Matthew Jordan
660bce4d6a security_events: Fix error caused by DTD validation error
The appdocsxml.dtd specifies that a "required" attribute in a parameter may
have a value of yes, no, true, or false. On some systems, specifying "False"
instead of "false" would cause a validation error. This patch fixes the casing
to explicitly match the DTD.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@407676 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-07 16:46:14 +00:00
Tzafrir Cohen
3174b2cd3c indications.conf: add stutter tone; end properly
* If the "stutter" (voicemail indication) tone is indeed a stutter tone,
  and it ends with a constant tone, make sure that it is the dial tone.
  This was done for India (in), Mexico (mx) and the Philippines (ph).
* If no "stutter" tone exists for a country, provide one. This was done for
  Spain (es), Malaysia (my) and Venezuela (ve).

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@407624 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-07 13:13:39 +00:00
Matthew Jordan
58acb5e4d4 security_events: Add AMI documentation; output optional fields
This patch adds documentation for the Security Events that are emited over
AMI. It also notes these events in the UPGRADE/CHANGES file.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@407589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-06 20:06:57 +00:00
Rusty Newton
7c6fb702c9 configs/pjsip.conf.sample: Configuration section naming in pjsip.conf.sample needs a little clarification
There is a bit of nuance to how you name things in pjsip.conf. This is a documentation patch to at least clear it up a little for users.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@407587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-06 19:57:51 +00:00
Kevin Harwell
54102cd479 pjsip realtime: already created enum failure for postgresql
If an enum had been previously created the alembic script would attempt to
re-create it and an error would be generated while running migrations for a
postgresql server.  The work around for this is to use the ENUM object type
for postgres as opposed to the generic enum type used by sqlalchemy. Using
this type in the script seems to work properly for both postgres and mysql.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@407572 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-06 17:54:42 +00:00
Richard Mudgett
a4e2316310 res_pjsip: Updates and adds more PJSIP CLI commands.
* Adds identify, transport, and registration support to the PJSIP CLI.

* Creates three additional callbacks, one for an iterator, one for a
comparator, and one for a container.  This eliminates the link dependency
from higher level modules to lower level ones.

* Eliminates duplicate sorting in PJSIP CLI commands.

* Cleans up PJSIP CLI output formatting.

* Pushes CLI command registration down to the implementing source file.

* Adds several ast_sip_destroy_sorcery functions to complement existing
ast_sip_sorcery_initialize functions.  The destroy functions unregister
PJSIP CLI commands and PJSIP CLI formatters.

Reported by: George Joseph

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@407568 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-06 17:06:47 +00:00
Mark Michelson
2b0693a7d5 Fix alembic script to work properly in offline mode.
When run in offline mode, this would attempt to check the database for
the presence of a type it was going to try to create. I now check the
context to see if we're running in offline mode and change a parameter
accordingly.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@407567 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-06 16:53:24 +00:00