exec.xml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
  4. <section id="exec" xmlns:xi="http://www.w3.org/2001/XInclude">
  5. <sectioninfo>
  6. <authorgroup>
  7. <author>
  8. <firstname>Jiri</firstname>
  9. <surname>Kuthan</surname>
  10. <affiliation><orgname>FhG FOKUS</orgname></affiliation>
  11. <address>
  12. <email>[email protected]</email>
  13. </address>
  14. </author>
  15. </authorgroup>
  16. <copyright>
  17. <year>2003</year>
  18. <holder>FhG FOKUS</holder>
  19. </copyright>
  20. </sectioninfo>
  21. <title>Exec Module</title>
  22. <section id="exec.overview">
  23. <title>Overview</title>
  24. <para>
  25. Exec module allows to start an external command from a ser
  26. script. The commands may be any valid shell commands, the command
  27. string is passed to shell using "popen" command. ser
  28. passes additionally lot of information about request in environment
  29. variables:
  30. </para>
  31. <itemizedlist>
  32. <listitem>
  33. <para>
  34. SIP_HF_&lt;hf_name&gt; contains value of each header field
  35. in request. If a header field occurred multiple times,
  36. values are concatenated and
  37. comma-separated. &lt;hf_name&gt; is in capital letters. Ff
  38. a header-field name occurred in compact form,
  39. &lt;hf_name&gt; is canonical.
  40. </para>
  41. </listitem>
  42. <listitem>
  43. <para>
  44. SIP_TID is transaction identifier. All request
  45. retransmissions or CANCELs/ACKs associated with a previous
  46. INVITE result in the same value.
  47. </para>
  48. </listitem>
  49. <listitem>
  50. <para>
  51. SIP_DID is dialog identifier, which is the same as
  52. to-tag. Initially, it is empty.
  53. </para>
  54. </listitem>
  55. <listitem>
  56. <para>
  57. SIP_SRCIP is source IP address from which request came.
  58. </para>
  59. </listitem>
  60. <listitem>
  61. <para>
  62. SIP_ORURI is original Request-URI.
  63. </para>
  64. </listitem>
  65. <listitem>
  66. <para>
  67. SIP_RURI is <emphasis>current</emphasis> Request-URI (if unchanged, equal to original).
  68. </para>
  69. </listitem>
  70. <listitem>
  71. <para>
  72. SIP_USER is userpart of <emphasis>current</emphasis> Request-URI.
  73. </para>
  74. </listitem>
  75. <listitem>
  76. <para>
  77. SIP_OUSER is userpart of original Request-URI.
  78. </para>
  79. </listitem>
  80. </itemizedlist>
  81. </section>
  82. <xi:include href="params.xml"/>
  83. <xi:include href="functions.xml"/>
  84. <section id="known_issues">
  85. <title>Known Issues</title>
  86. <para>
  87. There is currently no guarantee that scripts ever return and stop
  88. blocking SIP server. (There is <filename>kill.c</filename> but it
  89. is not used along with the current mechanisms based on popen.
  90. Besides that <filename>kill.c</filename> is ugly).
  91. </para>
  92. </section>
  93. </section>