Module: sip-router
Branch: master
Commit: d4eb2e661ad72d0a6b70aea853e428608e80ab2b
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d4eb2e6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sat Feb 26 22:26:29 2011 +0100
siputils: documented new functions
- readme updated with is_request() and is_reply()
---
modules_k/siputils/README | 34 +++++++++++++++++++++++
modules_k/siputils/doc/siputils_admin.xml | 42 +++++++++++++++++++++++++++++
2 files changed, 76 insertions(+), 0 deletions(-)
diff --git a/modules_k/siputils/README b/modules_k/siputils/README
index 23ccd30..b217f7b 100644
--- a/modules_k/siputils/README
+++ b/modules_k/siputils/README
@@ -91,6 +91,8 @@ Gabriel Vasile
4.18. append_rpid_hf(prefix, suffix)
4.19. is_rpid_user_e164()
4.20. set_uri_user(uri, user)
+ 4.21. is_request()
+ 4.22. is_reply()
List of Examples
@@ -123,6 +125,8 @@ Gabriel Vasile
1.27. append_rpid_hf(prefix, suffix) usage
1.28. is_rpid_user_e164 usage
1.29. set_uri_user usage
+ 1.30. is_request usage
+ 1.31. is_reply usage
Chapter 1. Admin Guide
@@ -168,6 +172,8 @@ Chapter 1. Admin Guide
4.18. append_rpid_hf(prefix, suffix)
4.19. is_rpid_user_e164()
4.20. set_uri_user(uri, user)
+ 4.21. is_request()
+ 4.22. is_reply()
1. Overview
@@ -362,6 +368,8 @@ modparam("auth", "rpid_avp",
"$avp(myrpid)")
4.18. append_rpid_hf(prefix, suffix)
4.19. is_rpid_user_e164()
4.20. set_uri_user(uri, user)
+ 4.21. is_request()
+ 4.22. is_reply()
4.1. ring_insert_callid()
@@ -731,3 +739,29 @@ $var(uri) = "sip:user@host";
$var(user) = "new_user";
set_uri_user("$var(uri)", "$var(user)");
...
+
+4.21. is_request()
+
+ Return true if the SIP message is a request.
+
+ This function can be used from ANY_ROUTE.
+
+ Example 1.30. is_request usage
+...
+if (is_request()) {
+ ...
+}
+...
+
+4.22. is_reply()
+
+ Return true if the SIP message is a reply.
+
+ This function can be used from ANY_ROUTE.
+
+ Example 1.31. is_reply usage
+...
+if (is_reply()) {
+ ...
+}
+...
diff --git a/modules_k/siputils/doc/siputils_admin.xml
b/modules_k/siputils/doc/siputils_admin.xml
index fd8ec1d..7950392 100644
--- a/modules_k/siputils/doc/siputils_admin.xml
+++ b/modules_k/siputils/doc/siputils_admin.xml
@@ -860,6 +860,48 @@ set_uri_user("$var(uri)", "$var(user)");
</programlisting>
</example>
</section>
+ <section>
+ <title>
+ <function moreinfo="none">is_request()</function>
+ </title>
+ <para>
+ Return true if the SIP message is a request.
+ </para>
+ <para>
+ This function can be used from ANY_ROUTE.
+ </para>
+ <example>
+ <title><function>is_request</function> usage</title>
+ <programlisting format="linespecific">
+...
+if (is_request()) {
+ ...
+}
+...
+</programlisting>
+ </example>
+ </section>
+ <section>
+ <title>
+ <function moreinfo="none">is_reply()</function>
+ </title>
+ <para>
+ Return true if the SIP message is a reply.
+ </para>
+ <para>
+ This function can be used from ANY_ROUTE.
+ </para>
+ <example>
+ <title><function>is_reply</function> usage</title>
+ <programlisting format="linespecific">
+...
+if (is_reply()) {
+ ...
+}
+...
+</programlisting>
+ </example>
+ </section>
</section>
</chapter>