در صورتی که اولین بار است از انجمن منطقه لینوکسی ها بازدید میکنید به شما خوش آمد میگوییم. اگر قصد دارید به پرسش و پاسخ و بحث و گفتگو درباره مباحث مطرح شده انجمن بپردازید، لازم است در مدت کوتاهی و به صورت رایگان ثبت نام کنید.
جهت اطلاع از آخرین اخبار فناوری اطلاعات در زمینه مهندسی کامپیوتر، در کانال تلگرام مهندسین منطقه لینوکسی ها عضو شوید.
اطلاعیه مهم: شروع ثبت نام دوره های Voip - استریسک مقدماتی و پیشرفته - مهندسی ایزابل (آنلاین و حضوری)
Asterisk functions are used in Asterisk's dialplan. Unlike dialplan applications, they cannot be used directly. Instead they return a value that could be used by the dialplan logic.
Function names by practice are all capitalzed letters. The names ARE CASE SENSITIVE!
Example usage of the function CUT:
exten => s,1,Set(foo=${CUT(bar,,2)})
The above example sets the variable foo to the function CUT whose first parameter is 'bar', second parameter is empty and third parameter is '2'.
A function is often used to determain which "part of a variable" to set. For instance, the use of the function CALLERID:
The list of availble functions depends on the modules installed and loaded on the current system. To get the list of functions from the Asterisk CLI use the command "core show functions" . This gives a list of all functions.
To get the syntax of a specific function, use the command "core show function FUNCNAME" . This gives a longer description of the function. It is often handy to use tab completion that way to identify a function name.
توی کتاب Asterisk_Gateway_Interface_1_4_and_1_6_Programming صفحه 41 به موضوع اشاره شده
Applications and functions So far, you have learned about contexts, extensions, and variables. It is time to
introduce you to the Asterisk application and functions set—the basic building
blocks of an Asterisk-based IVR or application.
Asterisk consists of over 150 different applications and over 50 different functions,
which when combined into a single extension within a context, will create your
IVR application. While applications usually perform an operational function and set various channel variables upon exit, functions operate and manipulate a variable or a string.
کامنت