[general]
context=from-sip
bindport=5060
bindaddr=0.0.0.0
disallow=all
allow=ulaw
allow=alaw
allow=g729
; ===========================================
; ORIGINATOR (fixed IP)
; ===========================================
[originator]
type=friend
host=88.171.77.276
context=from-internal
insecure=port,invite
disallow=all
allow=ulaw
allow=alaw
qualify=yes
nat=no
permit=88.171.77.276/255.255.255.255
deny=0.0.0.0/0.0.0.0
; ===========================================
; GATEWAY (GoIP8) - Dynamic IP, registers to Asterisk
; ===========================================
[Goip-8]
type=friend
host=dynamic
context=from-sip
username=goipuser
secret=goippass
insecure=port,invite
disallow=all
allow=ulaw
allow=alaw
qualify=yes
nat=yes
[from-internal]
; ===========================================
; Incoming calls from ORIGINATOR with tech prefix 888
; ===========================================
exten => _8882567XXXXXXXX,1,NoOp(Call flow: fake_ringback + speech detect + prefix strip)
same => n,Answer()
; Strip 888 prefix
same => n,Set(DESTNUM=${EXTEN:3})
same => n,NoOp(Stripped number is ${DESTNUM})
; Step 1: Detect speech during fake_ringback playback
same => n,BackgroundDetect(fake_ringback,,100,,talk)
; Step 2: Detect speech during 10-second silent audio
same => n,BackgroundDetect(silence10s,,100,,talk)
; Step 3: If no speech detected after fake_ringback + silence, hang up
same => n,NoOp(No speech detected after fake_ringback + 10s)
same => n,Hangup(34)
; ===========================================
; Speech detected - forward to Goip-8 gateway
; ===========================================
exten => talk,1,NoOp(Speech detected! Forwarding to Goip-8 gateway)
same => n,Dial(SIP/${DESTNUM}@Goip-8,30,m(myringback))
same => n,Hangup()
== Using SIP RTP CoS mark 5
– Executing [888256701076492@from-internal:1] NoOp(“SIP/test-00000018”, “Ca ll flow: fake_ringback + speech detect + prefix strip - ANY 888 number”) in new stack
– Executing [888256701076492@from-internal:2] Answer(“SIP/test-00000018”, " ") in new stack
– Executing [888256701076492@from-internal:3] Set(“SIP/test-00000018”, “DES TNUM=256701076492”) in new stack
– Executing [888256701076492@from-internal:4] NoOp(“SIP/test-00000018”, “St ripped number is 256701076492”) in new stack
– Executing [888256701076492@from-internal:5] BackgroundDetect(“SIP/test-00 000018”, “fake_ringback,100,talk”) in new stack
– <SIP/test-00000018> Playing ‘fake_ringback.ulaw’ (language ‘en’)
– Executing [888256701076492@from-internal:6] BackgroundDetect(“SIP/test-00 000018”, “silence10s,100,talk”) in new stack
– <SIP/test-00000018> Playing ‘silence10s.ulaw’ (language ‘en’)
– Executing [talk@from-internal:1] NoOp(“SIP/test-00000018”, “Speech detect ed! Forwarding to Goip-8 gateway”) in new stack
– Executing [talk@from-internal:2] Dial(“SIP/test-00000018”, “SIP/256701076 492@Goip-8,30,m(myringback)”) in new stack
== Using SIP RTP CoS mark 5
– Called SIP/256701076492@Goip-8
– Started music on hold, class ‘myringback’, on channel ‘SIP/test-00000018’
== Everyone is busy/congested at this time (1:0/0/1)
– Stopped music on hold on SIP/test-00000018
– Executing [talk@from-internal:3] Hangup(“SIP/test-00000018”, “”) in new s tack
== Spawn extension (from-internal, talk, 3) exited non-zero on ‘SIP/test-00000 018’