README 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. pa Module
  2. Jan Janak
  3. FhG FOKUS
  4. Edited by
  5. Jan Janak
  6. Jamey Hicks
  7. Copyright © 2003 FhG FOKUS
  8. _________________________________________________________
  9. Table of Contents
  10. 1. User's Guide
  11. 1.1. Overview
  12. 1.2. Dependencies
  13. 1.2.1. SER Modules
  14. 1.2.2. External Libraries or Applications
  15. 1.3. Exported Parameters
  16. 1.3.1. default_expires (integer)
  17. 1.3.2. default_priority_percentage (integer)
  18. 1.3.3. db_url (string)
  19. 1.3.4. pa_domain (string)
  20. 1.4. Exported Functions
  21. 1.4.1. handle_subscription(domain)
  22. 1.4.2. handle_publish(domain)
  23. 1.4.3. pa_handle_registration(domain)
  24. 2. Developer's Guide
  25. 3. Frequently Asked Questions
  26. List of Examples
  27. 1-1. Set default_expires parameter
  28. 1-2. handle_subscription usage
  29. _________________________________________________________
  30. Chapter 1. User's Guide
  31. 1.1. Overview
  32. This module implements a presence server, i.e. entity that
  33. receives SUBSCRIBE messages and sends NOTIFY when presence
  34. status of a user changes. Currently the presence server can be
  35. connected to registrar and jabber module so SIP users can see
  36. presence of jabber users. This module also acts as a presence
  37. aggregator, receiving PUBLISH messages to update extended status
  38. and generating NOTIFY messages.
  39. This module currently cannot work as a B2BUA, i.e. it cannot
  40. subscribe to presence of users using SIP. We are currently
  41. working on that feature.
  42. _________________________________________________________
  43. 1.2. Dependencies
  44. 1.2.1. SER Modules
  45. The following modules must be loaded before this module:
  46. * No dependencies on other SER modules.
  47. _________________________________________________________
  48. 1.2.2. External Libraries or Applications
  49. The following libraries or applications must be installed
  50. before running SER with this module loaded:
  51. * None.
  52. _________________________________________________________
  53. 1.3. Exported Parameters
  54. 1.3.1. default_expires (integer)
  55. Default expires value to be used when the client doesn't
  56. supply one (in seconds).
  57. Default value is "3600".
  58. Example 1-1. Set default_expires parameter
  59. ...
  60. modparam("pa", "default_expires", 3600)
  61. ...
  62. 1.3.2. default_priority_percentage (integer)
  63. Default priority value to be used when not included in a PUBLISH
  64. message, expressed as a percentage.
  65. Default value is "50".
  66. Example 1-2. Set default_expires parameter
  67. ...
  68. modparam("pa", "default_expires", 50)
  69. ...
  70. 1.3.3. db_url (string)
  71. URL of the database containing presence-agent data.
  72. Example 1-3. Set db_url parameter
  73. ...
  74. modparam("pa", "db_url", "mysql:ser:heslo@localhost/ser")
  75. ...
  76. 1.3.4. pa_domain (string)
  77. Hostname of xcap server associated with presence agent.
  78. Example 1-4. Set default_expires parameter
  79. ...
  80. modparam("pa", "pa_domain", "ser.example.com")
  81. ...
  82. _________________________________________________________
  83. 1.4. Exported Functions
  84. 1.4.1. handle_subscription(domain)
  85. This function processes SUBSCRIBE and generates NOTIFY.
  86. Meaning of the parameters is as follows:
  87. * domain - This can be either "registrar" or "jabber".
  88. Example 1-5. handle_subscription usage
  89. ...
  90. if (method=="SUBSCRIBE") {
  91. if (!t_newtran()) {
  92. log(1, "newtran error\n");
  93. sl_reply_error();
  94. };
  95. handle_subscription("registrar");
  96. break;
  97. };
  98. ...
  99. 1.4.2. handle_publish(domain)
  100. This function processes PUBLISH and generates NOTIFY.
  101. Meaning of the parameters is as follows:
  102. * domain - This can be either "registrar" or "jabber".
  103. Example 1-6. handle_publish usage
  104. ...
  105. if (method=="PUBLISH") {
  106. if (!t_newtran()) {
  107. log(1, "newtran error\n");
  108. sl_reply_error();
  109. };
  110. handle_publish("registrar");
  111. break;
  112. };
  113. ...
  114. 1.4.3. pa_handle_registration(domain)
  115. This function is no longer used.
  116. _________________________________________________________
  117. Chapter 2. Developer's Guide
  118. The module does not provide any sort of API to use in other
  119. SER modules.
  120. _________________________________________________________
  121. Chapter 3. Frequently Asked Questions
  122. 3.1. Where can I find more about SER?
  123. 3.2. Where can I post a question about this module?
  124. 3.3. How can I report a bug?
  125. 3.1. Where can I find more about SER?
  126. Take a look at http://iptel.org/ser.
  127. 3.2. Where can I post a question about this module?
  128. First at all check if your question was already answered on
  129. one of our mailing lists:
  130. * http://mail.iptel.org/mailman/listinfo/serusers
  131. * http://mail.iptel.org/mailman/listinfo/serdev
  132. E-mails regarding any stable version should be sent to
  133. <[email protected]> and e-mail regarding development versions
  134. or CVS snapshots should be send to <[email protected]>.
  135. 3.3. How can I report a bug?
  136. Please follow the guidelines provided at:
  137. http://iptel.org/ser/bugs