THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#289 - app_lua: added sr.xavp.get function
User who did this - Víctor Seva (linuxmaniac)
----------
I forgot to attach the patch :-/
I only push string and integer fields to the stack.
----------
One or more files have been attached.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=289#comment846
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
Module: sip-router
Branch: master
Commit: b57d14afeed443bd3ff847a455c1f07bdca7dd09
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b57d14a…
Author: Torrey Searle <tsearle(a)gmail.com>
Committer: Torrey Searle <tsearle(a)gmail.com>
Date: Tue Apr 23 10:39:01 2013 +0200
modules/sipt forgot to stage the documentation (pvars added)
---
modules/sipt/doc/sipt_admin.xml | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules/sipt/doc/sipt_admin.xml b/modules/sipt/doc/sipt_admin.xml
index 41864e9..dbcad85 100644
--- a/modules/sipt/doc/sipt_admin.xml
+++ b/modules/sipt/doc/sipt_admin.xml
@@ -80,7 +80,7 @@ sipt_set_calling($fU, 4, 0, 3);
<section>
<title><varname>$sipt_presentation</varname></title>
<para>
- Returns the value of the Address presentation restricted indicator contains in the
+ Returns the value of the Address presentation restricted indicator contained in the
Calling Party Number header of the IAM message if it exists.
Returns -1 if there isn't a Calling Party Number header.
</para>
Module: sip-router
Branch: master
Commit: 781b0a68cbf3a9b93bda0ebafb9ae64257c202d3
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=781b0a6…
Author: Torrey Searle <tsearle(a)gmail.com>
Committer: Torrey Searle <tsearle(a)gmail.com>
Date: Tue Apr 23 10:30:11 2013 +0200
modules/sipt refactor get functions into pvars
return value of 0 in a function causes the script to exit, so
pvars are used instead to safely get the values
also getting screening and presentation information added
---
modules/sipt/doc/sipt_admin.xml | 85 +++++++++++++++++++++++-------
modules/sipt/sipt.c | 109 ++++++++++++++++++++++++++-------------
modules/sipt/ss7.h | 2 +
modules/sipt/ss7_parser.c | 22 ++++++++
4 files changed, 163 insertions(+), 55 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=781…
Module: sip-router
Branch: master
Commit: d02ebb2584d2e4f676a9f8c4e0f6095045de86db
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d02ebb2…
Author: Torrey Searle <tsearle(a)gmail.com>
Committer: Torrey Searle <tsearle(a)gmail.com>
Date: Tue Apr 23 10:37:09 2013 +0200
modules/sipt regenerate README with new api
---
modules/sipt/README | 112 +++++++++++++++++++++++++++++++++++++--------------
1 files changed, 81 insertions(+), 31 deletions(-)
diff --git a/modules/sipt/README b/modules/sipt/README
index e10f9d7..3a93928 100644
--- a/modules/sipt/README
+++ b/modules/sipt/README
@@ -18,19 +18,26 @@ Torrey Searle
3.1. sipt_destination(destination, hops, nai)
3.2. sipt_set_calling(origin, nai, presentation, screening)
- 3.3. sipt_get_hop_counter()
- 3.4. sipt_get_cpc()
- 3.5. sipt_get_calling_party_nai()
- 3.6. sipt_get_called_party_nai()
+
+ 4. Exported pseudo-variables
+
+ 4.1. $sipt_presentation
+ 4.2. $sipt_screening
+ 4.3. $sipt_hop_counter
+ 4.4. $sipt_cpc
+ 4.5. $sipt_calling_party_nai
+ 4.6. $sipt_called_party_nai
List of Examples
1.1. sipt_destination(destination, hops, nai) usage
1.2. sipt_set_calling(origin, nai, presentation, screening) usage
- 1.3. sipt_get_hop_counter() usage
- 1.4. sipt_get_cpc() usage
- 1.5. sipt_get_calling_party_nai() usage
- 1.6. sipt_get_called_party_nai() usage
+ 1.3. sipt_presentation pseudo-variable usage
+ 1.4. sipt_screening pseudo-variable usage
+ 1.5. sipt_hop_counter pseudo-variable usage
+ 1.6. sipt_cpc pseudo-variable usage
+ 1.7. sipt_calling_party_nai pseudo-variable usage
+ 1.8. sipt_called_party_nai pseudo-variable usage
Chapter 1. Admin Guide
@@ -42,10 +49,15 @@ Chapter 1. Admin Guide
3.1. sipt_destination(destination, hops, nai)
3.2. sipt_set_calling(origin, nai, presentation, screening)
- 3.3. sipt_get_hop_counter()
- 3.4. sipt_get_cpc()
- 3.5. sipt_get_calling_party_nai()
- 3.6. sipt_get_called_party_nai()
+
+ 4. Exported pseudo-variables
+
+ 4.1. $sipt_presentation
+ 4.2. $sipt_screening
+ 4.3. $sipt_hop_counter
+ 4.4. $sipt_cpc
+ 4.5. $sipt_calling_party_nai
+ 4.6. $sipt_called_party_nai
1. Overview
@@ -65,10 +77,6 @@ Chapter 1. Admin Guide
3.1. sipt_destination(destination, hops, nai)
3.2. sipt_set_calling(origin, nai, presentation, screening)
- 3.3. sipt_get_hop_counter()
- 3.4. sipt_get_cpc()
- 3.5. sipt_get_calling_party_nai()
- 3.6. sipt_get_called_party_nai()
3.1. sipt_destination(destination, hops, nai)
@@ -99,15 +107,60 @@ sipt_destination($rU, 31, 4);
sipt_set_calling($fU, 4, 0, 3);
...
-3.3. sipt_get_hop_counter()
+4. Exported pseudo-variables
+
+ 4.1. $sipt_presentation
+ 4.2. $sipt_screening
+ 4.3. $sipt_hop_counter
+ 4.4. $sipt_cpc
+ 4.5. $sipt_calling_party_nai
+ 4.6. $sipt_called_party_nai
+
+4.1. $sipt_presentation
+
+ Returns the value of the Address presentation restricted indicator
+ contained in the Calling Party Number header of the IAM message if it
+ exists. Returns -1 if there isn't a Calling Party Number header.
+
+ Example 1.3. sipt_presentation pseudo-variable usage
+...
+# add privacy header if restriction is requested
+if($sipt_presentation == 1)
+{
+ append_hf("Privacy: id\r\n");
+ $fn = "Anonymous";
+}
+
+...
+
+4.2. $sipt_screening
+
+ Returns the value of the Screening Indicator contained in the Calling
+ Party Number header of the IAM message if it exists. Returns -1 if
+ there isn't a Calling Party Number header.
+
+ Example 1.4. sipt_screening pseudo-variable usage
+...
+
+# remove P-Asserted-Identity header if the screening isn't verified
+# or network provided
+$avp(s:screening) = $sipt_screening;
+if($avp(s:screening) != 1 && $avp(s:screening) != 3)
+{
+ remove_hf("P-Asserted-Id");
+}
+
+...
+
+4.3. $sipt_hop_counter
Returns the value of the Hop Counter for the IAM message if it exists.
Returns -1 if there isn't a hop counter.
- Example 1.3. sipt_get_hop_counter() usage
+ Example 1.5. sipt_hop_counter pseudo-variable usage
...
# get the hop counter and update the Max-Forwards header if it exists
-$avp(s:hop) = sipt_get_hop_counter();
+$avp(s:hop) = $sipt_hop_counter;
if($avp(s:hop) > 0)
{
remove_hf("Max-Forwards");
@@ -116,46 +169,43 @@ if($avp(s:hop) > 0)
...
-3.4. sipt_get_cpc()
+4.4. $sipt_cpc
Returns the value of the Calling Party Category for the IAM message.
Returns -1 if there is a parsing error.
- Example 1.4. sipt_get_cpc() usage
+ Example 1.6. sipt_cpc pseudo-variable usage
...
# get the Cpc code and set put it in a custom sip header
-$avp(s:cpc) = sipt_get_cpc();
-append_hf("X-CPC: $avp(s:cpc)\r\n");
+append_hf("X-CPC: $sipt_cpc\r\n");
...
-3.5. sipt_get_calling_party_nai()
+4.5. $sipt_calling_party_nai
Returns the value of the Nature of Address Indicator of the Calling
Party for the IAM message. Returns -1 if there is a parsing error or if
the Calling Party Number is not present.
- Example 1.5. sipt_get_calling_party_nai() usage
+ Example 1.7. sipt_calling_party_nai pseudo-variable usage
...
# get the Calling Nai and add country code if national
-$avp(s:from_nai) = sipt_get_calling_party_nai();
-if($avp(s:from_nai) == 3)
+if($sipt_calling_party_nai == 3)
{
$fU = "32" + "$fU";
}
...
-3.6. sipt_get_called_party_nai()
+4.6. $sipt_called_party_nai
Returns the value of the Nature of Address Indicator of the Called
Party for the IAM message. Returns -1 if there is a parsing error.
- Example 1.6. sipt_get_called_party_nai() usage
+ Example 1.8. sipt_called_party_nai pseudo-variable usage
...
# get the Called Nai and add country code if national
-$avp(s:to_nai) = sipt_get_called_party_nai();
-if($avp(s:to_nai) == 3)
+if($sipt_called_party_nai == 3)
{
$rU = "32" + "$rU";
}
Module: sip-router
Branch: tmp/tm_async_reply_support
Commit: dd0fb36831c57fd2ee239344d086c74c412b3bb9
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=dd0fb36…
Author: Richard Good <richard.good(a)smilecoms.com>
Committer: Richard Good <richard.good(a)smilecoms.com>
Date: Tue Apr 23 09:50:05 2013 +0200
Merge branch 'master' into tmp/tm_async_reply_support
tmp/tm_async_reply_support: Merging all latest master commits into tm_async_reply_support branch to ensure we are up to date and not conflicting
---
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#288 - app_lua: added sr.xavp.get_keys function
User who did this - Daniel-Constantin Mierla (miconda)
----------
I suggest to make the list of xavp names null terminated from the core. Because you use two times pkg malloc just to store the same value, ending up in using twice memory at the same moment.
There is no problem to allocate len+1 from core and build the str list with such values.
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=288#comment845
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.