dialog_devel.xml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  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 Developer's Guide -->
  9. <chapter>
  10. <title>&develguide;</title>
  11. <section>
  12. <title>Available Functions</title>
  13. <section>
  14. <title>
  15. <function moreinfo="none">register_dlgcb (dialog, type, cb, param, free_param_cb)</function>
  16. </title>
  17. <para>
  18. Register a new callback to the dialog.
  19. </para>
  20. <para>Meaning of the parameters is as follows:</para>
  21. <itemizedlist>
  22. <listitem>
  23. <para><emphasis>struct dlg_cell* dlg</emphasis> - dialog to
  24. register callback to. If maybe NULL only for DLGCB_CREATED callback
  25. type, which is not a per dialog type.
  26. </para>
  27. </listitem>
  28. <listitem>
  29. <para><emphasis>int type</emphasis> - types of callbacks; more
  30. types may be register for the same callback function; only
  31. DLGCB_CREATED must be register alone. Possible types:
  32. <itemizedlist>
  33. <listitem>
  34. <para><emphasis>DLGCB_LOADED</emphasis>
  35. </para>
  36. </listitem>
  37. <listitem>
  38. <para><emphasis>DLGCB_CREATED</emphasis> - called when a new
  39. dialog is created - it's a global type (not associated to
  40. any dialog)
  41. </para>
  42. </listitem>
  43. <listitem>
  44. <para><emphasis>DLGCB_FAILED</emphasis> - called when the dialog
  45. was negatively replied (non-2xx) - it's a per dialog type.
  46. </para>
  47. </listitem>
  48. <listitem>
  49. <para><emphasis>DLGCB_CONFIRMED_NA</emphasis> - called when the
  50. dialog is confirmed (2xx replied) but the setup-concluding ACK
  51. message from the caller is yet pending - it's a per dialog type.
  52. </para>
  53. </listitem>
  54. <listitem>
  55. <para><emphasis>DLGCB_CONFIRMED</emphasis> - called when the
  56. dialog is confirmed (2xx replied) and the setup-concluding ACK
  57. message from the caller has been seen - it's a per dialog type.
  58. </para>
  59. </listitem>
  60. <listitem>
  61. <para><emphasis>DLGCB_REQ_WITHIN</emphasis> - called when the
  62. dialog matches a sequential request (excluding setup-concluding
  63. ACK messages which are handled in DLGCB_CONFIRMED) - it's a per
  64. dialog type.
  65. </para>
  66. </listitem>
  67. <listitem>
  68. <para><emphasis>DLGCB_TERMINATED</emphasis> - called when the
  69. dialog is terminated via BYE - it's a per dialog type.
  70. </para>
  71. </listitem>
  72. <listitem>
  73. <para><emphasis>DLGCB_TERMINATED_CONFIRMED</emphasis> -
  74. called when response to a BYE request is received - it's a
  75. per dialog type.
  76. </para>
  77. </listitem>
  78. <listitem>
  79. <para><emphasis>DLGCB_EXPIRED</emphasis> - called when the
  80. dialog expires without receiving a BYE - it's a per dialog
  81. type.
  82. </para>
  83. </listitem>
  84. <listitem>
  85. <para><emphasis>DLGCB_EARLY</emphasis> - called when the
  86. dialog is created in an early state (18x replied) - it's
  87. a per dialog type.
  88. </para>
  89. </listitem>
  90. <listitem>
  91. <para><emphasis>DLGCB_RESPONSE_FWDED</emphasis> - called when
  92. the dialog matches a reply to the initial INVITE request - it's
  93. a per dialog type.
  94. </para>
  95. </listitem>
  96. <listitem>
  97. <para><emphasis>DLGCB_RESPONSE_WITHIN</emphasis> - called when
  98. the dialog matches a reply to a subsequent in dialog request
  99. - it's a per dialog type.
  100. </para>
  101. </listitem>
  102. <listitem>
  103. <para><emphasis>DLGCB_MI_CONTEXT</emphasis> - called when the
  104. mi dlg_list_ctx command is invoked - it's a per dialog type.
  105. </para>
  106. </listitem>
  107. <listitem>
  108. <para><emphasis>DLGCB_SPIRALED</emphasis> - called when the
  109. dialog matches a spiraling request - it's a per dialog type.
  110. </para>
  111. </listitem>
  112. <listitem>
  113. <para><emphasis>DLGCB_DESTROY</emphasis>
  114. </para>
  115. </listitem>
  116. </itemizedlist>
  117. </para>
  118. </listitem>
  119. <listitem>
  120. <para><emphasis>dialog_cb cb</emphasis> - callback function to be
  121. called. Prototype is: <quote>void (dialog_cb)
  122. (struct dlg_cell* dlg, int type, struct dlg_cb_params * params);
  123. </quote>
  124. </para>
  125. </listitem>
  126. <listitem>
  127. <para><emphasis>void *param</emphasis> - parameter to be passed to
  128. the callback function.
  129. </para>
  130. </listitem>
  131. <listitem>
  132. <para><emphasis>param_free callback_param_free</emphasis> -
  133. callback function to be called to free the param.
  134. Prototype is: <quote>void (param_free_cb) (void *param);</quote>
  135. </para>
  136. </listitem>
  137. </itemizedlist>
  138. </section>
  139. <section>
  140. <title>
  141. <function moreinfo="none">terminate_dlg (dlg, hdrs)</function>
  142. </title>
  143. <para>
  144. Terminate a Dialog
  145. </para>
  146. <para>Meaning of parameters is as follows:</para>
  147. <itemizedlist>
  148. <listitem>
  149. <para><emphasis>struct dlg_cell* dlg</emphasis> - dialog to
  150. terminate.
  151. </para>
  152. </listitem>
  153. <listitem>
  154. <para><emphasis>str* hdrs</emphasis> - string containg extra headers (full format)
  155. to be added to the BYE requests of the dialog.
  156. </para>
  157. </listitem>
  158. </itemizedlist>
  159. </section>
  160. </section>
  161. </chapter>