hello,
i am used asterisk 1.4 with freepbx 2.6 in centos. actually i need some help and explanation on how to add dial plan function and macro in extension_additional.conf.
what i’am trying to do is, i want to add some function in dialplan so that it can say/tell extension name.the extension name will be retrieve from astDB and it will be promted to the caller.
for example:
extension number:111
extension name:admin
- when the caller called 111,then they will be promted with the extension name “a d m i n”.
this is the macro that i tried to make,and i put it in extension_custom.conf:
[macro-sayname]
exten => s,1,Noop(${AMPUSERCIDNAME})
exten => s,n,Playback(your-extension-name-is{(${AMPUSERCIDNAME})})
exten => s,n,GotoIf($["${PLAYBACKSTATUS}"=“SUCCESS”]?done)
; call tts-sayalpha. This should set MACRO_OFFSET=101 if it was successful
exten => s,n(tts),Macro(tts-sayalpha,${ARG1},${ARG2},${ARG3})
exten => s,n,SayAlpha(${AMPUSERCIDNAME})
exten => s,n,Goto(end)
exten => s,tts+101,Noop()
; end of [macro-sayname]
any ideas, are very appreciate.