Compare commits

..

10 Commits

Author SHA1 Message Date
Your Name
25b6f58e4c Add SIP station 24 for telegott line 2021-12-25 23:04:38 +00:00
Your Name
5d3a099da2 Re-add music on hold class gott 2021-12-25 22:51:53 +00:00
Your Name
e0c608e760 Revert "telegott"
This reverts commit a6b9caad5a.
2021-12-25 21:08:47 +00:00
Your Name
a6b9caad5a telegott 2021-12-25 21:08:19 +00:00
Your Name
be294efecf Use gsm because of questionable uplink 2020-12-30 21:44:31 +00:00
Your Name
b4d23900f2 Fix ChanSpy volume 2020-12-28 11:17:49 +00:00
Your Name
6246fa4628 Adjust ChanSpy volume 2020-12-27 21:04:56 +00:00
Your Name
6f7b3cb170 Configure moh class default
The default classed is used during transfers
2020-12-27 19:43:46 +00:00
Your Name
bcac336947 sip: Disable directmedia and directrtp 2020-12-27 18:25:16 +00:00
Your Name
4016b4603d Run most parts on Hetzner server at DC 2020-12-27 02:47:52 +00:00
21 changed files with 160 additions and 109 deletions

1
.gitignore vendored
View File

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

View File

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

View File

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

View File

@@ -732,21 +732,15 @@ exten => _X.,n,Return()
[from-eventphone] [from-eventphone]
exten => s,1,Answer() exten => s,1,Answer()
same => n,Wait(1) 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,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(start),Background(/etc/asterisk/media/playback/e_3_dr_cken_Sie,m)
same => n(start),Background(/etc/asterisk/media/playback/telefon_drueckenSieDie7,m)
same => n,WaitExten(4) same => n,WaitExten(4)
same => n,Goto(start) same => n,Goto(start)
exten => 1,1,Goto(record-bid,1,1) exten => 1,1,Goto(record-bid,1,1)
exten => 2,1,Goto(take-question,s,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) 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,Playback(/etc/asterisk/media/playback/e_2_bei_uns_ist_leider_gerade_nichts_los)
same => n,MusicOnHold(shop,10) same => n,MusicOnHold(shop,10)
same => n,Goto(1) same => n,Goto(1)
@@ -768,15 +762,14 @@ same => n,GotoIf($[ "${input}" != "1" ]?start)
same => n,Set(FILE(/tmp/money.txt,,,al,u)=${money} ${CALLERID(num)}) 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,Playback(/etc/asterisk/media/playback/e_12_vielen_dank_f_r_dein_gebot)
same => n,Set(QUEUE_PRIO=${money}) 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,Set(SPYGROUP=10022)
same => n,GotoIf($[ "${quality_assured}" != "" ]?direct_queue) same => n,GotoIf($[ "${quality_assured}" != "" ]?direct_queue)
same => n,Playback(/etc/asterisk/media/playback/e_4_zur_qualit_tssicherung) same => n,Playback(/etc/asterisk/media/playback/e_4_zur_qualit_tssicherung)
same => n,Set(quality_assured="most_definitely") same => n,Set(quality_assured="most_definitely")
same => n(direct_queue),GotoIf($[ "${DB(auction/open)}" != "1" ]?bidding-closed,1) same => n(direct_queue),Set(__AUCTION_BID=${money})
same => n,Set(__AUCTION_BID=${money})
same => n,Queue(auction,tc) same => n,Queue(auction,tc)
same => n,Dial(IAX2/stubnitz/21,60,U(bidding-announce)) same => n,Dial(SIP/21,60,U(bidding-announce))
same => n,Hangup() same => n,Hangup()
exten => bidding-closed,1,Playback(/etc/asterisk/media/playback/e_5_leider_kann_gerade_kein_gebot) exten => bidding-closed,1,Playback(/etc/asterisk/media/playback/e_5_leider_kann_gerade_kein_gebot)
@@ -788,41 +781,32 @@ same => n,Goto(1,1)
[auction-spy] [auction-spy]
exten => s,1,Noop() exten => s,1,Noop()
same => n,ChanSpy(SIP/22,bq) same => n,ChanSpy(SIP/22,bqv(2))
[bidding-announce] [bidding-announce]
exten => s,1,Wait(1) 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,SayNumber(${AUCTION_BID})
same => n,Playback(/etc/asterisk/media/playback/e_7.2_eur_s)
same => n,Return() same => n,Return()
[bidding-queue-member] [bidding-queue-member]
exten => _2X,1,Ringing() exten => _2X,1,Ringing()
same => n,Dial(IAX2/stubnitz/${EXTEN},,U(bidding-announce)) same => n,Dial(SIP/${EXTEN},,U(bidding-announce))
same => n,RemoveQueueMember(auction,Local/${EXTEN}@bidding-queue-member)
same => n,Hangup
[take-question] [take-question]
exten => s,1,Background(/etc/asterisk/media/playback/e_4_zur_qualit_tssicherung) exten => s,1,Playback(/etc/asterisk/media/playback/e_4_zur_qualit_tssicherung)
same => n,Wait(0.5) same => n,Wait(0.5)
same => n,Queue(shop,t) same => n,Queue(shop,t)
same => n,Hangup() 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] [local]
exten => _22X,1,Dial(SIP/${EXTEN:1})
same => n,Hangup
[fromstubnitz] exten => _X.,1,Dial(IAX2/hetzner/${EXTEN})
exten => _22X,1,Dial(IAX2/stubnitz/${EXTEN:1}) same => n,Hangup
[oldlocal]
exten => _0X.,1,Goto(to-eventphone,${EXTEN:1},1) exten => _0X.,1,Goto(to-eventphone,${EXTEN:1},1)
; Open bidding, read start bid ; Open bidding, read start bid
@@ -863,13 +847,11 @@ same => n,Set(DB(stream/open)=0)
same => n,Playback(/etc/asterisk/media/playback/e_15.2_herzlichen_gl_ckwunsch_pott) same => n,Playback(/etc/asterisk/media/playback/e_15.2_herzlichen_gl_ckwunsch_pott)
same => n,Hangup() 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] [to-eventphone]
exten => _X.,1,SET(CALLERID(all)="Teleshop" <7467>) exten => _X.,1,SET(CALLERID(all)="Teleshop" <7467>)
same => n,Dial(SIP/${EXTEN}@eventphone) 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. ; Whether HTTP/HTTPS interface is enabled or not. Default is no.
; This also affects manager/rawman/mxml access (see manager.conf) ; 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 ; 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 ; a bindaddr in order for the HTTP server to run. There is no
; default value. ; default value.
; ;
bindaddr=172.19.27.2 ;bindaddr=0.0.0.0
; ;
; Port to bind to for HTTP sessions (default is 8088) ; 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 ; IPv6 the address needs to be in brackets then colon
; and port (e.g. bindaddr=[2001:db8::1]:4569). ; and port (e.g. bindaddr=[2001:db8::1]:4569).
bindaddr=172.19.27.2 ; You can specify 'bindaddr' more than once to bind to bindaddr=172.19.27.1 ; You can specify 'bindaddr' more than once to bind to
; multiple addresses, but the first will be the ; multiple addresses, but the first will be the
; default. IPv6 addresses are accepted. ; default. IPv6 addresses are accepted.
@@ -149,12 +149,11 @@ bandwidth=low
; You can also fine tune codecs here using "allow" and "disallow" clauses with ; You can also fine tune codecs here using "allow" and "disallow" clauses with
; specific codecs. Use "all" to represent all formats. ; specific codecs. Use "all" to represent all formats.
; ;
;allow=all disallow=all
allow=gsm
;disallow=g723.1 ;disallow=g723.1
;disallow=lpc10 ;disallow=lpc10
;allow=gsm ;allow=gsm
disallow=all
allow=gsm
; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -482,9 +481,9 @@ autokill=yes
; ;
;shrinkcallerid=yes ; on by default ;shrinkcallerid=yes ; on by default
; Guest sections for unauthenticated connection attempts. Just specify an ;; Guest sections for unauthenticated connection attempts. Just specify an
; empty secret, or provide no secret section. ;; empty secret, or provide no secret section.
; ;;
;[guest] ;[guest]
;type=user ;type=user
;context=public ;context=public
@@ -670,12 +669,12 @@ autokill=yes
;context=number-please ; we start at the s extension in this context ;context=number-please ; we start at the s extension in this context
; ;
[stubnitz] [hetzner]
type=friend type=friend
host=172.19.27.1 host=172.19.27.2
username=hetzner username=stubnitz
secret=f9DuF9Sh0GRKUFrF secret=f9DuF9Sh0GRKUFrF
context=fromstubnitz context=fromhetzner
qualify=yes qualify=yes
qualifyfreqok=10000 qualifyfreqok=10000
qualifyfreqnotok=10000 qualifyfreqnotok=10000

