Update from-twilio dialplan: ring ext 100 directly instead of Stasis (no ARI client yet)
This commit is contained in:
@@ -1,213 +1,220 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
name: asterisk-config
|
name: asterisk-config
|
||||||
namespace: telephony
|
namespace: telephony
|
||||||
data:
|
data:
|
||||||
modules.conf: |
|
modules.conf: |
|
||||||
[modules]
|
[modules]
|
||||||
autoload=yes
|
autoload=yes
|
||||||
noload=chan_sip.so
|
noload=chan_sip.so
|
||||||
noload=res_hep.so
|
noload=res_hep.so
|
||||||
noload=res_hep_pjsip.so
|
noload=res_hep_pjsip.so
|
||||||
noload=res_hep_rtcp.so
|
noload=res_hep_rtcp.so
|
||||||
|
|
||||||
http.conf: |
|
http.conf: |
|
||||||
[general]
|
[general]
|
||||||
enabled=yes
|
enabled=yes
|
||||||
bindaddr=0.0.0.0
|
bindaddr=0.0.0.0
|
||||||
bindport=8088
|
bindport=8088
|
||||||
|
|
||||||
ari.conf: |
|
ari.conf: |
|
||||||
[general]
|
[general]
|
||||||
enabled=yes
|
enabled=yes
|
||||||
pretty=yes
|
pretty=yes
|
||||||
allowed_origins=*
|
allowed_origins=*
|
||||||
|
|
||||||
[flowercore]
|
[flowercore]
|
||||||
type=user
|
type=user
|
||||||
read_only=no
|
read_only=no
|
||||||
password=bluejay-asterisk-ari
|
password=bluejay-asterisk-ari
|
||||||
password_format=plain
|
password_format=plain
|
||||||
|
|
||||||
manager.conf: |
|
manager.conf: |
|
||||||
[general]
|
[general]
|
||||||
enabled=no
|
enabled=no
|
||||||
|
|
||||||
pjsip.conf: |
|
pjsip.conf: |
|
||||||
; ===== Transports =====
|
; ===== Transports =====
|
||||||
[transport-udp]
|
[transport-udp]
|
||||||
type=transport
|
type=transport
|
||||||
protocol=udp
|
protocol=udp
|
||||||
bind=0.0.0.0:5060
|
bind=0.0.0.0:5060
|
||||||
|
|
||||||
; ===== Twilio SIP Trunk =====
|
; ===== Twilio SIP Trunk =====
|
||||||
[twilio-trunk]
|
[twilio-trunk]
|
||||||
type=endpoint
|
type=endpoint
|
||||||
context=from-twilio
|
context=from-twilio
|
||||||
transport=transport-udp
|
transport=transport-udp
|
||||||
disallow=all
|
disallow=all
|
||||||
allow=ulaw
|
allow=ulaw
|
||||||
allow=alaw
|
allow=alaw
|
||||||
allow=g722
|
allow=g722
|
||||||
aors=twilio-trunk
|
aors=twilio-trunk
|
||||||
from_domain=sip.twilio.com
|
from_domain=sip.twilio.com
|
||||||
direct_media=no
|
direct_media=no
|
||||||
ice_support=no
|
ice_support=no
|
||||||
rtp_symmetric=yes
|
rtp_symmetric=yes
|
||||||
force_rport=yes
|
force_rport=yes
|
||||||
rewrite_contact=yes
|
rewrite_contact=yes
|
||||||
trust_id_inbound=yes
|
trust_id_inbound=yes
|
||||||
|
|
||||||
[twilio-trunk]
|
[twilio-trunk]
|
||||||
type=aor
|
type=aor
|
||||||
contact=sip:bluejay.pstn.twilio.com
|
contact=sip:bluejay.pstn.twilio.com
|
||||||
|
|
||||||
[twilio-trunk]
|
[twilio-trunk]
|
||||||
type=identify
|
type=identify
|
||||||
endpoint=twilio-trunk
|
endpoint=twilio-trunk
|
||||||
; Twilio North America signaling IPs
|
; Twilio North America signaling IPs
|
||||||
match=54.172.60.0/30
|
match=54.172.60.0/30
|
||||||
match=54.172.60.4/30
|
match=54.172.60.4/30
|
||||||
match=54.244.51.0/30
|
match=54.244.51.0/30
|
||||||
match=54.244.51.4/30
|
match=54.244.51.4/30
|
||||||
match=34.203.250.0/23
|
match=34.203.250.0/23
|
||||||
match=54.171.127.192/26
|
match=54.171.127.192/26
|
||||||
match=35.156.191.128/25
|
match=35.156.191.128/25
|
||||||
match=54.65.63.192/26
|
match=54.65.63.192/26
|
||||||
match=54.169.127.128/26
|
match=54.169.127.128/26
|
||||||
match=54.252.254.64/26
|
match=54.252.254.64/26
|
||||||
match=177.71.206.192/26
|
match=177.71.206.192/26
|
||||||
|
|
||||||
; ===== Yealink Phone Template =====
|
; ===== Yealink Phone Template =====
|
||||||
[phone-template](!)
|
[phone-template](!)
|
||||||
type=endpoint
|
type=endpoint
|
||||||
context=from-internal
|
context=from-internal
|
||||||
transport=transport-udp
|
transport=transport-udp
|
||||||
disallow=all
|
disallow=all
|
||||||
allow=opus
|
allow=opus
|
||||||
allow=g722
|
allow=g722
|
||||||
allow=ulaw
|
allow=ulaw
|
||||||
allow=alaw
|
allow=alaw
|
||||||
direct_media=no
|
direct_media=no
|
||||||
dtmf_mode=rfc4733
|
dtmf_mode=rfc4733
|
||||||
rtp_symmetric=yes
|
rtp_symmetric=yes
|
||||||
force_rport=yes
|
force_rport=yes
|
||||||
rewrite_contact=yes
|
rewrite_contact=yes
|
||||||
|
|
||||||
; Extension 100 - Reception
|
; Extension 100 - Reception
|
||||||
[100](phone-template)
|
[100](phone-template)
|
||||||
auth=auth100
|
auth=auth100
|
||||||
aors=100
|
aors=100
|
||||||
callerid="Reception" <100>
|
callerid="Reception" <100>
|
||||||
|
|
||||||
[auth100]
|
[auth100]
|
||||||
type=auth
|
type=auth
|
||||||
auth_type=userpass
|
auth_type=userpass
|
||||||
username=100
|
username=100
|
||||||
password=bluejay-ext-100
|
password=bluejay-ext-100
|
||||||
|
|
||||||
[100]
|
[100]
|
||||||
type=aor
|
type=aor
|
||||||
max_contacts=1
|
max_contacts=1
|
||||||
remove_existing=yes
|
remove_existing=yes
|
||||||
qualify_frequency=60
|
qualify_frequency=60
|
||||||
|
|
||||||
; Extension 101 - Office 1
|
; Extension 101 - Office 1
|
||||||
[101](phone-template)
|
[101](phone-template)
|
||||||
auth=auth101
|
auth=auth101
|
||||||
aors=101
|
aors=101
|
||||||
callerid="Office 1" <101>
|
callerid="Office 1" <101>
|
||||||
|
|
||||||
[auth101]
|
[auth101]
|
||||||
type=auth
|
type=auth
|
||||||
auth_type=userpass
|
auth_type=userpass
|
||||||
username=101
|
username=101
|
||||||
password=bluejay-ext-101
|
password=bluejay-ext-101
|
||||||
|
|
||||||
[101]
|
[101]
|
||||||
type=aor
|
type=aor
|
||||||
max_contacts=1
|
max_contacts=1
|
||||||
remove_existing=yes
|
remove_existing=yes
|
||||||
qualify_frequency=60
|
qualify_frequency=60
|
||||||
|
|
||||||
; Extension 102 - Office 2
|
; Extension 102 - Office 2
|
||||||
[102](phone-template)
|
[102](phone-template)
|
||||||
auth=auth102
|
auth=auth102
|
||||||
aors=102
|
aors=102
|
||||||
callerid="Office 2" <102>
|
callerid="Office 2" <102>
|
||||||
|
|
||||||
[auth102]
|
[auth102]
|
||||||
type=auth
|
type=auth
|
||||||
auth_type=userpass
|
auth_type=userpass
|
||||||
username=102
|
username=102
|
||||||
password=bluejay-ext-102
|
password=bluejay-ext-102
|
||||||
|
|
||||||
[102]
|
[102]
|
||||||
type=aor
|
type=aor
|
||||||
max_contacts=1
|
max_contacts=1
|
||||||
remove_existing=yes
|
remove_existing=yes
|
||||||
qualify_frequency=60
|
qualify_frequency=60
|
||||||
|
|
||||||
; Extension 103 - Office 3
|
; Extension 103 - Office 3
|
||||||
[103](phone-template)
|
[103](phone-template)
|
||||||
auth=auth103
|
auth=auth103
|
||||||
aors=103
|
aors=103
|
||||||
callerid="Office 3" <103>
|
callerid="Office 3" <103>
|
||||||
|
|
||||||
[auth103]
|
[auth103]
|
||||||
type=auth
|
type=auth
|
||||||
auth_type=userpass
|
auth_type=userpass
|
||||||
username=103
|
username=103
|
||||||
password=bluejay-ext-103
|
password=bluejay-ext-103
|
||||||
|
|
||||||
[103]
|
[103]
|
||||||
type=aor
|
type=aor
|
||||||
max_contacts=1
|
max_contacts=1
|
||||||
remove_existing=yes
|
remove_existing=yes
|
||||||
qualify_frequency=60
|
qualify_frequency=60
|
||||||
|
|
||||||
extensions.conf: |
|
extensions.conf: |
|
||||||
[general]
|
[general]
|
||||||
static=yes
|
static=yes
|
||||||
writeprotect=no
|
writeprotect=no
|
||||||
|
|
||||||
[from-twilio]
|
[from-twilio]
|
||||||
; Inbound calls from Twilio SIP trunk → ARI Stasis app
|
; Inbound calls from Twilio SIP trunk
|
||||||
exten => _+X.,1,Answer()
|
; Ring reception (100) for 30s, then try all extensions in ring group
|
||||||
same => n,Stasis(flowercore-pbx,twilio,${EXTEN})
|
exten => _+X.,1,Answer()
|
||||||
same => n,Hangup()
|
same => n,Playback(silence/1)
|
||||||
|
same => n,Dial(PJSIP/100,30,t)
|
||||||
exten => _X.,1,Answer()
|
same => n,Dial(PJSIP/101&PJSIP/102&PJSIP/103,30,t)
|
||||||
same => n,Stasis(flowercore-pbx,twilio,${EXTEN})
|
same => n,Playback(vm-goodbye)
|
||||||
same => n,Hangup()
|
same => n,Hangup()
|
||||||
|
|
||||||
[from-internal]
|
exten => _X.,1,Answer()
|
||||||
; Internal extension-to-extension dialing
|
same => n,Playback(silence/1)
|
||||||
exten => _1XX,1,Dial(PJSIP/${EXTEN},30)
|
same => n,Dial(PJSIP/100,30,t)
|
||||||
same => n,Hangup()
|
same => n,Dial(PJSIP/101&PJSIP/102&PJSIP/103,30,t)
|
||||||
|
same => n,Playback(vm-goodbye)
|
||||||
; Outbound via Twilio SIP trunk (11-digit US)
|
same => n,Hangup()
|
||||||
exten => _1NXXNXXXXXX,1,Set(CALLERID(num)=+13202332529)
|
|
||||||
same => n,Dial(PJSIP/+${EXTEN}@twilio-trunk,60)
|
[from-internal]
|
||||||
same => n,Hangup()
|
; Internal extension-to-extension dialing
|
||||||
|
exten => _1XX,1,Dial(PJSIP/${EXTEN},30)
|
||||||
; Outbound via Twilio SIP trunk (+1 format)
|
same => n,Hangup()
|
||||||
exten => _+1NXXNXXXXXX,1,Set(CALLERID(num)=+13202332529)
|
|
||||||
same => n,Dial(PJSIP/${EXTEN}@twilio-trunk,60)
|
; Outbound via Twilio SIP trunk (11-digit US)
|
||||||
same => n,Hangup()
|
exten => _1NXXNXXXXXX,1,Set(CALLERID(num)=+13202332529)
|
||||||
|
same => n,Dial(PJSIP/+${EXTEN}@twilio-trunk,60)
|
||||||
; IVR access from internal phones
|
same => n,Hangup()
|
||||||
exten => *100,1,Stasis(flowercore-pbx,internal,ivr)
|
|
||||||
same => n,Hangup()
|
; Outbound via Twilio SIP trunk (+1 format)
|
||||||
|
exten => _+1NXXNXXXXXX,1,Set(CALLERID(num)=+13202332529)
|
||||||
[default]
|
same => n,Dial(PJSIP/${EXTEN}@twilio-trunk,60)
|
||||||
exten => _X.,1,NoOp(Unhandled call to ${EXTEN})
|
same => n,Hangup()
|
||||||
same => n,Hangup()
|
|
||||||
|
; IVR access from internal phones (when ARI is connected)
|
||||||
rtp.conf: |
|
exten => *100,1,Stasis(flowercore-pbx,internal,ivr)
|
||||||
[general]
|
same => n,Hangup()
|
||||||
rtpstart=10000
|
|
||||||
rtpend=20000
|
[default]
|
||||||
strictrtp=yes
|
exten => _X.,1,NoOp(Unhandled call to ${EXTEN})
|
||||||
icesupport=no
|
same => n,Hangup()
|
||||||
|
|
||||||
|
rtp.conf: |
|
||||||
|
[general]
|
||||||
|
rtpstart=10000
|
||||||
|
rtpend=20000
|
||||||
|
strictrtp=yes
|
||||||
|
icesupport=no
|
||||||
|
|||||||
Reference in New Issue
Block a user