Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;; SERVER1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- mcedit /etc/asterisk/pjsip.conf
- [system]
- [global]
- ttype = global
- disable_multi_domain = yes
- debug = yes
- taskprocessor_overload_trigger = global
- unidentified_request_count=5
- unidentified_request_period=5
- unidentified_request_prune_interval=30
- endpoint_identifier_order=username,ip,anonymous
- canreinvite=yes
- insecure=port,invite
- [transport-udp-nat]
- type=transport
- protocol=udp
- bind=0.0.0.0
- local_net=10.20.7.0/24
- local_net=192.168.20.0/24
- symmetric_transport=yes
- tos=cs3
- cos=3
- ;external_media_address=109.194.133.44
- ;external_signaling_address=109.194.133.44
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- [acl]
- type=acl
- deny=0.0.0.0/0.0.0.0
- permit=10.0.0.0/8
- permit=91.245.210.0/24
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- это транк без регистрации с другой стороны поменять ip на этот сервер
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- [ha-206]
- type=aor
- max_contacts=3
- qualify_frequency=60
- qualify_timeout=5.0
- authenticate_qualify=60
- contact=sip:10.1.1.149
- [ha-206]
- type=endpoint
- transport=transport-udp-nat
- context=from-internal
- disallow=all
- allow=alaw
- aors=ha-206
- direct_media=yes
- [ha-206]
- type=identify
- endpoint=ha-206
- match=10.1.1.149
- ;;;;;;;;;;;;ШАБЛОН;;;;;;;;;;;;;;;;;;;;;
- [endpoint-template](!)
- type = endpoint
- transport = transport-udp-nat
- context = from-internal
- dtmf_mode = rfc4733
- disallow = all
- allow = ulaw
- allow = alaw
- [auth-template-userpass](!)
- type = auth
- auth_type = userpass;
- [aor-template-single-reg](!)
- type = aor
- max_contacts = 1
- ;;;;;;;;;;;users;;;;;;;;;;;;;;;;;;;;;
- ;;;;;;;;;;;100;;;;;;;;;;;;;;;;;
- [100](endpoint-template)
- auth = auth100
- aors = 100
- callerid = 100;
- [auth100](auth-template-userpass)
- username = 100
- password = svHGuill
- [100](aor-template-single-reg)
- ;;;;;;;;;;;101;;;;;;;;;;;;;;;;;
- [101](endpoint-template)
- auth = auth101
- aors = 101
- callerid = 101;
- [auth101](auth-template-userpass)
- username = 101
- password = svHGuill
- [101](aor-template-single-reg)
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- mcedit /etc/asterisk/extensions.conf
- [general]
- static=yes
- writeprotect=no
- clearglobalvars=no
- [globals]
- CONSOLE=Console/dsp ; Console interface for demo
- TRUNK=DAHDI/G2 ; Trunk interface
- TRUNKMSD=1 ; MSD digits to strip (usually 1 or 0)
- [from-internal]
- ;Звоним на соседний сервер через транк
- exten => _2XX,1,Dial(PJSIP/${EXTEN}@ha-206)
- exten => _1XX,1,Dial(PJSIP/${EXTEN})
- exten => _XXXXX,n,Hangup()
- exten => 777,1,Answer
- same => n,BackGround(2)
- same => n,Hangup
- [from-sip]
- include => local-peers
- ;exten => _XXX,1,Set(CALLERID(num)=8${CALLERID(num):1})
- exten => _XXX,1,NoOp(zashli v contekst inkoming)
- same => n,Goto(local-peers,${EXTEN},1)
- [vremenno]
- exten => _915,1,Answer
- same => n,Wait(2)
- same => n,Set(temp_exten=${EXTEN})
- ; same => n,MixMonitor(/home/load/n_.${UNIQUEID}.wav,b)
- same => n,GotoIfTime(08:00-20:00,*,*,*?:time_out)
- same => n(start),Playback(hello-world)
- same => n,BackGround(2)
- same => n,WaitExten(5)
- same => n(time_out),Goto(notwork,915,1)
- same => n,Hangup
- exten => _[1-5],1,Set(CDR(description)=${CDR(description)},IVR:${EXTEN})
- ;exten => #,1,Set(CDR(description)=${CDR(description)},IVR:${EXTEN})
- exten => 1,1,GotoIfTime(*,*,1-9,jan?after13:)
- same => n,BackGround(tokb/1)
- same => n,WaitExten(5)
- same => n,Hangup
- exten => 2,1,NoOp(222222222222222)
- same => n,BackGround(tokb/1)
- same => n,WaitExten(5)
- same => n,Hangup
- exten => 3,1,NoOp(3333333333333333)
- same => n,BackGround(tokb/2)
- same => n,WaitExten(5)
- same => n,Hangup
- exten => 4,1,NoOp(4444444444444)
- same => n,BackGround(tokb/3)
- same => n,WaitExten(5)
- same => n,Hangup
- exten => 5,1,Goto(from-sip,915,go)
- exten => #,2,Goto(from-sip,915,start)
- exten => i,1,Goto(from-sip,915,start)
- [local-peers]
- ;include => invalidnumber
- exten => _X.,1,Set(fromexten=${EXTEN})
- exten => _X.,2,Set(CDR(userfield)=${CDR(userfield)}.fre=${fromexten})
- exten => _9[2-9]X,5,Busy
- exten => 915,3,NoOp(-------local peers---------)
- same => n,Goto(vremenno,915,1)
- same => n,Hangup
- [notwork]
- exten => 915,1,NoOp(-----NOTWORK-----)
- same => n,Answer
- same => n,BackGround(7)
- same => n,WaitExten(5)
- same => n,Hangup
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement