Commit Graph

131 Commits

Author SHA1 Message Date
Andreas Eversberg ce602d5264 WIP: Volte support for outgoing SIP registration 2024-04-23 09:46:10 +02:00
Andreas Eversberg ac6c9d5f70 Remove hack: VoLTE support for Asterisk 2024-04-23 09:42:28 +02:00
Andreas Eversberg fb20428ebe HACK: VoLTE support for Asterisk 2024-04-22 13:41:13 +02:00
Sean Bright acd1513111 ael: Regenerate lexers and parsers.
Various changes to ensure that the lexers and parsers can be correctly
generated when REBUILD_PARSERS is enabled.

Some notes:

* Because of the version of flex we are using to generate the lexers
  (2.5.35) some post-processing in the Makefile is still required.

* The generated lexers do not contain the problematic C99 check that
  was being replaced by the call to sed in the respective Makefiles so
  it was removed.

* Since these files are generated, they will include trailing
  whitespace in some places. This does not need to be corrected.

Change-Id: Ibbd343606fcf5c0d285b1599e6e8e59f514f2e4e
2023-04-03 07:58:23 -05:00
George Joseph 639d72e98c Geolocation: Core Capability Preview
This commit adds res_geolocation which creates the core capabilities
to manipulate Geolocation information on SIP INVITEs.

An upcoming commit will add res_pjsip_geolocation which will
allow the capabilities to be used with the pjsip channel driver.

This commit message is intentionally short because this isn't
a simple capability.  See the documentation at
https://wiki.asterisk.org/wiki/display/AST/Geolocation
for more information.

THE CAPABILITIES IMPLEMENTED HERE MAY CHANGE BASED ON
USER FEEDBACK!

ASTERISK-30127

Change-Id: Ibfde963121b1ecf57fd98ee7060c4f0808416303
2022-07-12 07:52:12 -05:00
Kevin Harwell 272bac70dd res_aeap & res_speech_aeap: Add Asterisk External Application Protocol
Add framework to connect to, and read and write protocol based
messages from and to an external application using an Asterisk
External Application Protocol (AEAP). This has been divided into
several abstractions:

 1. transport - base communication layer (currently websocket only)
 2. message - AEAP description and data (currently JSON only)
 3. transaction - links/binds requests and responses
 4. aeap - transport, message, and transaction handler/manager

This patch also adds an AEAP implementation for speech to text.
Existing speech API callbacks for speech to text have been completed
making it possible for Asterisk to connect to a configured external
translator service and provide audio for STT. Results can also be
received from the external translator, and made available as speech
results in Asterisk.

Unit tests have also been created that test the AEAP framework, and
also the speech to text implementation.

ASTERISK-29726 #close

Change-Id: Iaa4b259f84aa63501e5fd2a6fb107f900b4d4ed2
2022-04-26 14:26:48 -05:00
George Joseph 448962d056 res_snmp: Add -fPIC to _ASTCFLAGS
With gcc 11, res/res_snmp.c and res/snmp/agent.c need the
-fPIC option added to its _ASTCFLAGS.

ASTERISK-29634

Change-Id: I34649c85e075fd954e578378fabf798c3f038f50
2021-09-10 10:42:41 -05:00
Alexander Traud 137bd7fe65 BuildSystem: Remove two dead exceptions for compiler Clang.
Commit 305ce3d added -Wno-parentheses-equality to Makefile.rules,
turning the previous two warning suppressions from commit e9520db
redundant. Let us remove the latter.

Change-Id: I0b471254b31e6e05902062761dded4b3e626c7ac
2021-08-19 09:02:41 -05:00
Ben Ford 211bb8a79c res_stir_shaken: Initial commit and reading private key.
This commit sets up some of the initial framework for the module and
adds a way to read the private key from the specified file, which will
then be appended to the certificate object. This works fine for now, but
eventually some other structure will likely need to be used to store all
this information. Similarly, the caller_id_number is specified on the
certificate config object, but in the end we will want that information
to be tied to the certificate itself and read it from there.

A method has been added that will retrieve the private key associated
with the caller_id_number passed in. Tab completion for certificates and
stores has also been added.

