first commit
This commit is contained in:
0
asterisk/config/.gitkeep
Normal file
0
asterisk/config/.gitkeep
Normal file
3
asterisk/config/agi.conf
Normal file
3
asterisk/config/agi.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
[general]
|
||||
enabled = yes
|
||||
agidir => /var/lib/asterisk/agi-bin
|
||||
41
asterisk/config/extensions.conf
Normal file
41
asterisk/config/extensions.conf
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/config/modules.conf
Normal file
5
asterisk/config/modules.conf
Normal file
@@ -0,0 +1,5 @@
|
||||
[modules]
|
||||
autoload=yes
|
||||
|
||||
; در صورتی که نمیخوای chan_sip قدیمی لود بشه (توصیه میشه فقط pjsip استفاده کنی)
|
||||
noload => chan_sip.so
|
||||
64
asterisk/config/pjsip.conf
Normal file
64
asterisk/config/pjsip.conf
Normal file
@@ -0,0 +1,64 @@
|
||||
[global]
|
||||
type=global
|
||||
user_agent=Pline-AI
|
||||
|
||||
[transport-udp]
|
||||
type=transport
|
||||
protocol=udp
|
||||
bind=0.0.0.0:5060
|
||||
|
||||
; ======================
|
||||
; Test Extension
|
||||
; ======================
|
||||
|
||||
[1000]
|
||||
type=endpoint
|
||||
context=from-internal
|
||||
disallow=all
|
||||
allow=ulaw,alaw
|
||||
auth=1000-auth
|
||||
aors=1000
|
||||
|
||||
[1000-auth]
|
||||
type=auth
|
||||
auth_type=userpass
|
||||
username=1000
|
||||
password=1000
|
||||
|
||||
[1000]
|
||||
type=aor
|
||||
max_contacts=5
|
||||
[121-reg]
|
||||
type=registration
|
||||
transport=transport-udp
|
||||
outbound_auth=121-auth
|
||||
server_uri=sip:192.168.102.253
|
||||
client_uri=sip:121@192.168.102.253
|
||||
retry_interval=60
|
||||
expiration=3600
|
||||
|
||||
[121-auth]
|
||||
type=auth
|
||||
auth_type=userpass
|
||||
username=121
|
||||
password=121
|
||||
|
||||
[121]
|
||||
type=aor
|
||||
contact=sip:192.168.102.253
|
||||
qualify_frequency=60
|
||||
|
||||
[121]
|
||||
type=endpoint
|
||||
context=from-trunk
|
||||
transport=transport-udp
|
||||
disallow=all
|
||||
allow=ulaw,alaw
|
||||
outbound_auth=121-auth
|
||||
aors=121
|
||||
|
||||
; --- اضافه کردن این بخش ---
|
||||
[121-identify]
|
||||
type=identify
|
||||
endpoint=121
|
||||
match=192.168.102.253
|
||||
Reference in New Issue
Block a user