Play Welcome Voice Prompt without IVR to Inbound Caller

This article guides you to custom a welcome voice prompt for external callers without any IVR before ringing internal extensions. For example, play your own custom voice message "welcome to company xxx" for external callers and then forward the call to the related internal extensions.
Note: This guide is only for S-Series PBX and External Callers.
1.Play for Specified InboundRoutes.  
1) Login SSH followed by this guide: SSH Login
2) Upload or record your custom welcome voice message in Voice Prompts>Custom Prompts. 
And the Custom Prompt will be stored in below path:
For more info about Custom Prompts: Custom Prompt.
Note: test is the inbound route name, and test1 is the welcome message file name in below code.
3) Input ( vi /etc/asterisk/extensions.conf ) and Enter.
Click /, input ( [macro-inrouter_test] ) and Enter.
Copy the [macro-inrouter_testcontent and add playback after from-outside line.
exten = s,1,Set(CDR(userfield)=Inbound)
exten = s,n,Set(CALLERID(num)=${IF(${LEN(${CALLERID(num)})>0}?${CALLERID(num)}:Unknown)})
exten = s,n,Set(INROUTERNAME=test)
exten = s,n,Set(YSDETECTFAX=no)  
exten = s,n,Set(YSARG=${ARG2})  
exten = s,n,YsWalkContext(mobile-exten-callingrule,${CALLERID(num)},1,${CALLERID(num)},mobile)
exten = s,n,Gotoif(${YSEXISTCONTEXT}>0?mobile-exten-callingrule,${CALLERID(num)},1)
exten = s,n,Gotoif($[${LEN(${CLIPEXTENSION})}>1]?from-outside,${CLIPEXTENSION},1)
exten = s,n,playback(/ysdisk/ysapps/pbxcenter/var/lib/asterisk/sounds/record/test1)
exten = s,n,Goto(did_exten_test_general,${YSARG},1)
exten = h,1,Hangup() 
Note: the dialplan might differ in different firmware version. Please copy the practical dialplan when you follow this guide.
6).Input ( cd /ysdisk/support/customcfg/ ) and Enter.
Input ( vi extensions.custom.conf ) and Enter.
Click i and paste the above modified content.
Click Esc and input ( :wq ).
Click any change and then apply on S PBX web to take effect above custom configurations.
2. Play for All External Callers.
Just replace the copy content in step 6 with the below one, and the other steps(exclude step 5) remain the same.
exten = s,1,Set(IsFromOutside=1)          
exten = s,n,Set(PBXDIALNUM=${ARG1})       
exten = s,n,YsWalkContext(whitelist-inbound,${PBXDIALNUM},1,${CALLERID(num)},inbound)
exten = s,n,playback(/ysdisk/ysapps/pbxcenter/var/lib/asterisk/sounds/record/test1)
exten = s,n,Macro(realstexten,${PBXDIALNUM},${ARG2},${DIALOPTIONS})
Note: the dialplan might differ in different firmware version. Please copy the practical dialplan when you follow this guide.
Have more questions? Submit a request


Please sign in to leave a comment.