Change-Id: Ic4bc1416fab5d6afe15a8e2d32f7ddd4e023295f
2020-03-25 18:04:22 -05:00
Kevin Harwell 06dada3f01 codec negotiation: add incoming_call_offer_prefs option
Add a new option, incoming_call_offer_pref, to res_pjsip endpoints that
specifies the preferred order of codecs after receiving an offer.

This patch does the following:

  Adds a new enumeration, ast_sip_call_codec_pref, used by the the new
configuration option that's added to the endpoint media structure.

  Adds a new ast_sip_session_caps structure that's set for each session media
object.

  Creates a new file, res_pjsip_session_caps that "implements" the new
structure and option, and is compiled into the res_pjsip_session library.

ASTERISK-28756 #close

Change-Id: I35e7a2a0c236cfb6bd9cdf89539f57a1ffefc76f
2020-03-03 14:51:14 -06:00
Matt Jordan 0760af71ad res_prometheus: Add Asterisk channel metrics
This patch adds basic Asterisk channel statistics to the res_prometheus
module. This includes:

* asterisk_calls_sum: A running sum of the total number of
  processed calls

* asterisk_calls_count: The current number of calls

* asterisk_channels_count: The current number of channels

* asterisk_channels_state: The state of any particular channel

* asterisk_channels_duration_seconds: How long a channel has existed,
  in seconds

In all cases, enough information is provided with each channel metric
to determine a unique instance of Asterisk that provided the data, as
well as the name, type, unique ID, and - if present - linked ID of each
channel.

ASTERISK-28403

Change-Id: I0db306ec94205d4f58d1e7fbabfe04b185869f59
2019-05-21 11:03:13 -05:00
Corey Farrell b5914d90ac Fix GCC 8 build issues.
This fixes build warnings found by GCC 8.  In some cases format
truncation is intentional so the warning is just suppressed.

ASTERISK-27824 #close

Change-Id: I724f146cbddba8b86619d4c4a9931ee877995c84
2018-05-11 09:48:58 -04:00
Corey Farrell 179ae87cf4 Build System: Add missing ASTMM_LIBC to flex output.
Redirect libc allocation functions to use Asterisk functions for
main/ast_expr2f.c and res/ael/ael_lex.c.  This will resolve errors
produced by astmm.h when these files are regenerated, though other
issues still remain.

ASTERISK~27813

Change-Id: I7263e9e4217a17bde4ffaa2087a8f8aeb2a8588c
2018-04-18 14:50:53 -06:00
Sean Bright fd0ca1c3f9 Remove as much trailing whitespace as possible.
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
2017-12-22 09:23:22 -05:00
Corey Farrell 62508d6891 Build System: Create Makefile macro MOD_ADD_SOURCE.
This new macro allows a single line to add all additional
sources to a module.  This helps prevent modules from
missing steps, and makes future changes easier since
they can be made in a single place.

ASTERISK-24960 #close
Reported by: Corey Farrell

Change-Id: I38f12d8b72c5e7bb37a879b2fb51761a2855eb4b
2015-04-14 12:53:03 -04:00
Matthew Jordan e9520dbe0d clang compiler warnings: Fix -Wparantheses-equality warnings
Clang will treat ((a == b)) as a warning, as it reasonably expects that the
developer may have intended to write (a == b) or ((a = b)). This patch cleans
up all instances where equality, not assignment, was intended between two
parantheses.

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

ASTERISK-24917
Repoted by: dkdegroot
patches:
  rb4531.patch submitted by dkdegroot (License 6600)
........

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

Merged revisions 433688 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@433689 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-03-28 12:41:24 +00:00
David M. Lee 7f547872e4 ARI: Implement /recordings/stored API's
his patch implements the ARI API's for stored recordings. While the
original task only specified deleting a recording, it was simple
enough to implement the GET for all recordings, and for an individual
recording.

The recording playback operation was modified to use the same code for
accessing the recording as the REST API, so that they will behave
consistently.

There were several problems with the api-docs that were also fixed,
bringing the ARI spec in line with the implementation. There were some
'wishful thinking' fields on the stored recording model (duration and
timestamp) that were removed, because I ended up not implementing a
metadata file to go along with the recording to store such information.

The GET /recordings/live operation was removed, since it's not really
that useful to get a list of all recordings that are currently going
on in the system. (At least, if we did that, we'd probably want to
also list all of the current playbacks. Which seems weird.)

