Asterisk dialplan functions: Difference between revisions

From 탱이의 잡동사니
Jump to navigation Jump to search
(Created page with "== Overview == Asterisk dialplan function 내용 정리 == VALID_EXTEN() == == See also == * https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Dialplan+Functions - Aste...")
 
Line 2: Line 2:
Asterisk dialplan function 내용 정리
Asterisk dialplan function 내용 정리


== VALID_EXTEN() ==
== VALID_EXTEN ==
입력된 Extension 이 Context 에 존재하는지 여부를 확인한다.
 
Determine whether an extension exists or not.
 
Returns a true value if the indicated context, extension, and priority exist.
: This function has been deprecated in favor of the DIALPLAN_EXISTS() function.
<pre>
VALID_EXTEN(context,extension,priority)
</pre>
* context : Defaults to the current context.
* extension
* priority : Priority defaults to 1
 
=== Example ===
<pre>
[DialToInternal]
include => Internal
exten => s,1,Goto(${CallFlowID},1)
exten => _[+0-9]!,1,GoSub(LoopDetection,s,1)
  same => n,ExecIf(${ISNULL(${UniqueID})}?Set(__UniqueID=${UNIQUEID}))
  same => n,Log(NOTICE,${UniqueID}-${CONTEXT}(${UNIQUEID}@${CHANNEL}))
  same => n,GotoIf(${VALID_EXTEN(Internal,${EXTEN},1)}?Internal,${EXTEN},1)
</pre>
 
=== See also ===
* https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Function_VALID_EXTEN


== See also ==
== See also ==

Revision as of 15:52, 10 January 2017

Overview

Asterisk dialplan function 내용 정리

VALID_EXTEN

입력된 Extension 이 Context 에 존재하는지 여부를 확인한다.

Determine whether an extension exists or not.

Returns a true value if the indicated context, extension, and priority exist.

This function has been deprecated in favor of the DIALPLAN_EXISTS() function.
VALID_EXTEN(context,extension,priority)
  • context : Defaults to the current context.
  • extension
  • priority : Priority defaults to 1

Example

[DialToInternal]
 include => Internal
 exten => s,1,Goto(${CallFlowID},1)
 exten => _[+0-9]!,1,GoSub(LoopDetection,s,1)
  same => n,ExecIf(${ISNULL(${UniqueID})}?Set(__UniqueID=${UNIQUEID}))
  same => n,Log(NOTICE,${UniqueID}-${CONTEXT}(${UNIQUEID}@${CHANNEL}))
  same => n,GotoIf(${VALID_EXTEN(Internal,${EXTEN},1)}?Internal,${EXTEN},1)

See also

See also