Compare commits

..

18 Commits

Author SHA1 Message Date
Your Name
4ee35e3c8d Ignore swap files 2021-12-25 23:50:55 +00:00
Your Name
4c58712074 Add scripts to show current bid 2021-12-25 23:50:30 +00:00
Your Name
90fa2664a0 Add clear-queue-members script 2021-12-25 23:38:38 +00:00
Your Name
157a663989 Fix background dialing in initial menu 2021-12-25 23:38:07 +00:00
Your Name
c3575f99ec Add gott queue 2021-12-25 23:35:11 +00:00
Your Name
971deee1bc Re-add music on hold class gott 2021-12-25 22:58:10 +00:00
Your Name
b30b1653f3 Bind asterisk http to vpn IP only
We don't want to service this to the Interwebz
2021-12-25 22:57:29 +00:00
Your Name
eed5ddea96 Configure longer timeout for queue 2021-01-02 19:40:16 +01:00
Your Name
666d7c675a Add sample for hidden ata extension 2021-01-02 19:40:06 +01:00
Your Name
e984918b99 Use gsm because of questionable uplink 2020-12-30 22:44:46 +01:00
Your Name
38d3c83fd9 Use random id for app 2020-12-30 21:38:56 +01:00
Your Name
ed269fbca8 Add ata hidden extension 2020-12-30 19:21:21 +01:00
Your Name
2f8d8b55cb Only allow queueing while auction is open. Remove auction queue member after first call 2020-12-29 22:19:19 +01:00
Your Name
b56c072e40 Add 95 to remove bidding queue mebers 2020-12-28 22:47:56 +01:00
Your Name
6a69deb35e Announce euro too 2020-12-28 22:45:07 +01:00
Your Name
34ea2f4c3a Turn off directmedia and directrtpsetup 2020-12-27 19:29:11 +01:00
Your Name
ea59f3d64b Use shorter announcement to bidding queue members 2020-12-27 14:46:17 +01:00
Your Name
823e3dd56d Configure IAX trunk to stubnitz 2020-12-27 03:53:15 +01:00
16 changed files with 107 additions and 159 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*.swp

View File