(closes issue ASTERISK-21582)
Review: https://reviewboard.asterisk.org/r/2693/
........

Merged revisions 397985 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 13:28:50 +00:00
Mark Michelson 735b30ad71 The large GULP->PJSIP renaming effort.
The general gist is to have a clear boundary between old SIP stuff
and new SIP stuff by having the word "SIP" for old stuff and "PJSIP"
for new stuff. Here's a brief rundown of the changes:

* The word "Gulp" in dialstrings, functions, and CLI commands is now
  "PJSIP"
* chan_gulp.c is now chan_pjsip.c
* Function names in chan_gulp.c that were "gulp_*" are now "chan_pjsip_*"
* All files that were "res_sip*" are now "res_pjsip*"
* The "res_sip" directory is now "res_pjsip"
* Files in the "res_pjsip" directory that began with "sip_*" are now "pjsip_*"
* The configuration file is now "pjsip.conf" instead of "res_sip.conf"
* The module info for all PJSIP-related files now uses "PJSIP" instead of "SIP"
* CLI and AMI commands created by Asterisk's PJSIP modules now have "pjsip" as
the starting word instead of "sip"



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-30 18:14:50 +00:00
Kinsey Moore d8956f690e Rename everything Stasis-HTTP to ARI
This renames all files and API calls from several variants of
Stasis-HTTP to ARI including:
* Stasis-HTTP -> ARI
* STASIS_HTTP -> ARI
* stasis_http -> ari (ast_ari for global symbols, file names as well)
* stasis http -> ARI

Review: https://reviewboard.asterisk.org/r/2706/
(closes issue ASTERISK-22136)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395603 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-27 23:11:02 +00:00
David M. Lee 9ba976b19c ARI authentication.
This patch adds authentication support to ARI.

Two authentication methods are supported. The first is HTTP Basic
authentication, as specified in RFC 2617[1]. The second is by simply
passing the username and password as an ?api_key query parameter
(which allows swagger-ui[2] to authenticate more easily).

ARI usernames and passwords are configured in the ari.conf file
(formerly known as stasis_http.conf). The user may be set to
`read_only`, which will prohibit the user from issuing POST, DELETE,
etc. Also, the user's password may be specified in either plaintext,
or encrypted using the crypt() function.

Several other notes about the patch.

 * A few command line commands for seeing ARI config and status were
   also added.
 * The configuration parsing grew big enough that I extracted it to
   its own file.

 [1]: http://www.ietf.org/rfc/rfc2617.txt [2]:
 https://github.com/wordnik/swagger-ui

(closes issue ASTERISK-21277)
Review: https://reviewboard.asterisk.org/r/2649/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-03 16:33:13 +00:00
David M. Lee c9a3d4562d Update events to use Swagger 1.3 subtyping, and related aftermath
This patch started with the simple idea of changing the /events data
model to be more sane. The original model would send out events like:

    { "stasis_start": { "args": [], "channel": { ... } } }

The event discriminator was the field name instead of being a value in
the object, due to limitations in how Swagger 1.1 could model objects.
While technically sufficient in communicating event information, it was
really difficult to deal with in terms of client side JSON handling.

This patch takes advantage of a proposed extension[1] to Swagger which
allows type variance through the use of a discriminator field. This had
a domino effect that made this a surprisingly large patch.

 [1]: https://groups.google.com/d/msg/wordnik-api/EC3rGajE0os/ey_5dBI_jWcJ

In changing the models, I also had to change the swagger_model.py
processor so it can handle the type discriminator and subtyping. I took
that a big step forward, and using that information to generate an
ari_model module, which can validate a JSON object against the Swagger
model.

The REST and WebSocket generators were changed to take advantage of the
validators. If compiled with AST_DEVMODE enabled, JSON objects that
don't match their corresponding models will not be sent out. For REST
API calls, a 500 Internal Server response is sent. For WebSockets, the
invalid JSON message is replaced with an error message.

Since this took over about half of the job of the existing JSON
generators, and the .to_json virtual function on messages took over the
other half, I reluctantly removed the generators.

The validators turned up all sorts of errors and inconsistencies in our
data models, and the code. These were cleaned up, with checks in the
code generator avoid some of the consistency problems in the future.

 * The model for a channel snapshot was trimmed down to match the
   information sent via AMI. Many of the field being sent were not
   useful in the general case.
 * The model for a bridge snapshot was updated to be more consistent
   with the other ARI models.

