Skip to content

Commit

Permalink
Merge pull request mitogen-hq#342 from spearlineltd/11237-ecudor-gsm
Browse files Browse the repository at this point in the history
11237 - Ecuador (Quito) Mobile - Hosted by Azurreo
  • Loading branch information
ra-patel authored May 18, 2022
2 parents b2858c9 + 8bd5140 commit 4da8cd6
Show file tree
Hide file tree
Showing 6 changed files with 148 additions and 0 deletions.
2 changes: 2 additions & 0 deletions group_vars/all/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,8 @@ allow_sip_trunk:
- 217.26.165.169/24
- 185.163.45.26/24
- 178.17.171.252/32
ecu-qui2-m1-azurreo:
- 192.168.5.150/32

callserver_cert:
public_cert: |
Expand Down
1 change: 1 addition & 0 deletions hosts.ini
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ qat-doh1-m1-azurreo ansible_host=qat-doh1-m1-azurreo.spearline.dev
mex-pue1-p1-hsn ansible_host=mex-pue1-p1-hsn.spearline.dev
bel-bru2-s1-proximus ansible_host=bel-bru2-s1-proximus.spearline.dev
deu-ham1-m1-azurreo ansible_host=deu-ham1-m1-azurreo.spearline.dev
ecu-qui2-m1-azurreo ansible_host=ecu-qui2-m1-azurreo.spearline.dev

[callservers_first]
vnm-han1-p1-vdata ansible_host=vnm-han1-p1-vdata.spearline.dev dahdi=true
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
[globals]
SERVER_ID=180
GOOGLE_OUTBOUND_NUMBER=

;-- This section is for testing provider calls locally through server --;

[test-dialout1]
exten => _X!,1,NoOp(Local Channel - Leg-A)
same => n,Wait(1)
same => n,Set(CALLERID(all)="99475106" <99475106>)
same => n,Dial(SIP/2001/${EXTEN})

[test-dialout2]
exten => _X!,1,NoOp(Local Channel - Leg-A)
same => n,Wait(1)
same => n,Set(CALLERID(all)="983301873" <983301873>)
same => n,Dial(SIP/2002/${EXTEN})

[recordc]
exten => s,1,NoOP(SIP/ISDN Channel - Leg-B)
same => n,Answer()
same => n,MixMonitor(/tmp/${UNIQUEID}.wav)
same => n,Wait(60)

;-- Provider test section end --;

;-- Enable this section if your firewall is wide open and accepting any connection from anywhere on port 5060 --;

;[block_calls]
;exten => _X.,1,NoOp(Going to Block Calls because length is too long)
;same => n,Log(NOTICE,"Rejecting unknown SIP connection from ${CHANNEL(recvip)}")
;same => n,Congestion()

[default]
exten => _[+*#0-9].,1,NoOp(Incoming call received on DID::${EXTEN}, CLI::${CALLERID(num)}, IP::${CHANNEL(recvip)})
;Enable below line if your firewall is wide open and accepting any connection from anywhere on port 5060
;same => n,GotoIF($["${LEN(${EXTEN})}" >= "12"]?block_calls,${EXTEN},1:)
same => n,ExecIf($["${REGEX("${EXTEN}" ${GOOGLE_OUTBOUND_NUMBER})}"=="1"]?Gosub(from-outbound,${EXTEN},1):NoOp(Not a Google Call))
same => n,MSet(TT34_UPDATE_CLI(${EXTEN},${CALLERID(num)})=,DID=${EXTEN})
same => n(insert),Set(GEN_ADD_INCOMING_CALL_DETAILS()=${SERVER_ID},${EXTEN},${CALLERID(num)},${CHANNEL})
same => n,Read(RECEIVED_DTMF,silence/3,2,,,3)
same => n,ExecIf($["${RECEIVED_DTMF:0:1}" == "A"]?Gosub(testType63UpdateCLIInfo,s,1):)
same => n,ExecIf($["${RECEIVED_DTMF:0:1}" == "B"]?Echo():NoOp())
same => n,GotoIf($["${RECEIVED_DTMF:0:1}" == "C"]?polqa_prompt,s,1:)
same => n,ExecIf($["${RECEIVED_DTMF:0:1}" == "D"]?Gosub(testType34UpdateCLIInfo,s,1):)
same => n,ExecIf($[ $["${RECEIVED_DTMF:0:2}" == "*5"] | $["${RECEIVED_DTMF:0:1}" == "5"] | $["${DB_EXISTS(gvoiceoutbound/Data)}" == "1"]]?Gosub(google_voice_flow,s,1):NoOp())
same => n,Gosub(checkAutodeskCall,${EXTEN},1)
same => n(poc),Answer()
same => n,Wait(1)
same => n,SendDTMF(1)
same => n,Wait(1)
same => n,SendDTMF(2)
same => n,Wait(1)
same => n,SendDTMF(3)
same => n,Wait(1)
same => n,SendDTMF(9)
same => n,Wait(1)
same => n,SendDTMF(#)
same => n,Wait(1)
same => n,Wait(5)
same => n,Playback(ref_poc)
same => n,Wait(5)
same => n,HangUp()

[polqa_prompt]
exten => s,1,Answer()
same => n,NoOp(---------------Polqa TEST)
same => n,Wait(5)
same => n,Playback(ref_polqa_speakeasy)
same => n,Wait(5)
same => n,HangUp()
Empty file.
34 changes: 34 additions & 0 deletions roles/callserver/files/host/ecu-qui2-m1-azurreo/sip_general.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[general]
context=default
localnet=192.168.5.10/24
localnet=10.52.1.163/24
localnet=192.168.100.5/24
externrefresh=10
directmedia=no
nat=force_rport,comedia
disallow=all
allow=ulaw,alaw,gsm
useragent=Spearline Labs
alwaysauthreject = yes
use_q850_reason = yes
sdpsession=Spearline Labs
allowoverlap=no
allowguest=no
dtmfmode=auto
transport=udp,tcp,tls
udpbindaddr=0.0.0.0:5060
tcpenable=yes
tcpbindaddr=0.0.0.0:5060
tlsenable=yes
tlsbindaddr=0.0.0.0:5061
tlscertfile=/external_conf/tls/server.pem
tlsprivatekey=/external_conf/tls/server.key
tlscipher=ALL
tlsclientmethod=sslv23
tlsdisablev1=yes
tlsdontverifyserver=yes

register=2001:[email protected]
register=2002:[email protected]
register=2003:[email protected]
register=2004:[email protected]
40 changes: 40 additions & 0 deletions roles/callserver/files/host/ecu-qui2-m1-azurreo/sip_provider.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[trunk](!)
type=peer
disallow=all
allow=alaw,ulaw,gsm
;dtmfmode=inband
dtmfmode=rfc2833
context=from-pstn
qualify=yes
host=192.168.5.150
fromdomain=192.168.5.150

[2000]
secret=Spearline2016
defaultuser=2000
host=192.168.5.150
;host=dynamic
port=5060
fromuser=2000
type=peer
allow=alaw,ulaw,gsm
context=default
authuser=2000


[2001](trunk)
secret=Spearline2016
defaultuser=2001
fromuser=2001
[2002](trunk)
secret=Spearline2016
defaultuser=2002
fromuser=2002
[2003](trunk)
secret=Spearline2016
defaultuser=2003
fromuser=2003
[2004](trunk)
secret=Spearline2016
defaultuser=2004
fromuser=2004

0 comments on commit 4da8cd6

Please sign in to comment.