dialog_ng_admin.xml 38 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241
  1. <?xml version="1.0" encoding='ISO-8859-1'?>
  2. <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  4. <!-- Include general documentation entities -->
  5. <!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
  6. %docentities;
  7. ]>
  8. <!-- Module User's Guide -->
  9. <chapter>
  10. <title>&adminguide;</title>
  11. <section>
  12. <title>Overview</title>
  13. <para>
  14. The dialog_ng module provides dialog awareness to the &kamailio; proxy. Its
  15. functionality is to keep track of the current dialogs, to offer information
  16. about them (like how many dialogs are active) or to manage them. The module
  17. exports several functions that could be used directly from scripts.
  18. The dialog_ng module extends the original dialog module by providing support
  19. for forked calling and early dialog termination. It is the intention that
  20. the dialog_ng module will eventually replace the dialog module.
  21. </para>
  22. <para>
  23. The module, via an internal API, also provide the foundation to build on
  24. top of it more complex dialog-based functionalities via other &kamailio;
  25. modules.
  26. </para>
  27. </section>
  28. <section>
  29. <title>How it works</title>
  30. <para>
  31. To create the dialog associated to an initial request, the flag
  32. <quote>dlg_flag</quote> (
  33. <xref linkend="dlg-flag-id"/>) must be set before
  34. creating the corresponding transaction.
  35. </para>
  36. <para>
  37. The dialog is automatically destroyed when a
  38. <quote>BYE</quote> is
  39. received. In case of no
  40. <quote>BYE</quote>, the dialog lifetime is
  41. controlled via the default timeout (see
  42. <quote>default_timeout</quote>
  43. -
  44. <xref linkend="default-timeout-id"/>) and custom timeout (see
  45. <quote>timeout_avp</quote> -
  46. <xref linkend="timeout-avp-id"/>). The
  47. dialog timeout is reset each time a sequential request passes.
  48. </para>
  49. </section>
  50. <section>
  51. <title>Dialog profiling</title>
  52. <para>
  53. Dialog profiling is a mechanism that helps in classifying, sorting and
  54. keeping trace of certain types of dialogs, using whatever properties of
  55. the dialog (like caller, destination, type of calls, etc).
  56. Dialogs can be dynamically added in different (and several) profile
  57. tables - logically, each profile table can have a special meaning (like
  58. dialogs outside the domain, dialogs terminated to PSTN, etc).
  59. </para>
  60. <para>
  61. There are two types of profiles:
  62. <itemizedlist>
  63. <listitem>
  64. <para>
  65. <emphasis>with no value</emphasis> - a dialog simply belongs
  66. to a profile. (like outbound calls profile). There is no other
  67. additional information to describe the dialog's belonging to the
  68. profile;
  69. </para>
  70. </listitem>
  71. <listitem>
  72. <para>
  73. <emphasis>with value</emphasis> - a dialog belongs to a profile
  74. having a certain value (like in caller profile, where the value
  75. is the caller ID). The belonging of the dialog to the profile is
  76. strictly related to the value.
  77. </para>
  78. </listitem>
  79. </itemizedlist>
  80. </para>
  81. <para>
  82. A dialog can be added to multiple profiles in the same time.
  83. </para>
  84. <para>
  85. Profiles are visible (at the moment) in the request route (for initial
  86. and sequential requests) and in the branch, failure and reply routes of
  87. the original request.
  88. </para>
  89. </section>
  90. <section>
  91. <title>Dependencies</title>
  92. <section>
  93. <title>&kamailio; Modules</title>
  94. <para>
  95. The following modules must be loaded before this module:
  96. <itemizedlist>
  97. <listitem>
  98. <para>
  99. <emphasis>TM</emphasis> - Transaction module
  100. </para>
  101. </listitem>
  102. <listitem>
  103. <para>
  104. <emphasis>RR</emphasis> - Record-Route module
  105. </para>
  106. </listitem>
  107. </itemizedlist>
  108. </para>
  109. </section>
  110. <section>
  111. <title>External Libraries or Applications</title>
  112. <para>
  113. The following libraries or applications must be installed before
  114. running &kamailio; with this module loaded:
  115. <itemizedlist>
  116. <listitem>
  117. <para>
  118. <emphasis>None</emphasis>.
  119. </para>
  120. </listitem>
  121. </itemizedlist>
  122. </para>
  123. </section>
  124. </section>
  125. <section>
  126. <title>Parameters</title>
  127. <section>
  128. <title>
  129. <varname>enable_stats</varname> (integer)
  130. </title>
  131. <para>
  132. This function is currently not supported by the dialog_ng module.
  133. To be incorporated in the future.
  134. </para>
  135. </section>
  136. <section>
  137. <title>
  138. <varname>hash_size</varname> (integer)
  139. </title>
  140. <para>
  141. The size of the hash table internally used to keep the dialogs. A
  142. larger table is much faster but consumes more memory. The hash size
  143. must be a power of two number.
  144. </para>
  145. <para>
  146. IMPORTANT: If dialogs' information should be stored in a database,
  147. a constant hash_size should be used, otherwise the restoring process
  148. will not take place. If you really want to modify the hash_size you
  149. must delete all table's rows before restarting the server.
  150. </para>
  151. <para>
  152. <emphasis>
  153. Default value is
  154. <quote>4096</quote>.
  155. </emphasis>
  156. </para>
  157. <example>
  158. <title>Set
  159. <varname>hash_size</varname> parameter
  160. </title>
  161. <programlisting format="linespecific">
  162. ...
  163. modparam("dialog_ng", "hash_size", 1024)
  164. ...
  165. </programlisting>
  166. </example>
  167. </section>
  168. <section>
  169. <title>
  170. <varname>rr_param</varname> (string)
  171. </title>
  172. <para>
  173. Name of the Record-Route parameter to be added with the dialog cookie.
  174. It is used for the fast dialog matching of sequential requests.
  175. </para>
  176. <para>
  177. <emphasis>
  178. Default value is
  179. <quote>did</quote>.
  180. </emphasis>
  181. </para>
  182. <example>
  183. <title>Set
  184. <varname>rr_param</varname> parameter
  185. </title>
  186. <programlisting format="linespecific">
  187. ...
  188. modparam("dialog_ng", "rr_param", "xyz")
  189. ...
  190. </programlisting>
  191. </example>
  192. </section>
  193. <section id="dlg-flag-id">
  194. <title>
  195. <varname>dlg_flag</varname> (integer)
  196. </title>
  197. <para>
  198. Flag to be used for marking if a dialog should be constructed for the
  199. current request (this make sense only for initial requests).
  200. </para>
  201. <para>
  202. <emphasis>
  203. Default value is
  204. <quote>none</quote>.
  205. </emphasis>
  206. </para>
  207. <example>
  208. <title>Set
  209. <varname>dlg_flag</varname> parameter
  210. </title>
  211. <programlisting format="linespecific">
  212. ...
  213. modparam("dialog_ng", "dlg_flag", 4)
  214. ...
  215. </programlisting>
  216. </example>
  217. </section>
  218. <section id="timeout-avp-id">
  219. <title>
  220. <varname>timeout_avp</varname> (string)
  221. </title>
  222. <para>
  223. The specification of an AVP that contain a custom timeout (in seconds)
  224. for the dialog. It may be used only in a request (initial or sequential)
  225. context
  226. </para>
  227. <para>
  228. <emphasis>
  229. Default value is
  230. <quote>none</quote>.
  231. </emphasis>
  232. </para>
  233. <example>
  234. <title>Set
  235. <varname>timeout_avp</varname> parameter
  236. </title>
  237. <programlisting format="linespecific">
  238. ...
  239. modparam("dialog_ng", "timeout_avp", "$avp(i:10)")
  240. ...
  241. </programlisting>
  242. </example>
  243. </section>
  244. <section id="default-timeout-id">
  245. <title>
  246. <varname>default_timeout</varname> (integer)
  247. </title>
  248. <para>
  249. The default dialog timeout (in seconds) if no custom one is set.
  250. </para>
  251. <para>
  252. <emphasis>
  253. Default value is
  254. <quote>43200 (12 hours)</quote>.
  255. </emphasis>
  256. </para>
  257. <example>
  258. <title>Set
  259. <varname>default_timeout</varname> parameter
  260. </title>
  261. <programlisting format="linespecific">
  262. ...
  263. modparam("dialog_ng", "default_timeout", 21600)
  264. ...
  265. </programlisting>
  266. </example>
  267. </section>
  268. <section>
  269. <title>
  270. <varname>dlg_extra_hdrs</varname> (string)
  271. </title>
  272. <para>
  273. A string containing the extra headers (full format, with EOH)
  274. to be added in the requests generated by the module (like BYEs).
  275. </para>
  276. <para>
  277. <emphasis>
  278. Default value is
  279. <quote>NULL</quote>.
  280. </emphasis>
  281. </para>
  282. <example>
  283. <title>Set
  284. <varname>dlf_extra_hdrs</varname> parameter
  285. </title>
  286. <programlisting format="linespecific">
  287. ...
  288. modparam("dialog_ng", "dlg_extra_hdrs", "Hint: credit expired\r\n")
  289. ...
  290. </programlisting>
  291. </example>
  292. </section>
  293. <section>
  294. <title>
  295. <varname>dlg_match_mode</varname> (integer)
  296. </title>
  297. <para>
  298. Deprecated - in the new dialog module we always match using DID ONLY
  299. </para>
  300. </section>
  301. <section>
  302. <title>
  303. <varname>detect_spirals</varname> (integer)
  304. </title>
  305. <para>
  306. Whether spirals (i.e., messages routed through the proxy multiple times)
  307. should be detected or not.
  308. </para>
  309. <para>
  310. If set to 0, spirals will not be detected and result in the generation of a
  311. new, possibly dangling dialog structure per occurring spiral. If set to 1,
  312. spirals are detected and internally mapped to existing dialog structures.
  313. </para>
  314. <para>
  315. Default value is 1.
  316. </para>
  317. <example>
  318. <title>Set
  319. <varname>detect_spirals</varname> parameter
  320. </title>
  321. <programlisting format="linespecific">
  322. ...
  323. modparam("dialog_ng", "detect_spirals", 1)
  324. ...
  325. </programlisting>
  326. </example>
  327. </section>
  328. <section>
  329. <title>
  330. <varname>db_url</varname> (string)
  331. </title>
  332. <para>
  333. Db storage not yet supported by dialog_ng - this to be done in future.
  334. </para>
  335. </section>
  336. <section>
  337. <title>
  338. <varname>db_mode</varname> (integer)
  339. </title>
  340. <para>
  341. Db storage not yet supported by dialog_ng - this to be done in future.
  342. </para>
  343. </section>
  344. <section>
  345. <title>
  346. <varname>db_update_period</varname> (integer)
  347. </title>
  348. <para>
  349. Db storage not yet supported by dialog_ng - this to be done in future.
  350. </para>
  351. </section>
  352. <section>
  353. <title>
  354. <varname>db_fetch_rows</varname> (integer)
  355. </title>
  356. <para>
  357. Db storage not yet supported by dialog_ng - this to be done in future.
  358. </para>
  359. </section>
  360. <section>
  361. <title>
  362. <varname>table_name</varname> (string)
  363. </title>
  364. <para>
  365. Db storage not yet supported by dialog_ng - this to be done in future.
  366. </para>
  367. </section>
  368. <section>
  369. <title>
  370. <varname>profiles_with_value</varname> (string)
  371. </title>
  372. <para>
  373. List of names for profiles with values.
  374. </para>
  375. <para>
  376. <emphasis>
  377. Default value is
  378. <quote>empty</quote>.
  379. </emphasis>
  380. </para>
  381. <example>
  382. <title>Set
  383. <varname>profiles_with_value</varname> parameter
  384. </title>
  385. <programlisting format="linespecific">
  386. ...
  387. modparam("dialog", "profiles_with_value", "caller ; my_profile")
  388. ...
  389. </programlisting>
  390. </example>
  391. </section>
  392. <section>
  393. <title>
  394. <varname>profiles_no_value</varname> (string)
  395. </title>
  396. <para>
  397. List of names for profiles without values.
  398. </para>
  399. <para>
  400. <emphasis>
  401. Default value is
  402. <quote>empty</quote>.
  403. </emphasis>
  404. </para>
  405. <example>
  406. <title>Set
  407. <varname>profiles_no_value</varname> parameter
  408. </title>
  409. <programlisting format="linespecific">
  410. ...
  411. modparam("dialog", "profiles_no_value", "inbound ; outbound")
  412. ...
  413. </programlisting>
  414. </example>
  415. </section>
  416. <section>
  417. <title>
  418. <varname>bridge_controller</varname> (string)
  419. </title>
  420. <para>
  421. SIP address to be used in From header when initiating a call bridge.
  422. </para>
  423. <para>
  424. <emphasis>
  425. Default value is
  426. <quote>sip:[email protected]</quote>.
  427. </emphasis>
  428. </para>
  429. <example>
  430. <title>Set
  431. <varname>bridge_controller</varname> parameter
  432. </title>
  433. <programlisting format="linespecific">
  434. ...
  435. modparam("dialog", "bridge_controller", "sip:[email protected]")
  436. ...
  437. </programlisting>
  438. </example>
  439. </section>
  440. <section>
  441. <title>
  442. <varname>initial_cbs_inscript</varname> (string)
  443. </title>
  444. <para>
  445. This has been deprecated since dlg_manage has been removed.
  446. </para>
  447. </section>
  448. </section>
  449. <section>
  450. <title>Functions</title>
  451. <section>
  452. <title>
  453. <function moreinfo="none">set_dlg_profile(profile,[value])</function>
  454. </title>
  455. <para>
  456. Inserts the current dialog into a profile. Note that if the profile does
  457. not supports values, this will be silently discarded. Also, there is
  458. no check for inserting the same dialog in the same profile for multiple
  459. times.
  460. </para>
  461. <para>Meaning of the parameters is as follows:</para>
  462. <itemizedlist>
  463. <listitem>
  464. <para>
  465. <emphasis>profile</emphasis> - name of the profile to be
  466. added to;
  467. </para>
  468. </listitem>
  469. <listitem>
  470. <para>
  471. <emphasis>value</emphasis> (optional) - string value to
  472. define the belonging of the dialog to the profile - note that the
  473. profile must support values.
  474. Pseudo-variables are supported.
  475. </para>
  476. </listitem>
  477. </itemizedlist>
  478. <para>
  479. This function can be used from REQUEST_ROUTE, BRANCH_ROUTE,
  480. REPLY_ROUTE and FAILURE_ROUTE.
  481. </para>
  482. <example>
  483. <title>
  484. <function>set_dlg_profile</function> usage
  485. </title>
  486. <programlisting format="linespecific">
  487. ...
  488. set_dlg_profile("inbound_call");
  489. set_dlg_profile("caller","$fu");
  490. ...
  491. </programlisting>
  492. </example>
  493. </section>
  494. <section>
  495. <title>
  496. <function moreinfo="none">unset_dlg_profile(profile,[value])</function>
  497. </title>
  498. <para>
  499. Removes the current dialog from a profile.
  500. </para>
  501. <para>Meaning of the parameters is as follows:</para>
  502. <itemizedlist>
  503. <listitem>
  504. <para>
  505. <emphasis>profile</emphasis> - name of the profile to be
  506. removed from;
  507. </para>
  508. </listitem>
  509. <listitem>
  510. <para>
  511. <emphasis>value</emphasis> (optional) - string value to
  512. define the belonging of the dialog to the profile - note that the
  513. profile must support values.
  514. Pseudo-variables are supported.
  515. </para>
  516. </listitem>
  517. </itemizedlist>
  518. <para>
  519. This function can be used from BRANCH_ROUTE,
  520. REPLY_ROUTE and FAILURE_ROUTE.
  521. </para>
  522. <example>
  523. <title>
  524. <function>unset_dlg_profile</function> usage
  525. </title>
  526. <programlisting format="linespecific">
  527. ...
  528. unset_dlg_profile("inbound_call");
  529. unset_dlg_profile("caller","$fu");
  530. ...
  531. </programlisting>
  532. </example>
  533. </section>
  534. <section>
  535. <title>
  536. <function moreinfo="none">is_in_profile(profile,[value])</function>
  537. </title>
  538. <para>
  539. Checks if the current dialog belongs to a profile. If the profile
  540. supports values, the check can be reinforced to take into account a
  541. specific value - if the dialog was inserted into the profile for a
  542. specific value. If no value is passed, only the simply belonging of
  543. the dialog to the profile is checked. Note that if the profile does
  544. not supports values, this will be silently discarded.
  545. </para>
  546. <para>Meaning of the parameters is as follows:</para>
  547. <itemizedlist>
  548. <listitem>
  549. <para>
  550. <emphasis>profile</emphasis> - name of the profile to be
  551. checked against;
  552. </para>
  553. </listitem>
  554. <listitem>
  555. <para>
  556. <emphasis>value</emphasis> (optional) - string value to
  557. further restrict the check. Pseudo-variables are supported.
  558. </para>
  559. </listitem>
  560. </itemizedlist>
  561. <para>
  562. This function can be used from REQUEST_ROUTE, BRANCH_ROUTE,
  563. REPLY_ROUTE and FAILURE_ROUTE.
  564. </para>
  565. <example>
  566. <title>
  567. <function>is_in_profile</function> usage
  568. </title>
  569. <programlisting format="linespecific">
  570. ...
  571. if (is_in_profile("inbound_call")) {
  572. log("this request belongs to a inbound call\n");
  573. }
  574. ...
  575. if (is_in_profile("caller","XX")) {
  576. log("this request belongs to a call of user XX\n");
  577. }
  578. ...
  579. </programlisting>
  580. </example>
  581. </section>
  582. <section>
  583. <title>
  584. <function moreinfo="none">get_profile_size(profile,[value],size)</function>
  585. </title>
  586. <para>
  587. Returns the number of dialogs belonging to a profile. If the profile
  588. supports values, the check can be reinforced to take into account a
  589. specific value - how many dialogs were inserted into the profile with
  590. a specific value. If no value is passed, only simply belonging of the
  591. dialog to the profile is checked. Note that if the profile does not
  592. supports values, this will be silently discarded.
  593. </para>
  594. <para>Meaning of the parameters is as follows:</para>
  595. <itemizedlist>
  596. <listitem>
  597. <para>
  598. <emphasis>profile</emphasis> - name of the profile to get
  599. the size for;
  600. </para>
  601. </listitem>
  602. <listitem>
  603. <para>
  604. <emphasis>value</emphasis> (optional) - string value to
  605. further restrict the check. Pseudo-variables are supported;
  606. </para>
  607. </listitem>
  608. <listitem>
  609. <para>
  610. <emphasis>size</emphasis> - an AVP or script variable to
  611. return the profile size in.
  612. </para>
  613. </listitem>
  614. </itemizedlist>
  615. <para>
  616. This function can be used from REQUEST_ROUTE, BRANCH_ROUTE,
  617. REPLY_ROUTE and FAILURE_ROUTE.
  618. </para>
  619. <example>
  620. <title>
  621. <function>get_profile_size</function> usage
  622. </title>
  623. <programlisting format="linespecific">
  624. ...
  625. if(get_profile_size("inbound_call","$avp(size)"))
  626. xlog("currently there are $avp(size) inbound calls\n");
  627. ...
  628. if(get_profile_size("caller","$fu","$avp(size)"))
  629. xlog("currently, the user $fu has $avp(size) active outgoing calls\n");
  630. ...
  631. </programlisting>
  632. </example>
  633. </section>
  634. <section>
  635. <title>
  636. <function moreinfo="none">dlg_isflagset(flag)</function>
  637. </title>
  638. <para>
  639. Check if the dialog flag is set or not.
  640. </para>
  641. <para>Meaning of the parameters is as follows:</para>
  642. <itemizedlist>
  643. <listitem>
  644. <para>
  645. <emphasis>flag</emphasis> - index of the flag - can be
  646. pseudo-variable.
  647. </para>
  648. </listitem>
  649. </itemizedlist>
  650. <para>
  651. This function can be used from BRANCH_ROUTE,
  652. REQUEST_ROUTE, ONREPLY_ROUTE and FAILURE_ROUTE.
  653. </para>
  654. <example>
  655. <title>
  656. <function>dlg_isflagset</function> usage
  657. </title>
  658. <programlisting format="linespecific">
  659. ...
  660. if(dlg_isflagset("1"))
  661. {
  662. ...
  663. }
  664. ...
  665. </programlisting>
  666. </example>
  667. </section>
  668. <section>
  669. <title>
  670. <function moreinfo="none">dlg_setflag(flag)</function>
  671. </title>
  672. <para>
  673. Set the dialog flag.
  674. </para>
  675. <para>Meaning of the parameters is as follows:</para>
  676. <itemizedlist>
  677. <listitem>
  678. <para>
  679. <emphasis>flag</emphasis> - index of the flag - can be
  680. pseudo-variable.
  681. </para>
  682. </listitem>
  683. </itemizedlist>
  684. <para>
  685. This function can be used from BRANCH_ROUTE,
  686. REQUEST_ROUTE, ONREPLY_ROUTE and FAILURE_ROUTE.
  687. </para>
  688. <example>
  689. <title>
  690. <function>dlg_setflag</function> usage
  691. </title>
  692. <programlisting format="linespecific">
  693. ...
  694. dlg_setflag("1");
  695. ...
  696. </programlisting>
  697. </example>
  698. </section>
  699. <section>
  700. <title>
  701. <function moreinfo="none">dlg_resetflag(flag)</function>
  702. </title>
  703. <para>
  704. Reset the dialog flag.
  705. </para>
  706. <para>Meaning of the parameters is as follows:</para>
  707. <itemizedlist>
  708. <listitem>
  709. <para>
  710. <emphasis>flag</emphasis> - index of the flag - can be
  711. pseudo-variable.
  712. </para>
  713. </listitem>
  714. </itemizedlist>
  715. <para>
  716. This function can be used from BRANCH_ROUTE,
  717. REQUEST_ROUTE, ONREPLY_ROUTE and FAILURE_ROUTE.
  718. </para>
  719. <example>
  720. <title>
  721. <function>dlg_resetflag</function> usage
  722. </title>
  723. <programlisting format="linespecific">
  724. ...
  725. redlg_setflag("1");
  726. ...
  727. </programlisting>
  728. </example>
  729. </section>
  730. <section>
  731. <title>
  732. <function moreinfo="none">dlg_terminate</function>
  733. </title>
  734. <para>
  735. Terminates a dialog. In dialog_ng module this function now
  736. includes support for early as well as confirmed dialogs.
  737. </para>
  738. <para>Meaning of the parameters is as follows:</para>
  739. <itemizedlist>
  740. <listitem>
  741. <para>
  742. <emphasis>side</emphasis> - which side to terminate.
  743. It can be: caller, callee or both of them.
  744. </para>
  745. </listitem>
  746. <listitem>
  747. <para>
  748. <emphasis>reason</emphasis> - reason for termination.
  749. </para>
  750. </listitem>
  751. </itemizedlist>
  752. <para>
  753. This function can be used from BRANCH_ROUTE,
  754. REQUEST_ROUTE, ONREPLY_ROUTE and FAILURE_ROUTE.
  755. </para>
  756. <example>
  757. <title>
  758. <function>dlg_terminate</function> usage
  759. </title>
  760. <programlisting format="linespecific">
  761. ...
  762. dlg_terminate("all", "Insufficient QoS");
  763. ...
  764. </programlisting>
  765. </example>
  766. </section>
  767. <section>
  768. <title>
  769. <function moreinfo="none">dlg_refer(side, address)</function>
  770. </title>
  771. <para>
  772. This function is currently not supported by the dialog_ng module.
  773. To be incorporated in the future.
  774. </para>
  775. </section>
  776. <section>
  777. <title>
  778. <function moreinfo="none">dlg_manage()</function>
  779. </title>
  780. <para>
  781. This has been deprecated in dialog_ng. Instead set dialog flag for
  782. initial INVITE and Route-parameter-callback execution for
  783. within-dialog requests.
  784. </para>
  785. </section>
  786. <section>
  787. <title>
  788. <function moreinfo="none">dlg_bridge(from, to, op)</function>
  789. </title>
  790. <para>
  791. This function is currently not supported by the dialog_ng module.
  792. To be incorporated in the future.
  793. </para>
  794. </section>
  795. <section>
  796. <title>
  797. <function moreinfo="none">dlg_get(callid, ftag, ttag)</function>
  798. </title>
  799. <para>
  800. Search and set current dialog based on Call-ID, From-Tag and To-Tag
  801. parameters.
  802. </para>
  803. <para>Meaning of the parameters is as follows:</para>
  804. <itemizedlist>
  805. <listitem>
  806. <para><emphasis>callid</emphasis> - SIP call-id.
  807. </para>
  808. </listitem>
  809. <listitem>
  810. <para><emphasis>ftag</emphasis> - SIP From tag.
  811. </para>
  812. </listitem>
  813. <listitem>
  814. <para><emphasis>ttag</emphasis> - SIP To tag.
  815. </para>
  816. </listitem>
  817. </itemizedlist>
  818. <para>
  819. This function can be used from BRANCH_ROUTE,
  820. REQUEST_ROUTE, ONREPLY_ROUTE and FAILURE_ROUTE.
  821. </para>
  822. <example>
  823. <title><function>dlg_get</function> usage</title>
  824. <programlisting format="linespecific">
  825. ...
  826. if(dlg_get("abcdef", "123", "456"))
  827. {
  828. dlg_bye("all");
  829. }
  830. ...
  831. </programlisting>
  832. </example>
  833. </section>
  834. <section>
  835. <title>
  836. <function moreinfo="none">is_known_dlg()</function>
  837. </title>
  838. <para>
  839. This function is currently not supported by the dialog_ng module.
  840. To be incorporated in the future.
  841. </para>
  842. </section>
  843. </section>
  844. <section>
  845. <title>Exported statistics</title>
  846. <section>
  847. <title>
  848. <varname>active_dialogs</varname>
  849. </title>
  850. <para>
  851. This function is currently not supported by the dialog_ng module.
  852. To be incorporated in the future.
  853. </para>
  854. </section>
  855. <section>
  856. <title>
  857. <varname>early_dialogs</varname>
  858. </title>
  859. <para>
  860. This function is currently not supported by the dialog_ng module.
  861. To be incorporated in the future.
  862. </para>
  863. </section>
  864. <section>
  865. <title>
  866. <varname>processed_dialogs</varname>
  867. </title>
  868. <para>
  869. This function is currently not supported by the dialog_ng module.
  870. To be incorporated in the future.
  871. </para>
  872. </section>
  873. <section>
  874. <title>
  875. <varname>expired_dialogs</varname>
  876. </title>
  877. <para>
  878. This function is currently not supported by the dialog_ng module.
  879. To be incorporated in the future.
  880. </para>
  881. </section>
  882. <section>
  883. <title>
  884. <varname>failed_dialogs</varname>
  885. </title>
  886. <para>
  887. This function is currently not supported by the dialog_ng module.
  888. To be incorporated in the future.
  889. </para>
  890. </section>
  891. </section>
  892. <section>
  893. <title>MI Commands</title>
  894. <section>
  895. <title>
  896. <varname>dlg_list</varname>
  897. </title>
  898. <para>
  899. Lists the description of a dialog or of all dialogs (calls). If only
  900. one dialogs is to be listed, the dialog identifiers are to be passed
  901. as parameter (callid and fromtag). In dialog_ng module this also now
  902. also lists all dlg_out entries for early dialogs.
  903. </para>
  904. <para>
  905. Name:
  906. <emphasis>dlg_list</emphasis>
  907. </para>
  908. <para>Parameters:</para>
  909. <itemizedlist>
  910. <listitem>
  911. <para>
  912. <emphasis>callid</emphasis> (optional) - callid if a single
  913. dialog to be listed.
  914. </para>
  915. </listitem>
  916. <listitem>
  917. <para>
  918. <emphasis>from_tag</emphasis> (optional, but cannot be present
  919. without the callid parameter) - from tag (as per initial request)
  920. of the dialog to be listed. Note that if the from_tag is not
  921. specified, only dialogs created by a request without a from tag
  922. are matched, which will only occur with broken clients and is
  923. thus a very rare situation.
  924. </para>
  925. </listitem>
  926. </itemizedlist>
  927. <para>
  928. MI FIFO Command Format:
  929. </para>
  930. <programlisting format="linespecific">
  931. :dlg_list:_reply_fifo_file_
  932. _empty_line_
  933. </programlisting>
  934. <programlisting format="linespecific">
  935. :dlg_list:_reply_fifo_file_
  936. [email protected]
  937. AAdfeEFF33
  938. </programlisting>
  939. </section>
  940. <section>
  941. <title>
  942. <varname>dlg_list_ctx</varname>
  943. </title>
  944. <para>
  945. This function is currently not supported by the dialog_ng module.
  946. To be incorporated in the future.
  947. </para>
  948. </section>
  949. <section>
  950. <title>
  951. <varname>dlg_end_dlg</varname>
  952. </title>
  953. <para>
  954. This function is currently not supported by the dialog_ng module.
  955. To be incorporated in the future.
  956. </para>
  957. </section>
  958. <section>
  959. <title>
  960. <varname>dlg_terminate_dlg</varname>
  961. </title>
  962. <para>
  963. Terminates a singe dialog, identified by the call_id, ftag, ttag. In dialog_ng module this
  964. dialog can be terminated in the early or confirmed states.
  965. </para>
  966. <para>
  967. Name:
  968. <emphasis>dlg_terminate_dlg</emphasis>
  969. </para>
  970. <para>Parameters:</para>
  971. <itemizedlist>
  972. <listitem>
  973. <para>
  974. <emphasis>callid</emphasis> - callid of the dialog to be terminated.
  975. </para>
  976. </listitem>
  977. <listitem>
  978. <para>
  979. <emphasis>ftag</emphasis> fromtag of dialog to be terminated.
  980. </para>
  981. </listitem>
  982. <listitem>
  983. <para>
  984. <emphasis>ttag</emphasis> totag of dialog to be terminated.
  985. </para>
  986. </listitem>
  987. </itemizedlist>
  988. <para>
  989. <emphasis>Note: Works for confirmed and early dialogs.</emphasis>
  990. </para>
  991. <para>
  992. MI FIFO Command Format:
  993. </para>
  994. <programlisting format="linespecific">
  995. :dlg_terminate_dlg:_reply_fifo_file_
  996. [email protected]
  997. AAdfeEFF33 ftag-1234 t-tag1234
  998. </programlisting>
  999. </section>
  1000. <section>
  1001. <title>
  1002. <varname>profile_get_size</varname>
  1003. </title>
  1004. <para>
  1005. This function is currently not supported by the dialog_ng module.
  1006. To be incorporated in the future.
  1007. </para>
  1008. </section>
  1009. <section>
  1010. <title>
  1011. <varname>profile_list_dlgs</varname>
  1012. </title>
  1013. <para>
  1014. This function is currently not supported by the dialog_ng module.
  1015. To be incorporated in the future.
  1016. </para>
  1017. </section>
  1018. <section>
  1019. <title>
  1020. <varname>dlg_bridge</varname>
  1021. </title>
  1022. <para>
  1023. This function is currently not supported by the dialog_ng module.
  1024. To be incorporated in the future.
  1025. </para>
  1026. </section>
  1027. </section>
  1028. <section>
  1029. <title>Exported RPC Functions</title>
  1030. <section>
  1031. <title>
  1032. <varname>dlg.list</varname>
  1033. </title>
  1034. <para>
  1035. This function is currently not supported by the dialog_ng module.
  1036. To be incorporated in the future.
  1037. </para>
  1038. </section>
  1039. <section>
  1040. <title>
  1041. <varname>dlg.list_ctx</varname>
  1042. </title>
  1043. <para>
  1044. This function is currently not supported by the dialog_ng module.
  1045. To be incorporated in the future.
  1046. </para>
  1047. </section>
  1048. <section>
  1049. <title>
  1050. <varname>dlg.dlg_list</varname>
  1051. </title>
  1052. <para>
  1053. This function is currently not supported by the dialog_ng module.
  1054. To be incorporated in the future.
  1055. </para>
  1056. </section>
  1057. <section>
  1058. <title>
  1059. <varname>dlg.dlg_list_ctx</varname>
  1060. </title>
  1061. <para>
  1062. This function is currently not supported by the dialog_ng module.
  1063. To be incorporated in the future.
  1064. </para>
  1065. </section>
  1066. <section>
  1067. <title>
  1068. <varname>dlg.end_dlg</varname>
  1069. </title>
  1070. <para>
  1071. This function is currently not supported by the dialog_ng module.
  1072. To be incorporated in the future.
  1073. </para>
  1074. </section>
  1075. <section>
  1076. <title>
  1077. <varname>dlg.profile_get_size</varname>
  1078. </title>
  1079. <para>
  1080. This function is currently not supported by the dialog_ng module.
  1081. To be incorporated in the future.
  1082. </para>
  1083. </section>
  1084. <section>
  1085. <title>
  1086. <varname>dlg.profile_list</varname>
  1087. </title>
  1088. <para>
  1089. This function is currently not supported by the dialog_ng module.
  1090. To be incorporated in the future.
  1091. </para>
  1092. </section>
  1093. <section>
  1094. <title>
  1095. <varname>dlg.bridge_dlg</varname>
  1096. </title>
  1097. <para>
  1098. This function is currently not supported by the dialog_ng module.
  1099. To be incorporated in the future.
  1100. </para>
  1101. </section>
  1102. </section>
  1103. <section>
  1104. <title>Exported pseudo-variables</title>
  1105. <section>
  1106. <title>
  1107. <varname>$DLG_count</varname>
  1108. </title>
  1109. <para>
  1110. This function is currently not supported by the dialog_ng module.
  1111. To be incorporated in the future.
  1112. </para>
  1113. </section>
  1114. <section>
  1115. <title>
  1116. <varname>$DLG_status</varname>
  1117. </title>
  1118. <para>
  1119. This function is currently not supported by the dialog_ng module.
  1120. To be incorporated in the future.
  1121. </para>
  1122. </section>
  1123. <section>
  1124. <title>
  1125. <varname>$DLG_lifetime</varname>
  1126. </title>
  1127. <para>
  1128. This function is currently not supported by the dialog_ng module.
  1129. To be incorporated in the future.
  1130. </para>
  1131. </section>
  1132. <section>
  1133. <title>
  1134. <varname>$dlg(...)</varname>
  1135. </title>
  1136. <para>
  1137. This function is currently not supported by the dialog_ng module.
  1138. To be incorporated in the future.
  1139. </para>
  1140. </section>
  1141. <section>
  1142. <title>
  1143. <varname>$dlg_ctx(...)</varname>
  1144. </title>
  1145. <para>
  1146. This function is currently not supported by the dialog_ng module.
  1147. To be incorporated in the future.
  1148. </para>
  1149. </section>
  1150. <section>
  1151. <title>
  1152. <varname>$dlg_var(key)</varname>
  1153. </title>
  1154. <para>
  1155. This function is currently not supported by the dialog_ng module.
  1156. To be incorporated in the future.
  1157. </para>
  1158. </section>
  1159. </section>
  1160. </chapter>