A customer asks for an automated greeting system where callers listen to marketing messages before being picked up by agents. They can also press '*' anytime to quit waiting in the queue and leave voice message.
1. In the dial plan, we use the option 'Hn' in the Queue command. The 'H' allows caller to hangup a ringing call by whatever defined as the disconnect sequence in features.conf. Note that we also need 'n' such that the retry cycle is skipped and the Queue command exits.
extensions.conf
[custom-ivr]
exten => 12345,1,noop
; answer before playing the sound files
exten => 12345,n,answer
exten => 12345,n,wait(1)
exten => 12345,n,Set(TIMEOUT(digit)=2)
exten => 12345,n,Set(TIMEOUT(response)=10)
exten => 12345,n,Background(custom-ivr/custom-welcome)
;exten => 12345,n,Set(TIMEOUT(digit)=5)
; use H to let caller hangup a ringing call to agent by disconnect key seq in features.conf
; use n such that caller skips the retry cycle and exits the queue command
; otherwise, caller still stays in the queue redialing to agent
exten => 12345,n,Queue(custom-queue,Hn,,,300)
; customer leaves voice message by keying '*' or upon wait timeout of 300s
exten => 12345,n,VoiceMail(custom-vm@custom-ivr)
; we still need this extension to handle '*' pressed during the welcome greeting
exten => *,1,noop(i quit waiting)
exten => *,n,VoiceMail(custom-vm@custom-ivr)
To verify the current disconnect sequence, we can use 'feature show' in the CLI.
2. The marketing messages are specified as a MOH class 'custom-ivr' in the queue definition.
queues.conf
[custom-queue]
strategy = ringall
musicclass = custom-ivr
ringinuse = no
wrapuptime = 30
joinempty = yes
3. Then we can put the marketing messages in a directory /var/lib/asterisk/moh/custom-ivr. These sound files are preferably formatted to minimize transcoding.
musiconhold.conf
[custom-ivr]
mode=files
directory=/var/lib/asterisk/moh/custom-ivr
We can use 'core show translation' in CLI to show how costly Asterisk performs the transcoding.
4. Alternatively, the queue 'context=' also allows caller to quit by keying a defined extension. For example, with below configurations, caller can also quit the queue by '*'.
queues.conf
[custom-queue]
context = custom-ivr
extensions.conf
[custom-ivr]
; no need for Hn
exten => 12345,n,Queue(custom-queue,,,,300)
exten => *,1,noop(i quit waiting)
Asterisk In Practice
Tips of the day: Setup local presence in Hong Kong, China or Singapore using DID via SIP trunk.
2011年11月24日星期四
2011年10月19日星期三
Blind Transfer and Ring back in Elastix
The followings apply to Elastix 2.0.0-36 & Asterisk 1.6.2.10 on CentOS release 5.5.
In Elastix, we can perform blind transfer and ring back us if the transferee does not answer. Note that here assumes you are transferring call using Asterisk feature, not the IP phone's own transfer function.
Firstly, we have to setup a TRANSFER_CONTEXT. Dialplan execution will jump to here on transfer.
/etc/asterisk/globals_custom.conf
TRANSFER_CONTEXT = blindxfer_ringback
Next, we make use of the BLINDTRANSFER variable to ring back in the context [blindxfer_ringback]
/etc/asterisk/extensions_custom.conf
[blindxfer_ringback]
; the destination ext should not have vm enabled
exten => _X.,1,NOOP(${BLINDTRANSFER})
exten => _X.,n,set(timeoutd=15) ; set timeout in seconds to dial the transferee
exten => _X.,n,set(extLeng=${LEN(${EXTEN})})
exten => _x.,n,dial(local/${EXTEN}@from-internal,${timeoutd})
exten => _X.,n,Gotoif($["${DIALSTATUS}" = "ANSWER"]?hangup:callback)
; strip the 'SIP/' and ring back
exten => _X.,n(callback),dial(local/${BLINDTRANSFER:4:${extLeng}}@from-internal,,tr)
exten => _X.,n(hangup),hangup()
How does it work
The '##' is the key sequence to initiate blind transfer in Asterisk. You can verify the actual sequence defined in your Elastix.
Builtin Feature Default Current
--------------- ------- -------
Pickup *8 *8
Blind Transfer # ##
In Elastix, we can perform blind transfer and ring back us if the transferee does not answer. Note that here assumes you are transferring call using Asterisk feature, not the IP phone's own transfer function.
Firstly, we have to setup a TRANSFER_CONTEXT. Dialplan execution will jump to here on transfer.
/etc/asterisk/globals_custom.conf
TRANSFER_CONTEXT = blindxfer_ringback
Next, we make use of the BLINDTRANSFER variable to ring back in the context [blindxfer_ringback]
/etc/asterisk/extensions_custom.conf
[blindxfer_ringback]
; the destination ext should not have vm enabled
exten => _X.,1,NOOP(${BLINDTRANSFER})
exten => _X.,n,set(timeoutd=15) ; set timeout in seconds to dial the transferee
exten => _X.,n,set(extLeng=${LEN(${EXTEN})})
exten => _x.,n,dial(local/${EXTEN}@from-internal,${timeoutd})
exten => _X.,n,Gotoif($["${DIALSTATUS}" = "ANSWER"]?hangup:callback)
; strip the 'SIP/' and ring back
exten => _X.,n(callback),dial(local/${BLINDTRANSFER:4:${extLeng}}@from-internal,,tr)
exten => _X.,n(hangup),hangup()
How does it work
- During a conversation, when you want to transfer caller, you press '##' followed by the transferee extension and '#'.
- You can hangup your phone.
- The caller now hears music while being connected to the transferee.
- If the transferee does not answer, Asterisk will ring back you.
The '##' is the key sequence to initiate blind transfer in Asterisk. You can verify the actual sequence defined in your Elastix.
- PBX>PBX Configuration>Feature Codes
- Or you can check it in CLI.
Builtin Feature Default Current
--------------- ------- -------
Pickup *8 *8
Blind Transfer # ##
2011年10月7日星期五
Tips of using Elastix in Business Center/Virtual Office
Business center usually gives its client a business contact number to receive inbound calls. Caller is greeted properly using the client's name and then forwarded to the client who is probably located remotely.
It is desirable that the agent can identify which client is being called before picking up the phone.
Here describes the steps taken to accomplish it using Elastix.
The PBX
The scenario applies to Elastix 2.0.0-36 and most common IP Phones with LCD display. The business center subscribes a T1 trunk (bundled with 200 local numbers) from a local telephone provider. The local numbers are allocated to its clients.
Steps
1. Create a queue of agents
PBX > PBX Configuration > Inbound Call Control > Queues
You can simply enter the agent extensions in the 'Static Agents' field.
2. Add inbound route
PBX > PBX Configuration > Inbound Call Control > Inbound Routes
Input the 'DID Number' and the corresponding company name in the 'CID name prefix' field. The DID number is the business contact number that is given to the client.
Direct incoming call to the call queue created above.
Create inbound route for each DID number you assigned to clients.
What would the agent see?
When a call comes in, the agent can see the corresponding company name on the phone LCD display. Note that the display length varies with phone models.
訂閱:
文章 (Atom)