Announcements can be sent from a voice gateway (router) without the need to write complex gateway scripts or the use of CUE (Cisco Unity Express).
All you need is a VXML script and an audio file (I would suggest recorded in G729r8 format see future post of how to create these from the router too).
Create the vxml script which should contain something like the following:
<?xml version="1.0" encoding="iso-8859-1"?> <vxml version="2.0"> <!-- Out Of Office Announcement File Name : oooa.vxml Description: Plays back an out of office announcement message --> <var name="option"/> <form id="main"> <block> <prompt><audio src="flash:oooa.au"/></prompt> </block> </form> </vxml>
Upload this script along with the audio file (which I’ve called oooa.vxml and oooa.au) to the router flash. Then install the application by entering the following commands :
Router# conf t Router(config)# application Router(config-app)# service oooa flash:oooa.vxml Router(config-app-param)# end Router# wr mem
The next thing is to associate the service oooa with a dial-peer. This can be an in or an outbound dial-peer, my personal preference is inbound which is the example I’ll give. The being said to test this you need to generate an inbound call into the gateway. One thing that isn’t obvious from the documentation is that you can associate this with both pots and also voip dial-peers. The fact this it can be associated with voip is the reason I would record the message using g729r8 !
Router# conf t Router(config)# dial-peer voice 3901 voip Router(config-dial-peer)# incoming called-number 3901 Router(config-dial-peer)# service oooa Router(config-dial-peer)# codec g729r8 Router(config-dial-peer)# end Router# wr mem
(The default codec is g729r8 so the codec command is only included for completeness).
UPDATE: 22/06/2009 – On more recent version of IOS the default codec for ephone’s has been iLBC !
Now if a call arrives at this router using H323 looking for the number 3901 will have the message associated with oooa.au played to them.
This application really comes into it’s own if you call forward on busy no answer etc. However the problem is that for this type of application it must exist on the inbound dial peer. So if you are already in the call manager your are stuck. A simple solution to this is to create a dialpeer pointing at a loopback on the same router. The setup both a destination-pattern and also an incoming called-number the same and your problems are solved.
Router# conf t Router(config)# interface Loopback 3901 Router(config-if)# ip address 10.10.10.10 255.255.255.255 Router(config-if)# dial-peer voice 3901 voip Router(config-dial-peer)# incoming called-number 3901 Router(config-dial-peer)# destination-pattern 3901 Router(config-dial-peer)# session target ipv4:10.10.10.10 Router(config-dial-peer)# dtmf-relay h245-alphanumeric Router(config-dial-peer)# codec g729r8 Router(config-dial-peer)# no vad Router(config-dial-peer)# end Router# wr mem
A couple of gotcha’s I recently walked into if you have changed the default H323 port on this device from TCP 1720 (to TCP 1844 for example) you need to ensure that the session target is session target ipv4:10.10.10.10:1844 otherwise it all looks fine but doesn’t work.