80
iaxprov.conf Normal file
View File

@@ -0,0 +1,80 @@
;
; 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

View File

@@ -16,7 +16,7 @@
; a fractional second parameter which may be used in this field. Use %1q ; a fractional second parameter which may be used in this field. Use %1q
; for tenths, %2q for hundredths, etc. ; for tenths, %2q for hundredths, etc.
; ;
dateformat=%F %T ; ISO 8601 date format ;dateformat=%F %T ; ISO 8601 date format
;dateformat=%F %T.%3q ; with milliseconds ;dateformat=%F %T.%3q ; with milliseconds
; ;
; ;

Binary file not shown.

View File

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

View File

@@ -29,7 +29,7 @@
autoanswer = yes ; no autoanswer on call autoanswer = yes ; no autoanswer on call
autohangup = yes ; hangup when other party closes autohangup = yes ; hangup when other party closes
; extension = s ; default extension to call ; extension = s ; default extension to call
; context = default ; default context for outgoing calls context = local ; default context for outgoing calls
; language = "" ; default language ; language = "" ; default language
; If you set overridecontext to 'yes', then the whole dial string ; 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 ; The default value for timeoutpriority is "app" since this was how previous versions of
; Asterisk behaved. ; Asterisk behaved.
; ;
timeout = 40 ;timeout = 15
;retry = 5 ;retry = 5
;timeoutpriority = app|conf ;timeoutpriority = app|conf
; ;
@@ -561,19 +561,12 @@ timeout = 40
;member => Local/1000@default,0,John Smith,SIP/1000 ;member => Local/1000@default,0,John Smith,SIP/1000
;member => Local/2000@default,0,Lorem Ipsum,SIP/2000,no ;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] [shop]
musicclass=shop musicclass=shop
strategy=ringall strategy=ringall
announce-position=no announce-position=no
announce-to-first-user=no announce-to-first-user=no
member => IAX2/stubnitz/23 member => SIP/23
[auction] [auction]
musicclass=shop musicclass=shop

View File

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

View File

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

View File

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

View File

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

View File

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