first commit
This commit is contained in:
3
asterisk/templates/agi.conf
Normal file
3
asterisk/templates/agi.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
[general]
|
||||
enabled = yes
|
||||
agidir => /var/lib/asterisk/agi-bin
|
||||
41
asterisk/templates/extensions.conf.template
Normal file
41
asterisk/templates/extensions.conf.template
Normal file
@@ -0,0 +1,41 @@
|
||||
[general]
|
||||
static=yes
|
||||
writeprotect=no
|
||||
|
||||
|
||||
; ==========================================================
|
||||
; Incoming calls from SIP Trunk
|
||||
; ==========================================================
|
||||
|
||||
[from-trunk]
|
||||
|
||||
; Incoming call without DID
|
||||
exten => s,1,NoOp(Incoming call from trunk - CallerID: ${CALLERID(num)})
|
||||
same => n,Answer()
|
||||
same => n,Wait(1)
|
||||
same => n,AGI(voicebot.py)
|
||||
same => n,Hangup()
|
||||
|
||||
|
||||
; Incoming call with DID
|
||||
exten => _X.,1,NoOp(Incoming DID call: ${EXTEN} - CallerID: ${CALLERID(num)})
|
||||
same => n,Answer()
|
||||
same => n,Wait(1)
|
||||
same => n,AGI(voicebot.py)
|
||||
same => n,Hangup()
|
||||
|
||||
|
||||
|
||||
; ==========================================================
|
||||
; Internal test extension
|
||||
; Used with Zoiper / Linphone for testing
|
||||
; ==========================================================
|
||||
|
||||
[from-internal]
|
||||
|
||||
; Match any dialed extension
|
||||
exten => _X.,1,NoOp(Test call from internal extension ${EXTEN})
|
||||
same => n,Answer()
|
||||
same => n,Wait(1)
|
||||
same => n,AGI(voicebot.py)
|
||||
same => n,Hangup()
|
||||
5
asterisk/templates/modules.conf
Normal file
5
asterisk/templates/modules.conf
Normal file
@@ -0,0 +1,5 @@
|
||||
[modules]
|
||||
autoload=yes
|
||||
|
||||
; در صورتی که نمیخوای chan_sip قدیمی لود بشه (توصیه میشه فقط pjsip استفاده کنی)
|
||||
noload => chan_sip.so
|
||||
30
asterisk/templates/pjsip-base.conf.template
Normal file
30
asterisk/templates/pjsip-base.conf.template
Normal file
@@ -0,0 +1,30 @@
|
||||
[global]
|
||||
type=global
|
||||
user_agent=Pline-AI
|
||||
|
||||
[transport-udp]
|
||||
type=transport
|
||||
protocol=udp
|
||||
bind=0.0.0.0:5060
|
||||
|
||||
; ======================
|
||||
; Test Extension
|
||||
; ======================
|
||||
|
||||
[${TEST_USER_EXTEN}]
|
||||
type=endpoint
|
||||
context=from-internal
|
||||
disallow=all
|
||||
allow=ulaw,alaw
|
||||
auth=${TEST_USER_EXTEN}-auth
|
||||
aors=${TEST_USER_EXTEN}
|
||||
|
||||
[${TEST_USER_EXTEN}-auth]
|
||||
type=auth
|
||||
auth_type=userpass
|
||||
username=${TEST_USER_EXTEN}
|
||||
password=${TEST_USER_PASSWORD}
|
||||
|
||||
[${TEST_USER_EXTEN}]
|
||||
type=aor
|
||||
max_contacts=5
|
||||
34
asterisk/templates/pjsip-trunk.conf.template
Normal file
34
asterisk/templates/pjsip-trunk.conf.template
Normal file
@@ -0,0 +1,34 @@
|
||||
[${TRUNK_NAME}-reg]
|
||||
type=registration
|
||||
transport=transport-udp
|
||||
outbound_auth=${TRUNK_NAME}-auth
|
||||
server_uri=sip:${TRUNK_HOST}
|
||||
client_uri=sip:${TRUNK_USERNAME}@${TRUNK_HOST}
|
||||
retry_interval=60
|
||||
expiration=3600
|
||||
|
||||
[${TRUNK_NAME}-auth]
|
||||
type=auth
|
||||
auth_type=userpass
|
||||
username=${TRUNK_USERNAME}
|
||||
password=${TRUNK_PASSWORD}
|
||||
|
||||
[${TRUNK_NAME}]
|
||||
type=aor
|
||||
contact=sip:${TRUNK_HOST}
|
||||
qualify_frequency=60
|
||||
|
||||
[${TRUNK_NAME}]
|
||||
type=endpoint
|
||||
context=from-trunk
|
||||
transport=transport-udp
|
||||
disallow=all
|
||||
allow=ulaw,alaw
|
||||
outbound_auth=${TRUNK_NAME}-auth
|
||||
aors=${TRUNK_NAME}
|
||||
|
||||
; --- اضافه کردن این بخش ---
|
||||
[${TRUNK_NAME}-identify]
|
||||
type=identify
|
||||
endpoint=${TRUNK_NAME}
|
||||
match=${TRUNK_HOST}
|
||||
Reference in New Issue
Block a user