Freeswitch dialplan

From 탱이의 잡동사니
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Overview

Freeswitch Dialplan 내용 정리

Basic

Freeswitch 에서의 Dialplan 은 세가지 방식을 지원한다.

  • XML 방식의 Dialplan
  • LDAP directory 방식의 Dialplan
  • Asterisk dialplan

특별한 언급이 없는 한, XML 방식의 Dialplan 을 기준으로 설명한다.

Channel Variables

콜의 진행에 영향을 주거나 콜 설정과 관련된 변수들이 있다. 이를 Channel Variables 라고 하며, 이 변수들 값의 변경을 통해 Dialplan 혹은 Application 그리고 dialstring 에서도 콜의 진행 및 콜의 설정을 변경할 수 있다.

${variables}, $${variables}

  • ${variables}는 dialplan 혹은 콜의 흐름 혹은 설정에 따라 에 따라 값이 변경되는 변수들을 의미한다.
  • $${variables} 는 freeswitch.xml 이 컴파일될 때 설정된다. freeswitch.xml 파일은 freeswitch 를 시작하거나, reloadxml 을 할 때에만 컴파일된다.

짧게 말하면, $${variables}는 단 한번 만 값이 설정될 수 있으며, ${variables}는 여러차례 값이 변경될 수 있다.

Channel Variables in the XML Dialplan

set application 을 통해 쉽게 변경이 가능하다. <source lang=xml> <action application="set" data="var_name=var value"/> </source> 설정된 channel variable 은 ${} 구문으로 쉽게 가져올 수 있다. <source lang=xml> <action application="log" data="INFO The value in the var_name chan var is ${var_name}"/> <condition field="${var_name}" expression="some text"> </source>

Scoped Variables

Channel variable 은 세션 전역에서 사용될 수 있다.


See also