Commit Graph

20 Commits

Author SHA1 Message Date
Matthew Jordan
4895ddef28 res_pjsip: Support setting a default accountcode on endpoints
Most channel drivers let you specify a default accountcode to be set on
channels associated with a particular peer/endpoint/object. Prior to this
patch, chan_pjsip/res_pjsip did not support such a setting.

This patch adds a new setting to the res_pjsip endpoint object, 'accountcode'.
When a channel is created that is associated with an endpoint with this value
set, the channel will automatically have its accountcode property set to the
value configured for the endpoint.

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

ASTERISK-24000 #close
Reported by: Matt Jordan


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@418756 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-16 13:58:07 +00:00
Joshua Colp
387fa1df51 Recorded merge of revisions 417677 from http://svn.asterisk.org/svn/asterisk/branches/11
........
res_rtp_asterisk: Add SHA-256 support for DTLS and perform DTLS negotiation on RTCP.

This change fixes up DTLS support in res_rtp_asterisk so it can accept and provide
a SHA-256 fingerprint, so it occurs on RTCP, and so it occurs after ICE negotiation
completes. Configuration options to chan_sip and chan_pjsip have also been added to
allow behavior to be tweaked (such as forcing the AVP type media transports in SDP).

ASTERISK-22961 #close
Reported by: Jay Jideliov

Review: https://reviewboard.asterisk.org/r/3679/
Review: https://reviewboard.asterisk.org/r/3686/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@417678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-30 19:46:58 +00:00
Joshua Colp
197505339d res_pjsip_pubsub: Persist subscriptions in sorcery so they are recreated on startup.
This change makes res_pjsip_pubsub persist inbound subscriptions in sorcery. By default
this uses the local astdb but it can also be configured to store within an outside
database. When Asterisk is started these subscriptions are recreated if they have not
expired. Notifications are sent to the devices which have subscribed and they are none
the wiser that the system has restarted.

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


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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@414763 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-28 17:43:36 +00:00
Kevin Harwell
8ad8ffeb81 pjsip realtime: increase the size of some columns
The string lengths on certain columns created through alembic for PJSIP were
too short. For instance, columns containing URIs are currently set to 40
characters, but this can be too small and result in truncated values.  Added
an alembic migration script that increases the size of these columns and a
few others to 255.

ASTERISK-23639 #close
Reported by: Mark Michelson
Review: https://reviewboard.asterisk.org/r/3475/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@412992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-24 14:37:11 +00:00
Mark Michelson
44e73556bc Add alembic script that adds contact user_agent and endpoint message_context.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-28 17:08:52 +00:00
Richard Mudgett
a90c190c87 Fix 'alembic branches' merge conflict as described by the web page.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@411191 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-26 16:03:24 +00:00
Jonathan Rose
3cdbf978d1 pjsip configuration: Make transport TOS values consistent with endpoints
Transport TOS values were interpreted as DSCP values without being documented
as such. Endpoint TOS values (tos_audio/tos_video) behaved normally as TOS
values have historically. This patch makes the transport TOS values behave as
TOS values and makes all TOS values readable as string values (e.g. AF11).
In addition, alembic scripts have been updated to use the proper field types
for all TOS/COS values.

(issue ASTERISK-23235)
Reported by: George Joseph
Review: https://reviewboard.asterisk.org/r/3304/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410028 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06 18:50:44 +00:00
Richard Mudgett
526d0ee4cf alembic: Add missing queue and CDR table creation scripts.
* Added the queues and queue_members tables to the config alembic scripts.

* Added the CDR table alembic creation script.  The CDR table is more of
an example for new setups since the actual table can be fully customized
in cdr_adaptive_odbc.conf.

(closes issue ASTERISK-23233)
Reported by: jmls

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@409885 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05 18:40:13 +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
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
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
Kevin Harwell
15342d6733 res_pjsip: Config option to enable PJSIP logger at load time.
Added a "debug" configuration option for res_pjsip that when set to "yes"
enables SIP messages to be logged.  It is specified under the "system" type.
Also added an alembic script to add the option to realtime.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@407036 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-31 23:14:19 +00:00
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
Kinsey Moore
6cd901ab8e PJSIP: Add Path header support
This adds Path support to chan_pjsip in res_pjsip_path.c with minimal
additions in res_pjsip_registrar.c to store the path and additions in
res_pjsip_outbound_registration.c to enable advertisement of path
support to registrars and intervening proxies.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-15 13:14:06 +00:00
Scott Griepentrog
3cd07b4989 realtime: Create extensions in alembic ast-db-manage contribution
When the alembic scripts were written for creating Asterisk
realtime databases the extensions table for dialplan wasn't
included.  This update creates the extensions table.

(closes issue ASTERISK-22815)
Reported by: Zone Conkle
Review: https://reviewboard.asterisk.org/r/3064/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403713 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-12 19:44:23 +00:00
Kevin Harwell
1222501fcf res_pjsip: convert configuration settings names to snake case some more
Updated the alembic script for pjsip.  Also, the dtls config parsing stuff was
expecting strings with no underscores, so removed the underscores from the
option name before passing it to the parser.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-22 22:24:43 +00:00
Jonathan Rose
66137de7e8 chan_pjsip: Add alembic scripts for generating db tables for PJSIP
Also updates sample configurations for sorcery and extconfig to
demonstrate how to use databases created by that alembic script.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@400532 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-04 17:10:27 +00:00
Matthew Jordan
60423755e5 Update Alembic database scripts for external scripting and PostgreSQL, Oracle
This patch does the following:
1) The env scripts have been updated to be tolerant of a NULL configuration
   file. This occurs when configuration is provided by an external script,
   such that the actual config.ini file is not used.
2) Enum types have all been given names. This is needed for PostgreSQL script
   generation.
3) The identifier meetme_confno_starttime_endtime is greater than 30
   characters, and hence invalid for Oracle databases. This has been truncated
   down to meetme_confno_start_end.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@400383 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-03 17:55:50 +00:00
Matthew Jordan
948934fb76 Actually *add* the database schema management utilities
In r397874, the scripts were removed... but not replaced. Thanks to
Michael Young for noticing this!


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@397911 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-29 12:27:54 +00:00