Hi, I need to create a hotline for my customers.
Once the customer calls, Asterisk hands the call over to the first technician. If he is not available, then the next one. Each customer has their own PIN. Without PIN, there will be no connection to the technician.
That works for me.
After connecting the call to the technician, I want to play the text with the customer’s name/PIN (so that the technician knows who is calling) and then connect the call. But, unfortunately, I don’t know how to do it.
My config:
# -------------------------------------------
# cat /etc/asterisk/queues.conf
[general]
persistentmembers = yes
monitor-type = MixMonitor
[queue_template](!)
musicclass=company
strategy=linear
joinempty=yes
leavewhenempty=no
ringinuse=no
[techsupport](queue_template)
member = SIP/00420111111111@trunk
member = SIP/00420222222222@trunk
# -------------------------------------------
# cat /etc/asterisk/extensions.conf
[incomming]
exten => s,1,MixMonitor("/var/log/hotline/${STRFTIME(${EPOCH},,%Y-%m-%d-%H-%M-%S)}_${CALLERID(num)}.wav")
exten => s,n,Playback(hello)
exten => s,n,DBdeltree(customer)
exten => s,n,Set(DB(customer/12345)=1)
exten => s,n,Set(DB(customer/54321)=1)
exten => s,n,Playback(conf-getpin)
exten => s,n,Read(CUSTOMER,,0,,1,60)
exten => s,n,GotoIf(${DB_EXISTS(customer/${CUSTOMER})}?:customer,s,100)
exten => s,n,Queue(techsupport)
exten => s,n,Playback(goodbye)
exten => s,n,Hangup
exten => s,100,Playback(conf-invalidpin)
exten => s,101,Hangup