Added PJSIP support for Asterisk 16

git-svn-id: svn://192.168.202.10@3505 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2021-08-27 14:36:09 +00:00
parent a5c6987149
commit 233b9a5847
15 changed files with 844 additions and 52 deletions
+45
View File
@@ -0,0 +1,45 @@
[global]
type = global
contact_expiration_check_interval = 30
debug = no
default_from_user = Asterisk
default_outbound_endpoint = default_outbound_endpoint
default_realm = Asterisk
default_voicemail_extension = 8500
disable_multi_domain = false
endpoint_identifier_order = ip,username,anonymous
ignore_uri_user_options = false
keep_alive_interval = 90
max_forwards = 70
max_initial_qualify_time = 0
mwi_disable_initial_unsolicited = false
mwi_tps_queue_high = 500
mwi_tps_queue_low = -1
norefersub = yes
;regcontext = myregs
send_contact_status_on_update_registration = yes
taskprocessor_overload_trigger = global
unidentified_request_count = 5
unidentified_request_period = 5
unidentified_request_prune_interval = 30
use_callerid_contact = no
user_agent = Asterisk
[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0:5060
external_media_address = 190.124.44.160
external_signaling_address = 190.124.44.160
local_net = 192.168.0.0/255.255.0.0
local_net = 10.0.0.0/255.0.0.0
local_net = 172.16.0.0/12
local_net = 169.254.0.0/255.255.0.0
tos = cs3
[transport-wss]
type = transport
protocol = wss
bind = 0.0.0.0
#include "pjsip-vicidial.conf"
@@ -0,0 +1,165 @@
; PJSIP Wizard Configuration Samples and Quick Reference
;
; This file has several very basic configuration examples, to serve as a quick
; reference to jog your memory when you need to write up a new configuration.
; It is not intended to teach PJSIP configuration or serve as an exhaustive
; reference of options and potential scenarios.
;
; This file has two main sections.
; First, manually written examples to serve as a handy reference.
; Second, a list of all possible PJSIP config options by section. This is
; pulled from the XML config help. It only shows the synopsis for every item.
; If you want to see more detail please check the documentation sources
; mentioned at the top of this file.
; ============================================================================
; NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE
;
; This file does not maintain the complete option documentation.
; ============================================================================
; Documentation
;
; The official documentation is at http://wiki.asterisk.org
; You can read the XML configuration help via Asterisk command line with
; "config show help res_pjsip_config_wizard", then you can drill down through
; the various sections and their options.
;
;============EXAMPLE WIZARD CONFIGURATION FOR A PHONE=======================
; This config would create an endpoint, aor with dynamic contact, inbound
; auth, a phoneprov object and a dialplan hint for extension 1000.
;[myphone]
;type = wizard
;accepts_auth = yes
;accepts_registrations = yes
;has_phoneprov = yes
;transport = ipv4
;has_hint = yes
;hint_exten = 1000
;inbound_auth/username = testname
;inbound_auth/password = test password
;endpoint/allow = ulaw
;endpoint/context = default
;phoneprov/MAC = 001122aa4455
;phoneprov/PROFILE = profile1
;============EXAMPLE WIZARD CONFIGURATION FOR AN ITSP TRUNK=================
; This ITSP has 2 servers available and requires registration.
; This config would create an endpoint, an aor with 2 static contacts, an
; outbound auth, an identify with 2 matches, and 2 registrations.
;[mytrunk]
;type = wizard
;sends_auth = yes
;sends_registrations = yes
;transport = ipv4
;remote_hosts = sip1.myitsp.com:5060,sip2.myitsp.com:5060
;outbound_auth/username = testname
;outbound_auth/password = test password
;endpoint/allow = ulaw
;endpoint/context = default
;========================WIZARD SECTION OPTIONS===============================
;[wizard]
; SYNOPSIS: Provides configuration wizard for common scenarios.
;sends_auth= ; Will create an outbound auth object for the endpoint and
; registration.
; If yes, outbound/username must be specified.
; (default = "no")
;accepts_auth= ; Will create an inbound auth object for the endpoint.
; If yes, inbound/username must be specified.
; (default = "no")
;sends_registrations= ; Will create an outbound registration object and an
; identify match for each host in remote_hosts (which
; must be specified).
; sends_auth must also be specified.
; (default: "no")
;sends_line_with_registrations= ; Setting this to true will cause the wizard to
; skip the creation of an identify object to match
; incoming requests to the endpoint and instead add the
; line and endpoint parameters to the outbound
; registration object.
; (default: "no")
;accepts_registrations= ; Will create an aor with dynamic contacts which will
; accept registrations.
; accepts_auth must also be specified.
; (default: "no")
;remote_hosts= ; A comma separated list of remote hosts in the form of
; <ipaddress | hostname>[:port] [,<ipaddress | hostname>[:port] ] ...
; If specified, a static contact for each host will be created
; in the aor. If accepts_registrations is no, an identify
; object is also created with a match line for each remote host.
; If an aor/contact or match/identify is explicitly supplied,
; remote_hosts will not be used to automatically create contacts
; or matches respectively.
; (default: "")
;outbound_proxy= ; Setting this is a shortcut for setting
; endpoint/outbound_proxy
; aor/outbound_proxy
; registration/outbound_proxy
;transport= ; The transport to use for the endpoint and registrations
; (default: the pjsip default)
;server_uri_pattern= ; The pattern used to construct the registration
; server_uri. The replaceable parameter ${REMOTE_HOST} isa
; available for use.
; (default: "sip:${REMOTE_HOST}")
;client_uri_pattern= ; The pattern used to construct the registration client_uri.
; The replaceable parameters ${REMOTE_HOST} and ${USERNAME}
; are available for use.
; (default: "sip:${USERNAME}@${REMOTE_HOST}")
;contact_pattern= ; The pattern used to construct the aor contact.
; The replaceable parameter ${REMOTE_HOST} is available
; for use.
; (default: "sip:${REMOTE_HOST}")
;has_phoneprov= ; Will create a phoneprov object.
; If yes, phoneprov/MAC must be specified.
; (default: "no")
;has_hint= ; Create hint and optionally a default application.
; (default: "no")
;hint_context ; Any hints created for this wizard will be placed in this
; context.
; (default: endpoint/context)
;hint_exten ; If specified, a PJSIP/<wizard_id> hint will be created
; for this extension in 'hint_context'.
; context.
; (default: none)
;hint_application ; If specified, an extension will be placed in 'hint_context'
; at priority 1 that calls this application. Could be any
; valid dialplan expression like
; "Gosub(stdexten,${EXTEN},1(${HINT}))"
; (default: "Dial(${HINT})")
;endpoint/<param> ; Any parameters to be passed directly to and validated
;aor/<param> ; by their respective objects.
;inbound_auth/<param>
;outbound_auth/<param>
;identify/<param>
;registration/<param>
;phoneprov/<param>
;type= ; Must be of type wizard (default: "")
#include "pjsip_wizard-vicidial.conf"
+104
View File
@@ -0,0 +1,104 @@
[general]
context=trunkinbound ; Default context for incoming calls
allowguest=no ; Allow or reject guest calls (default is yes)
allowoverlap=no ; Disable overlap dialing support. (Default is yes)
;allowtransfer=no ; Disable all transfers (unless enabled in peers or users)
;realm=mydomain.tld ; Realm for digest authentication
bindport=5060 ; UDP Port to bind to (SIP standard port is 5060)
bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all)
srvlookup=yes ; Enable DNS SRV lookups on outbound calls
;domain=mydomain.tld ; Set default domain for this host
;pedantic=yes ; Enable checking of tags in headers,
;tos_sip=cs3 ; Sets TOS for SIP packets.
;tos_audio=ef ; Sets TOS for RTP audio packets.
;tos_video=af41 ; Sets TOS for RTP video packets.
;maxexpiry=3600 ; Maximum allowed time of incoming registrations
;minexpiry=60 ; Minimum length of registrations/subscriptions (default 60)
;defaultexpiry=120 ; Default length of incoming/outgoing registration
;t1min=100 ; Minimum roundtrip time for messages to monitored hosts
;notifymimetype=text/plain ; Allow overriding of mime type in MWI NOTIFY
;checkmwi=10 ; Default time between mailbox checks for peers
;buggymwi=no ; Cisco SIP firmware doesn't support the MWI RFC
;vmexten=voicemail ; dialplan extension to reach mailbox sets the
disallow=all ; First disallow all codecs
allow=ulaw ; Allow codecs in order of preference
allow=gsm
mohinterpret=default
mohsuggest=default
language=en ; Default language setting for all users/peers
relaxdtmf=yes ; Relax dtmf handling
trustrpid = no ; If Remote-Party-ID should be trusted
sendrpid = yes ; If Remote-Party-ID should be sent
progressinband=no ; If we should generate in-band ringing always
;useragent=Asterisk PBX ; Allows you to change the user agent string
;promiscredir = no ; If yes, allows 302 or REDIR to non-local SIP address
;usereqphone = no ; If yes, ";user=phone" is added to uri that contains
dtmfmode = rfc2833 ; Set default dtmfmode for sending DTMF. Default: rfc2833
;compactheaders = yes ; send compact sip headers.
videosupport=no ; Turn on support for SIP video. You need to turn this on
;maxcallbitrate=384 ; Maximum bitrate for video calls (default 384 kb/s)
callevents=yes ; generate manager events when sip ua
;alwaysauthreject = yes ; When an incoming INVITE or REGISTER is to be rejected,
;g726nonstandard = yes ; If the peer negotiates G726-32 audio, use AAL2 packing
;matchexterniplocally = yes ; Only substitute the externip or externhost setting if it matches
;regcontext=sipregistrations
rtptimeout=60 ; Terminate call if 60 seconds of no RTP or RTCP activity
;rtpholdtimeout=300 ; Terminate call if 300 seconds of no RTP or RTCP activity
;rtpkeepalive=<secs> ; Send keepalives in the RTP stream to keep NAT open
;sipdebug = yes ; Turn on SIP debugging by default, from
;recordhistory=yes ; Record SIP history by default
;dumphistory=yes ; Dump SIP history at end of SIP dialogue
;allowsubscribe=no ; Disable support for subscriptions. (Default is yes)
;subscribecontext = default ; Set a specific context for SUBSCRIBE requests
notifyringing = yes ; Notify subscriptions on RINGING state (default: no)
notifyhold = yes ; Notify subscriptions on HOLD state (default: no)
limitonpeers = yes ; Apply call limits on peers only. This will improve
;t38pt_udptl = yes ; Default false
;register => 1234:password@mysipprovider.com
;registertimeout=20 ; retry registration calls every 20 seconds (default)
;registerattempts=10 ; Number of registration attempts before we give up
;externip = 192.168.1.1 ; Address that we're going to put in outbound SIP
;externhost=test.test.com ; Alternatively you can specify a domain
;externrefresh=10 ; How often to refresh externhost if
localnet=192.168.0.0/255.255.0.0; All RFC 1918 addresses are local networks
localnet=10.0.0.0/255.0.0.0 ; Also RFC1918
localnet=172.16.0.0/12 ; Another RFC1918 with CIDR notation
localnet=169.254.0.0/255.255.0.0 ;Zero conf local network
nat=force_rport,comedia ; Global NAT settings (Affects all peers and users)
canreinvite=no ; Asterisk by default tries to redirect the
;directrtpsetup=yes ; Enable the new experimental direct RTP setup. This sets up
;rtcachefriends=yes ; Cache realtime friends by adding them to the internal list
;rtsavesysname=yes ; Save systemname in realtime database at registration
;rtupdate=yes ; Send registry updates to database using realtime? (yes|no)
;rtautoclear=yes ; Auto-Expire friends created on the fly on the same schedule
;ignoreregexpire=yes ; Enabling this setting has two functions:
;domain=mydomain.tld,mydomain-incoming
;domain=1.2.3.4 ; Add IP address as local domain
;allowexternaldomains=no ; Disable INVITE and REFER to non-local domains
;autodomain=yes ; Turn this on to have Asterisk add local host
;fromdomain=mydomain.tld ; When making outbound SIP INVITEs to
jbenable = yes ; Enables the use of a jitterbuffer on the receiving side of a
jbforce = no ; Forces the use of a jitterbuffer on the receive side of a SIP
jbmaxsize = 100 ; Max length of the jitterbuffer in milliseconds.
jbresyncthreshold = 1000 ; Jump in the frame timestamps over which the jitterbuffer is
jbimpl = fixed ; Jitterbuffer implementation, used on the receiving side of a SIP
jblog = no ; Enables jitterbuffer frame logging. Defaults to "no".
qualify=yes ; By default, qualify all peers at 2000ms
limitonpeer = yes ; enable call limit on a per peer basis, different from limitonpeers
#include sip-vicidial.conf
; register SIP account on remote machine if using SIP trunks
; register => testSIPtrunk:test@10.10.10.16:5060
;
; setup account for SIP trunking:
; [SIPtrunk]
; disallow=all
; allow=ulaw
; allow=alaw
; type=friend
; username=testSIPtrunk
; secret=test
; host=10.10.10.16
; dtmfmode=inband
; qualify=1000