Another impact of introducing subtyping was that the swagger-codegen
documentation generator was insufficient (at least until it catches up
with Swagger 1.2). I wanted it to be easier to generate docs for the API
anyways, so I ported the wiki pages to use the Asterisk Swagger
generator. In the process, I was able to clean up many of the model
links, which would occasionally give inconsistent results on the wiki. I
also added error responses to the wiki docs, making the wiki
documentation more complete.

Finally, since Stasis-HTTP will now be named Asterisk REST Interface
(ARI), any new functions and files I created carry the ari_ prefix. I
changed a few stasis_http references to ari where it was non-intrusive
and made sense.

(closes issue ASTERISK-21885)
Review: https://reviewboard.asterisk.org/r/2639/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-03 16:32:41 +00:00
David M. Lee dcf03554a0 Shuffle RESTful URL's around.
This patch moves the RESTful URL's around to more appropriate
locations for release.

The /stasis URL's are moved to /ari, since Asterisk REST Interface was
a more appropriate name than Stasis-HTTP. (Most of the code still has
stasis_http references, but they will be cleaned up after there are no
more outstanding branches that would have merge conflicts with such a
change).

A larger change was moving the ARI events WebSocket off of the shared
/ws URL to its permanent home on /ari/events. The Swagger code
generator was extended to handle "upgrade: websocket" and
"websocketProtocol:" attributes on an operation.

The WebSocket module was modified to better handle WebSocket servers
that have a single registered protocol handler. If a client
connections does not specify the Sec-WebSocket-Protocol header, and
the server has a single protocol handler registered, the WebSocket
server will go ahead and accept the client for that subprotocol.

(closes issue ASTERISK-21857)
Review: https://reviewboard.asterisk.org/r/2621/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-03 16:32:00 +00:00
Richard Mudgett 3d63833bd6 Merge in the bridge_construction branch to make the system use the Bridging API.
Breaks many things until they can be reworked.  A partial list:
chan_agent
chan_dahdi, chan_misdn, chan_iax2 native bridging
app_queue
COLP updates
DTMF attended transfers
Protocol attended transfers


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-21 18:00:22 +00:00
David M. Lee e8f4ac6c61 Break res_stasis into smaller files.
When implementing playback for stasis-http, the monolithicedness of
res_stasis really started to get in my way.

This patch breaks the major components of res_stasis.c into individual
files.

 * res/stasis/app.c - Stasis application tracking
 * res/stasis/control.c - Channel control objects
 * res/stasis/command.c - Channel command object

This refactoring also allows res_stasis applications to be loaded as
independent modules, such as the new res_stasis_answer module.

The bulk of this patch is simply moving code from one file to another,
adjusting names and adding accessors as necessary.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388729 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-14 21:45:08 +00:00
Mark Michelson 74f2318051 Merge the pimp_my_sip branch into trunk.
The pimp_my_sip branch is being merged at this point because
it offers basic functionality, and from an API standpoint, things
are complete.

SIP work is *not* feature-complete; however, with the completion
of the SUBSCRIBE/NOTIFY API, all APIs (except a PUBLISH API) have
been created, and thus it is possible for developers to attempt
to create new SIP work.

API documentation can be found in the doxygen in the code, but
usability documentation is still lacking.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386540 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-25 18:25:31 +00:00
David M. Lee 1c21b8575b This patch adds a RESTful HTTP interface to Asterisk.
The API itself is documented using Swagger, a lightweight mechanism for
documenting RESTful API's using JSON. This allows us to use swagger-ui
to provide executable documentation for the API, generate client
bindings in different languages, and generate a lot of the boilerplate
code for implementing the RESTful bindings. The API docs live in the
rest-api/ directory.

The RESTful bindings are generated from the Swagger API docs using a set
of Mustache templates.  The code generator is written in Python, and
uses Pystache. Pystache has no dependencies, and be installed easily
using pip. Code generation code lives in rest-api-templates/.

The generated code reduces a lot of boilerplate when it comes to
handling HTTP requests. It also helps us have greater consistency in the
REST API.

