mirror of http://gerrit.asterisk.org/asterisk
Added a new configuration option for PJSIP endpoints - stir_shaken. If set to yes, then STIR/SHAKEN support will be added to inbound and outbound INVITEs. The default is no. Alembic has been updated to include this option. Previously the dialplan function was not trimming the whitespace from the parameters it recieved. Now it does. Also added a conditional that, when TEST_FRAMEWORK is enabled, the timestamp in the identity header will be overlooked. This is just for testing, since the testsuite will rely on a SIPp scenario with a preset identity header to trigger the MISMATCH result. Change-Id: I43d67f1489b8c1c5729ed3ca8d71e35ddf438df1changes/34/15034/2
parent
d979bdf87a
commit
21ab0a450b
@ -0,0 +1,31 @@
|
||||
"""add stir shaken
|
||||
|
||||
Revision ID: 61797b9fced6
|
||||
Revises: fbb7766f17bc
|
||||
Create Date: 2020-06-29 11:52:59.946929
|
||||
|
||||
"""
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '61797b9fced6'
|
||||
down_revision = 'e658c26033ca'
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects.postgresql import ENUM
|
||||
|
||||
YESNO_NAME = 'yesno_values'
|
||||
YESNO_VALUES = ['yes', 'no']
|
||||
|
||||
AST_BOOL_NAME = 'ast_bool_values'
|
||||
AST_BOOL_VALUES = [ '0', '1',
|
||||
'off', 'on',
|
||||
'false', 'true',
|
||||
'no', 'yes' ]
|
||||
|
||||
def upgrade():
|
||||
ast_bool_values = ENUM(*AST_BOOL_VALUES, name=AST_BOOL_NAME, create_type=False)
|
||||
op.add_column('ps_endpoints', sa.Column('stir_shaken', ast_bool_values))
|
||||
|
||||
def downgrade():
|
||||
op.drop_column('ps_endpoints', 'stir_shaken')
|
||||
@ -0,0 +1,20 @@
|
||||
Subject: STIR/SHAKEN
|
||||
|
||||
STIR/SHAKEN support has been added to Asterisk. Configuration is done in
|
||||
stir_shaken.conf. There is a sample configuration file to help you get
|
||||
started (asterisk/configs/samples/stir_shaken.conf.sample). Once that's
|
||||
set up, you can enable STIR/SHAKEN on any endpoint by setting stir_shaken
|
||||
to yes on the endpoint configuration object. This will add an Identity
|
||||
header on outgoing INVITEs, and check for an Identity header on incoming
|
||||
INVITEs. This option has been added to Alembic as well.
|
||||
|
||||
The information received on an incoming INVITE can be checked using the
|
||||
STIR_SHAKEN dialplan function. There are two variations:
|
||||
|
||||
STIR_SHAKEN(count)
|
||||
STIR_SHAKEN(0, verify_result)
|
||||
|
||||
The first variation will tell you how many STIR/SHAKEN results are on the
|
||||
channel. The second fetches information for a specific result. The first
|
||||
parameter is the index, followed by what information you want to retrieve.
|
||||
The available options are 'verify_result', 'identity', and 'attestation'.
|
||||
Loading…
Reference in new issue