@@ -273,7 +273,7 @@ state.SB {
control.16 {
iface MIXER
name 'Master Playback Volume'
value 64
value 57
comment {
access 'read write'
type INTEGER
@@ -281,7 +281,7 @@ state.SB {
range '0 - 64'
dbmin -6400
dbmax 0
dbvalue.0 0
dbvalue.0 -700
}
}
control.17 {

3
clear-queue-members.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/sh
asterisk -x 'queue show auction' | grep wait: | awk '{ print $2; }' | xargs -I ID asterisk -x 'channel request hangup ID'

View File

@@ -732,15 +732,20 @@ exten => _X.,n,Return()
[from-eventphone]
exten => s,1,Answer()
same => n,Wait(1)
same => n,Playback(/etc/asterisk/media/playback/e_1_herzlich_willkommen_beim_teleshopping)
same => n,GotoIf($[ "${DB(stream/open)}" != "1" ]?stream-closed,1)
same => n,Background(/etc/asterisk/media/playback/e_1_herzlich_willkommen_beim_teleshopping,m)
same => n(start),Background(/etc/asterisk/media/playback/e_3_dr_cken_Sie,m)
same => n,WaitExten(4)
same => n,Goto(start)
exten => 1,1,Goto(record-bid,1,1)
exten => 2,1,Goto(take-question,s,1)
exten => 7,1,Wait(0.5)
same => n,Queue(gott,t)
same => n,Hangup()
exten => stream-closed,1,Wait(0.8)
same => n,Playback(/etc/asterisk/media/playback/e_1_herzlich_willkommen_beim_teleshopping)
same => n,Playback(/etc/asterisk/media/playback/e_2_bei_uns_ist_leider_gerade_nichts_los)
same => n,MusicOnHold(shop,10)
same => n,Goto(1)
@@ -762,14 +767,15 @@ same => n,GotoIf($[ "${input}" != "1" ]?start)
same => n,Set(FILE(/tmp/money.txt,,,al,u)=${money} ${CALLERID(num)})
same => n,Playback(/etc/asterisk/media/playback/e_12_vielen_dank_f_r_dein_gebot)
same => n,Set(QUEUE_PRIO=${money})
same => n,Originate(Console/dsp,exten,auction-spy,s,1,,a)
;same => n,Originate(Console/dsp,exten,auction-spy,s,1,,a)
same => n,Set(SPYGROUP=10022)
same => n,GotoIf($[ "${quality_assured}" != "" ]?direct_queue)
same => n,Playback(/etc/asterisk/media/playback/e_4_zur_qualit_tssicherung)
same => n,Set(quality_assured="most_definitely")
same => n(direct_queue),Set(__AUCTION_BID=${money})
same => n(direct_queue),GotoIf($[ "${DB(auction/open)}" != "1" ]?bidding-closed,1)
same => n,Set(__AUCTION_BID=${money})
same => n,Queue(auction,tc)
same => n,Dial(SIP/21,60,U(bidding-announce))
same => n,Dial(IAX2/stubnitz/21,60,U(bidding-announce))
same => n,Hangup()
exten => bidding-closed,1,Playback(/etc/asterisk/media/playback/e_5_leider_kann_gerade_kein_gebot)
@@ -781,32 +787,41 @@ same => n,Goto(1,1)
[auction-spy]
exten => s,1,Noop()
same => n,ChanSpy(SIP/22,bqv(2))
same => n,ChanSpy(SIP/22,bq)
[bidding-announce]
exten => s,1,Wait(1)
same => n,Playback(/etc/asterisk/media/playback/e_20.1_das_gebot_der_anrufenden_dramatischer)
;same => n,Playback(/etc/asterisk/media/playback/e_20.1_das_gebot_der_anrufenden_dramatischer)
same => n,Playback(/etc/asterisk/media/playback/e_20_das_gebot_der_anrufenden_betr_gt)
same => n,SayNumber(${AUCTION_BID})
same => n,Playback(/etc/asterisk/media/playback/e_7.2_eur_s)
same => n,Return()
[bidding-queue-member]
exten => _2X,1,Ringing()
same => n,Dial(SIP/${EXTEN},,U(bidding-announce))
same => n,Dial(IAX2/stubnitz/${EXTEN},,U(bidding-announce))
same => n,RemoveQueueMember(auction,Local/${EXTEN}@bidding-queue-member)
same => n,Hangup
[take-question]
exten => s,1,Playback(/etc/asterisk/media/playback/e_4_zur_qualit_tssicherung)
exten => s,1,Background(/etc/asterisk/media/playback/e_4_zur_qualit_tssicherung)
same => n,Wait(0.5)
same => n,Queue(shop,t)
same => n,Hangup()
exten => 82,1,Wait(0.5)
same => n,Playback(/etc/asterisk/media/playback/ata)
same => n,Queue(shop,t)
same => n,Hangup()
exten => i,1,Wait(0.5)
same => n,Queue(shop,t)
same => n,Hangup()
[local]
exten => _22X,1,Dial(SIP/${EXTEN:1})
same => n,Hangup
exten => _X.,1,Dial(IAX2/hetzner/${EXTEN})
same => n,Hangup
[oldlocal]
[fromstubnitz]
exten => _22X,1,Dial(IAX2/stubnitz/${EXTEN:1})
exten => _0X.,1,Goto(to-eventphone,${EXTEN:1},1)
; Open bidding, read start bid
@@ -847,11 +862,13 @@ same => n,Set(DB(stream/open)=0)
same => n,Playback(/etc/asterisk/media/playback/e_15.2_herzlichen_gl_ckwunsch_pott)
same => n,Hangup()
; Remove queue member
exten => 95,1,Answer()
same => n,Wait(0.5)
same => n,RemoveQueueMember(auction,Local/22@bidding-queue-member)
same => n,Playback(/etc/asterisk/media/playback/e_15.2_herzlichen_gl_ckwunsch_pott)
same => n,Hangup()
[to-eventphone]
exten => _X.,1,SET(CALLERID(all)="Teleshop" <7467>)
same => n,Dial(SIP/${EXTEN}@eventphone)
[fromhetzner]
exten => _2X,1,Originate(Console/dsp,exten,auction-spy,s,1,,a)
same => n,Dial(SIP/${EXTEN})
same => n,Hangup()

View File

@@ -26,13 +26,13 @@ servername=Asterisk
; Whether HTTP/HTTPS interface is enabled or not. Default is no.
; This also affects manager/rawman/mxml access (see manager.conf)
;
;enabled=yes
enabled=yes
;
; Address to bind to, both for HTTP and HTTPS. You MUST specify
; a bindaddr in order for the HTTP server to run. There is no
; default value.
;
;bindaddr=0.0.0.0
bindaddr=172.19.27.2
;
; Port to bind to for HTTP sessions (default is 8088)
;

View File

@@ -26,7 +26,7 @@
; IPv6 the address needs to be in brackets then colon
; and port (e.g. bindaddr=[2001:db8::1]:4569).
bindaddr=172.19.27.1 ; You can specify 'bindaddr' more than once to bind to
bindaddr=172.19.27.2 ; You can specify 'bindaddr' more than once to bind to
; multiple addresses, but the first will be the
; default. IPv6 addresses are accepted.
@@ -149,11 +149,12 @@ bandwidth=low
; You can also fine tune codecs here using "allow" and "disallow" clauses with
; specific codecs. Use "all" to represent all formats.
;
disallow=all
allow=gsm
;allow=all
;disallow=g723.1
;disallow=lpc10
;allow=gsm
disallow=all
allow=gsm
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -481,9 +482,9 @@ autokill=yes
;
;shrinkcallerid=yes ; on by default
;; Guest sections for unauthenticated connection attempts. Just specify an
;; empty secret, or provide no secret section.
;;
; Guest sections for unauthenticated connection attempts. Just specify an
; empty secret, or provide no secret section.
;
;[guest]
;type=user
;context=public
@@ -669,12 +670,12 @@ autokill=yes
;context=number-please ; we start at the s extension in this context
;
[hetzner]
[stubnitz]
type=friend
host=172.19.27.2
username=stubnitz
host=172.19.27.1
username=hetzner
secret=f9DuF9Sh0GRKUFrF
context=fromhetzner
context=fromstubnitz
qualify=yes
qualifyfreqok=10000
qualifyfreqnotok=10000

View File

@@ -1,80 +0,0 @@
;
; IAX2 Provisioning Information
;
; Contains provisioning information for templates and for specific service
; entries.
;
; Templates provide a group of settings from which provisioning takes place.
; A template may be based upon any template that has been specified before
; it. If the template that an entry is based on is not specified then it is
; presumed to be 'default' (unless it is the first of course).
;
; Templates which begin with 'si-' are used for provisioning units with
; specific service identifiers. For example the entry "si-000364000126"
; would be used when the device with the corresponding service identifier of
; "000364000126" attempts to register or make a call.
;
[default]
;
; The port number the device should use to bind to. The default is 4569.
;
;port=4569
;
; server is our PRIMARY server for registration and placing calls
;
;server=192.168.69.3
;
; altserver is the BACKUP server for registration and placing calls in the
; event the primary server is unavailable.
;
;altserver=192.168.69.4
;
; port is the port number to use for IAX2 outbound. The connections to the
; server and altserver -- default is of course 4569.
;serverport=4569
;
; language is the preferred language for the device
;
;language=en
;
; codec is the requested codec. The iaxy supports ulaw and adpcm
;
codec=ulaw
;
; flags is a comma separated list of flags which the device should
; use and may contain any of the following keywords:
;
; "register" - Register with server
; "secure" - Do not accept calls / provisioning not originated by the server
; "heartbeat" - Generate status packets on port 9999 sent to 255.255.255.255
; "debug" - Output extra debugging to port 9999
;
; Note that use can use += and -= to adjust parameters
;
flags=register,heartbeat
;
; See https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service for a description of this parameter.
;tos=ef
;
; Example iaxy provisioning
;
;[si-000364000126]
;user=iaxy
;pass=bitsy
;flags += debug
;[si-000364000127]
;user=iaxy2
;pass=bitsy2
;template=si-000364000126
;flags += debug
;
;[*]
;
; If specified, the '*' provisioning is used for all devices which do not
; have another provisioning entry within the file. If unspecified, no
; provisioning will take place for devices which have no entry. DO NOT
; USE A '*' PROVISIONING ENTRY UNLESS YOU KNOW WHAT YOU'RE DOING.
;
;template=default

BIN
media/playback/ata.alaw Normal file

Binary file not shown.

View File

@@ -47,7 +47,7 @@
[default]
mode=files
directory=/etc/asterisk/media/moh/shop
directory=moh
[shop]
mode=files

View File

@@ -29,7 +29,7 @@
autoanswer = yes ; no autoanswer on call
autohangup = yes ; hangup when other party closes
; extension = s ; default extension to call
context = local ; default context for outgoing calls
; context = default ; default context for outgoing calls
; language = "" ; default language
; If you set overridecontext to 'yes', then the whole dial string

View File

@@ -179,7 +179,7 @@ monitor-type = MixMonitor
; The default value for timeoutpriority is "app" since this was how previous versions of
; Asterisk behaved.
;
;timeout = 15
timeout = 40
;retry = 5
;timeoutpriority = app|conf
;
@@ -561,12 +561,19 @@ monitor-type = MixMonitor
;member => Local/1000@default,0,John Smith,SIP/1000
;member => Local/2000@default,0,Lorem Ipsum,SIP/2000,no
[gott]
musicclass=gott
strategy=ringall
announce-position=no
announce-to-first-user=no
member => IAX2/stubnitz/24
[shop]
musicclass=shop
strategy=ringall
announce-position=no
announce-to-first-user=no
member => SIP/23
member => IAX2/stubnitz/23
[auction]
musicclass=shop

6
show-bid.sh Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/sh
echo "Content-Type: text/plain"
echo ""
asterisk -x 'queue show auction' | sed -n 's/^.*prio: \(.*\))$/Aktuelles Gebot: \1/p' | head

View File

@@ -818,10 +818,8 @@ qualify=yes
; Examples:
;
;register => 1234:password@mysipprovider.com
;register => 7467:12zX22bH02q2@eventphone.de
;register => 7467:COwcNVlnErGf@voip.eventphone.de
register => 7467:12zX22bH02q2@eventphone.de
register => 7467:COwcNVlnErGf@voip.eventphone.de
;
; This will pass incoming calls to the 's' extension
;
@@ -1019,8 +1017,7 @@ registerattempts=0 ; Number of registration attempts before we give u
; This does not really work well in the case where Asterisk is outside and the
; clients are on the inside of a NAT. In that case, you want to set directmedia=nonat.
;
directmedia=no
; Asterisk by default tries to redirect the
;directmedia=yes ; Asterisk by default tries to redirect the
; RTP media stream to go directly from
; the caller to the callee. Some devices do not
; support this (especially if one of them is behind a NAT).
@@ -1057,7 +1054,7 @@ directmedia=no
; the option in this situation helps to prevent potential glares.
; Setting this option implies 'yes'.
directrtpsetup=no ; Enable the new experimental direct RTP setup. This sets up
directrtpsetup=no ; Enable the new experimental direct RTP setup. This sets up
; the call directly with media peer-2-peer without re-invites.
; Will not work for video and cases where the callee sends
; RTP payloads and fmtp headers in the 200 OK that does not match the
@@ -1624,32 +1621,30 @@ directrtpsetup=no ; Enable the new experimental direct RTP setup. Th
; external IP address of the remote device. If port forwarding is done at the client side
; then UDPTL will flow to the remote device.
;[eventphone]
;type=friend
;host=148.251.63.154
;defaultuser=7467
;secret=12zX22bH02q2
;context=from-eventphone
;qualify=yes
;disallow=all
;allow=alaw
;direct-media=no
;canrewrite=no
;dtmfmode=rfc2833
;insecure=invite,port
;qualify=yes
;
;[eventphone-event]
;type=friend
;host=93.180.79.35
;defaultuser=7467
;secret=COwcNVlnErGf
;context=from-eventphone
;qualify=yes
;disallow=all
;allow=alaw
;direct-media=no
;canrewrite=no
;dtmfmode=rfc2833
;insecure=invite,port
;qualify=yes
[eventphone]
type=friend
host=148.251.63.154
defaultuser=7467
secret=12zX22bH02q2
context=from-eventphone
qualify=yes
disallow=all
allow=alaw
directmedia=no
dtmfmode=rfc2833
insecure=invite,port
qualify=yes
[eventphone-event]
type=friend
host=93.180.79.35
defaultuser=7467
secret=COwcNVlnErGf
context=from-eventphone
qualify=yes
disallow=all
allow=alaw
directmedia=no
dtmfmode=rfc2833
insecure=invite,port
qualify=yes

3
static-http/cgi-bin/bid Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/sh
exec sudo /etc/asterisk/show-bid.sh

View File

@@ -1,5 +1,5 @@
const api_creds = "queueview:queueview";
const api_app = "queueview"; //_" + (""+Math.random()).substring(2);
const api_app = "queueview_" + (""+Math.random()).substring(2);
let ws;

View File

@@ -126,8 +126,3 @@ context=local
secret=teleshop23
host=dynamic
context=local
[24]
secret=teleshop24
host=dynamic
context=local