(closes issue ASTERISK-20891)
Review: https://reviewboard.asterisk.org/r/2376/

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-22 14:58:53 +00:00
Jason Parker 1cb917096b Switch to using external pjproject libraries.
ICE/STUN/TURN support in res_rtp_asterisk is also now optional.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382900 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-12 19:08:59 +00:00
Jason Parker eb61bb96b7 Fix how we build pjproject.
Allow parallel builds, better tolerate failures, build faster.

This also stops running dependencies before top-level configure has been run.

(closes issue ASTERISK-20815)

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380817 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-04 19:52:14 +00:00
Andrew Latham c7857504df Doxygen Updates - Title update
Update and extend the configuration_file group and enable linking to the resource.  Update title that was left behind many years ago.

(issue ASTERISK-20259)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-14 21:44:27 +00:00
David M. Lee cab7acd21d Fix parallel make for res_asterisk_rtp.
Fixes a build regression introduced in r369517 "Add support for ICE/STUN/TURN
in res_rtp_asterisk and chan_sip." [1].

[1] http://svnview.digium.com/svn/asterisk?view=revision&revision=369517

When compiling asterisk in parallel like:
    $ make -j 10

It's possible to get errors like the following:

    .pjlib-util-test-x86_64-unknown-linux-gnu.depend:120: *** missing separator.  Stop.
    make[4]: *** [depend] Error 2
    make[3]: *** [dep] Error 1
    make[2]: *** [/home/sruffell/asterisk-working/res/pjproject/pjnath/lib/libpjnath-x86_64-unknown-linux-gnu.a] Error 2
    make[3]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.

This is because the build system is trying to build each of the libraries in
pjproject in parallel. Now the build will build pjproject in a single job and
link the results into res_asterisk_rtp.

Parallel builds, on one test system, saves ~1.5 minutes from a default Asterisk
build:

Single job:
    $ git clean -fdx >/dev/null && time ( ./configure >/dev/null 2>&1 && make >/dev/null 2>&1 )

    real    2m34.529s
    user    1m41.810s
    sys     0m15.970s

Parallel make:
    $ git clean -fdx >/dev/null && time ( ./configure >/dev/null 2>&1 && make -j10 >/dev/null 2>&1 )

    real    1m2.353s
    user    2m39.120s
    sys     0m18.850s

