Skip to content

Commit

Permalink
Merge pull request mitogen-hq#58 from spearlineltd/greece_server
Browse files Browse the repository at this point in the history
greece-lamda server config
  • Loading branch information
ra-patel committed Mar 9, 2021
2 parents 56a1061 + f907d80 commit b6cf6a3
Show file tree
Hide file tree
Showing 7 changed files with 121 additions and 1 deletion.
2 changes: 2 additions & 0 deletions group_vars/all/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,8 @@ allow_sip_trunk:
india-vodafone:
- 10.229.34.85/24
call-receiver-test: []
greece-lamda:
- 195.167.16.0/24

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 @@ -72,6 +72,7 @@ china-nuc ansible_host=china-nuc.spearline.com
germany-ec2-2 ansible_host=germany-ec2-2.spearline.com
india-vodafone ansible_host=india-vodafone.spearline.com
germany-ec2-3 ansible_host=germany-ec2-3.spearline.com
greece-lamda ansible_host=greece-lamda.spearline.com

[callserverstest]
ireland-test-callserver ansible_host=ireland-test-callserver.spearline.com
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[globals]
SERVER_ID=67
GOOGLE_OUTBOUND_NUMBER=61475859809
GOOGLE_OUTBOUND_NUMBER=61475859809,61411372154

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

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
[globals]
SERVER_ID=128
GOOGLE_OUTBOUND_NUMBER=898

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

[test-dialout]
exten => _X!,1,NoOp(Local Channel - Leg-A)
same => n,Wait(1)
same => n,Set(CALLERID(all)="302144069704" <302144069704>)
same => n,Dial(SIP/OTE/${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,ExecIf($[ $["${RECEIVED_DTMF:0:2}" == "*6"] | $["${RECEIVED_DTMF:0:2}" == "*7"]]?Goto(directOutbound,${EXTEN},1):NoOp())
same => n,ExecIf($[ $["${RECEIVED_DTMF:0:2}" == "*8"] | $["${RECEIVED_DTMF:0:2}" == "*9"]]?Goto(endtoendOutbound,${EXTEN},1):NoOp())
same => n,ExecIf($["${CALLERID(num):0:1}" == "+"]?Set(CLI=${CALLERID(num):1}):Set(CLI=${CALLERID(num)}))
same => n,Set(is_agent=${TT_IS_AGENT(${CLI:-7})});This condition is added for AutoDesk OutBound tests
same => n,ExecIf($[$[${ODBCROWS} > 0] & $[$["${is_agent}" == "1"] | $["${is_agent}" == "0"]]]?Goto(directOutbound,${EXTEN},1):NoOP())
same => n(poc),Answer()
same => n,Wait(1)
same => n,ExecIf($["${EXTEN:-7}" == "6675829"]?SendDTMF(1#):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.
31 changes: 31 additions & 0 deletions roles/callserver/files/host/greece-lamda/sip_general.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[general]
context=default
externip=185.104.145.11
localnet=198.19.177.34/24
localnet=10.52.1.80/32
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 = +302144069704:A08HCvoh:+302144069704@ims.otenet.gr@ims.otenet.gr:5060/+302144069704
16 changes: 16 additions & 0 deletions roles/callserver/files/host/greece-lamda/sip_provider.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[OTE]
type=peer
disallow=all
allow=ulaw,alaw,gsm
port=5060
host=ims.otenet.gr
nat=force_rport,comedia
dtmfmode=inband
context=default
insecure=port,invite
directmedia=no
qualify=yes
defaultuser=+302144069704
fromuser=+302144069704
secret=A08HCvoh
fromdomain=ims.otenet.gr

0 comments on commit b6cf6a3

Please sign in to comment.