(closes issue ASTERISK-20362)
Reported by: Shaun Ruffel
Patches:
    0001-res_asterisk_rtp-Fix-build-error-when-using-parallel.patch uploaded by Shaun Ruffel (License #5417)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372610 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-07 20:53:48 +00:00
Joshua Colp 3a2757923c Use the bruteforce method to get debugging enabled for pjproject.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370240 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-19 12:14:29 +00:00
Joshua Colp bfa31f5676 Turn on debugging for pjproject so we can get a better idea of what is causing the generic CCSS test crash.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-19 10:46:48 +00:00
Joshua Colp 37256ea45d Add support for ICE/STUN/TURN in res_rtp_asterisk and chan_sip.
Review: https://reviewboard.asterisk.org/r/1891/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369517 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-01 17:28:57 +00:00
Richard Mudgett 0886204011 Merged revisions 318351 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r318351 | rmudgett | 2011-05-09 18:15:32 -0500 (Mon, 09 May 2011) | 6 lines
  
  Remove references to res_features and its export file.
  
  The contents of res/res_features.c was moved to into main/features.c
  awhile ago.  There is no longer any need for the res/Makefile to reference
  res_features or the res_features linker exports file to exist.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@318352 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-09 23:16:12 +00:00
Jason Parker d8dea9e76a Merged revisions 262421 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r262421 | qwell | 2010-05-11 14:55:42 -0500 (Tue, 11 May 2010) | 11 lines
  
  Use a less silly method for modifying a flex-generated file.
  
  The sed syntax that was used wasn't actually valid, causing some versions to
  choke.  This is the method that is used in 1.6.x+ for similar changes.
  
  (closes issue #16696)
  Reported by: bklang
  Patches: 
        16696-sedfix.diff uploaded by qwell (license 4)
  Tested by: qwell
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@262422 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-11 19:57:24 +00:00
Kevin P. Fleming ae6008ef3a Change per-file debug and verbose levels to be per-module, the way
users expect them to work.

'core set debug' and 'core set verbose' can optionally change the
level for a specific filename; however, this is actually for a
specific source file name, not the module that source file is included
in. With examples like chan_sip, chan_iax2, chan_misdn and others
consisting of multiple source files, this will not lead to the
behavior that users expect. If they want to set the debug level for
chan_sip, they want it set for all of chan_sip, and not to have to
also set it for reqresp_parser and other files that comprise the
chan_sip module.

This patch changes this functionality to be module-name based instead
of file-name based.

To make this work, some Makefile modifications were required to ensure
that the AST_MODULE definition is present in each object file produced
for each module as well.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@253917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-23 14:22:27 +00:00
Tilghman Lesher 1ffdf5c2ee Merged revisions 242969 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r242969 | tilghman | 2010-01-25 15:50:22 -0600 (Mon, 25 Jan 2010) | 2 lines
  
  Err, and use the new menuselect define, too.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@242971 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-25 21:51:41 +00:00
Tilghman Lesher 245bd1861f Merged revisions 242852 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r242852 | tilghman | 2010-01-25 14:15:45 -0600 (Mon, 25 Jan 2010) | 2 lines
  
  Restore FreeBSD to able-to-compile-ish-mode
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@242857 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-25 20:18:15 +00:00
Tilghman Lesher afb9fab574 Merged revisions 242728 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r242728 | tilghman | 2010-01-24 23:42:22 -0600 (Sun, 24 Jan 2010) | 2 lines
  
  Buildbot pointed out an error (thanks, buildbot!)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@242729 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-25 05:45:00 +00:00
Tilghman Lesher 137046e459 Merged revisions 242723 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r242723 | tilghman | 2010-01-24 23:33:37 -0600 (Sun, 24 Jan 2010) | 2 lines
  
  Oops, should have used CMD_PREFIX, not ECHO_PREFIX, for the commands.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@242724 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-25 05:34:33 +00:00
Tilghman Lesher bc9f02a60d Merged revisions 242520 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r242520 | tilghman | 2010-01-24 00:33:01 -0600 (Sun, 24 Jan 2010) | 8 lines
  
  Only rebuild bison and flex source files on demand, if bison and flex are detected by the configure script.
  
  Changed after discussion on the -dev list about possible unnecessary build
  failures, due to checkouts/untars causing these special source files to
  possibly be newer than their resulting C files.  This should additionally
  ensure that nobody need learn about extra Makefile arguments to ensure the
  proper files get rebuilt when changes are made to these special source files.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@242521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-24 06:40:31 +00:00
Tilghman Lesher 3d51b9025f Merged revisions 242423 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r242423 | tilghman | 2010-01-22 15:44:18 -0600 (Fri, 22 Jan 2010) | 7 lines
  
  Rebuild from flex, bison sources when necessary.
  
  (issue #14629)
   Reported by: Marquis
   Patches: 
         20100121__issue14629.diff.txt uploaded by tilghman (license 14)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@242424 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-22 21:45:18 +00:00
Kevin P. Fleming 96e4e31eeb Merged revisions 207647 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r207647 | kpfleming | 2009-07-21 08:04:44 -0500 (Tue, 21 Jul 2009) | 12 lines
  
  Ensure that user-provided CFLAGS and LDFLAGS are honored.
  
  This commit changes the build system so that user-provided flags (in ASTCFLAGS
  and ASTLDFLAGS) are supplied to the compiler/linker *after* all flags provided
  by the build system itself, so that the user can effectively override the
  build system's flags if desired. In addition, ASTCFLAGS and ASTLDFLAGS can now
  be provided *either* in the environment before running 'make', or as variable
  assignments on the 'make' command line. As a result, the use of COPTS and LDOPTS
  is no longer necessary, so they are no longer documented, but are still supported
  so as not to break existing build systems that supply them when building Asterisk.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@207680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-21 13:28:04 +00:00
Michiel van Baak 445c5296da Make res_config_ldap compile with the official OpenLDAP 2.3.X versions.
They removed the LDAP_DEPRECATED define from their source and since we are using a couple
of deprecated function calls we should define it with a CFLAG.

Tested by me on OpenBSD 4.4 and snuff-home on Linux to make sure everything keeps compiling.
It shouldn't break, we only define the LDAP_DEPRECATED with this which is what 
all 2.2.X and older versions of OpenLDAP did in their own tree.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@159734 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-28 14:20:11 +00:00
Kevin P. Fleming 8d5deb312b Merged revisions 157859 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r157859 | kpfleming | 2008-11-19 15:34:47 -0600 (Wed, 19 Nov 2008) | 7 lines
  
  the gcc optimizer frequently finds broken code (use of uninitalized variables, unreachable code, etc.), which is good. however, developers usually compile with the optimizer turned off, because if they need to debug the resulting code, optimized code makes that process very difficult. this means that we get code changes committed that weren't adequately checked over for these sorts of problems.
  
  with this build system change, if (and only if) --enable-dev-mode was used and DONT_OPTIMIZE is turned on, when a source file is compiled it will actually be preprocessed (into a .i or .ii file), then compiled once with optimization (with the result sent to /dev/null) and again without optimization (but only if the first compile succeeded, of course).
  
  while making these changes, i did some cleanup work in Makefile.rules to move commonly-used combinations of flag variables into their own variables, to make the file easier to read and maintain
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@157974 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-20 00:08:12 +00:00
Michiel van Baak 0d49cdae3e Make all sed calls Posix sed compatible.
To make sure nobody commits script-modified files we first make a backup
of asterisk.tex, run the script, generate the pdf and / or html,
and put the original asterisk.tex back.
This will guard us for the stuff that happened before that someone committed 
a locally modified asterisk.tex, with changes done by this script.

(closes issue #13062)
Reported by: mvanbaak
Patches:
      sed_without-i-v3.diff uploaded by mvanbaak (license 7)
Tested by: mvanbaak

Feedback from Corydon. Thanks for taking the time to go through this.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130578 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-13 23:14:03 +00:00
Kevin P. Fleming 00696f5f37 make the AIS checking a little more generic, and have a more useful configure script command line option for OpenAIS
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@127017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-01 17:22:47 +00:00
Russell Bryant e9d72e0cb2 Merge another big set of changes from team/russell/events
This commit merges in the rest of the code needed to support distributed device
state.  There are two main parts to this commit.

Core changes:
 - The device state handling in the core has been updated to understand device
   state across a cluster of Asterisk servers.  Every time the state of a device
   changes, it looks at all of the device states on each node, and determines the
   aggregate device state.  That resulting device state is what is provided to
   modules in Asterisk that take actions based on the state of a device.

New module, res_ais:
 - A module has been written to facilitate the communication of events between
   nodes in a cluster of Asterisk servers.  This module uses the SAForum AIS
   (Service Availability Forum Application Interface Specification) CLM and EVT
   services (Cluster Management and Event) to handle this task.  This module
   currently supports sharing Voicemail MWI (Message Waiting Indication) and
   device state events between servers.  It has been tested with openais, though
   other implementations of the spec do exist.

For more information on testing distributed device state, see the following doc:
  - doc/distributed_devstate.txt


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-10 15:12:17 +00:00
Kevin P. Fleming 79c3038ee5 Merged revisions 107352 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107352 | kpfleming | 2008-03-11 06:04:29 -0500 (Tue, 11 Mar 2008) | 11 lines

fix up various compiler warnings found with gcc-4.3:

- the output of flex includes a static function called 'input' that is not used, so for the moment we'll stop having the compiler tell us about unused variables in the flex source files (a better fix would be to improve our flex post-processing to remove the unused function)

- main/stdtime/localtime.c makes assumptions about signed integer overflow, and gcc-4.3's improved optimizer tries to take advantage of handling potential overflow conditions at compile time; for now, suppress these optimizations until we can fiure out if the code needs improvement

- main/udptl.c has some references to uninitialized variables; in one case there was no bug, but in the other it was certainly possibly for unexpected behavior to occur

- main/editline/readline.c had an unused variable


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107373 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 11:36:51 +00:00
Steve Murphy 3f152e5ff0 Merged revisions 97889 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r97889 | murf | 2008-01-10 14:37:10 -0700 (Thu, 10 Jan 2008) | 1 line

Applied the same fixes for ael.flex as was done in 97849 for ast_expr2.fl; overrode the normally generate yyfree func with our own version that checks the pointer for non-null before passing to free(). Also takes care of a little problem with 2.5.33 and the use of the __STDC_VERSION__ macro.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97890 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 21:46:56 +00:00