Skip to content

Commit

Permalink
fixed doc avp names
Browse files Browse the repository at this point in the history
  • Loading branch information
razvancrainea committed Dec 3, 2013
1 parent 60dea71 commit 8ce3850
Show file tree
Hide file tree
Showing 26 changed files with 213 additions and 188 deletions.
4 changes: 2 additions & 2 deletions NEWS
Expand Up @@ -50,7 +50,7 @@ What is new in 1.6.0
2.4 Transformations

* added a new nameaddr transformation: param; it extract the value of a certain parameter
o example: avp(i:4) = $(hdr(From){nameaddr.param, tag});
o example: avp(header) = $(hdr(From){nameaddr.param, tag});

2.5 AAA API and enhancement of RADIUS support(NEW)
AAA API
Expand Down Expand Up @@ -201,7 +201,7 @@ important - Renamed as AUTH_AAA module - see the AAA API and module changes.
* example:

modparam("call_control", "init", "call-id=$ci to=$tu from=$fu
authruri=$du another_field = $avp(i:10)")
authruri=$du another_field = $avp(extra)")

* the message sent if one of these parameter is set will be the string resulted after expanding the pvars

Expand Down
2 changes: 1 addition & 1 deletion modules/msilo/README
Expand Up @@ -457,7 +457,7 @@ modparam("msilo", "sc_snd_time", "send_reminder_time")

Example 1.24. Set the “snd_time_avp” parameter
...
modparam("msilo", "snd_time_avp", "$avp(i:123)")
modparam("msilo", "snd_time_avp", "$avp(snd_time_avp)")
...

1.3.25. add_date (int)
Expand Down
2 changes: 1 addition & 1 deletion modules/msilo/doc/msilo_admin.xml
Expand Up @@ -531,7 +531,7 @@ modparam("msilo", "sc_snd_time", "send_reminder_time")
<title>Set the <quote>snd_time_avp</quote> parameter</title>
<programlisting format="linespecific">
...
modparam("msilo", "snd_time_avp", "$avp(i:123)")
modparam("msilo", "snd_time_avp", "$avp(snd_time_avp)")
...
</programlisting>
</example>
Expand Down
2 changes: 1 addition & 1 deletion modules/nathelper/README
Expand Up @@ -198,7 +198,7 @@ Note

Example 1.5. Set received_avp parameter
...
modparam("nathelper", "received_avp", "$avp(i:42)")
modparam("nathelper", "received_avp", "$avp(received_avp)")
...

1.4.6. force_socket (string)
Expand Down
2 changes: 1 addition & 1 deletion modules/nathelper/doc/nathelper_admin.xml
Expand Up @@ -214,7 +214,7 @@ modparam("nathelper", "natping_socket", "192.168.1.1:5006")
<title>Set <varname>received_avp</varname> parameter</title>
<programlisting format="linespecific">
...
modparam("nathelper", "received_avp", "$avp(i:42)")
modparam("nathelper", "received_avp", "$avp(received_avp)")
...
</programlisting>
</example>
Expand Down
2 changes: 1 addition & 1 deletion modules/peering/README
Expand Up @@ -168,7 +168,7 @@ modparam("peering", "verify_source_service_type", 22)
Example 1.4. verify_destination() usage
...
if (verify_destination()) {
append_hf("P-Request-Hash: $avp(i:200)\r\n");
append_hf("P-Request-Hash: $avp(hash)\r\n");
}
...

Expand Down
2 changes: 1 addition & 1 deletion modules/peering/doc/peering_admin.xml
Expand Up @@ -182,7 +182,7 @@ modparam("peering", "verify_source_service_type", 22)
<programlisting format="linespecific">
...
if (verify_destination()) {
append_hf("P-Request-Hash: $avp(i:200)\r\n");
append_hf("P-Request-Hash: $avp(hash)\r\n");
}
...
</programlisting>
Expand Down
35 changes: 17 additions & 18 deletions modules/permissions/README
Expand Up @@ -578,8 +578,8 @@ if (method=="REGISTER") {
if (allow_uri("basename", "$rt")) { // Check Refer-To URI
t_relay();
};
if (allow_uri("basename", "$avp(i:705)") { // Check URI stored in $avp(
i:705)
if (allow_uri("basename", "$avp(basename)") { // Check URI stored in $a
vp(basename)
t_relay();
};
...
Expand Down Expand Up @@ -636,18 +636,17 @@ tocol
test"
// matches the regular expression field in the database table and stores
the
// context information in $avp(i:10)
if (check_address("4","192.168.2.135","5700","$proto","$avp(i:10)", "tex
ttest")) {
// context information in $avp(context)
if (check_address("4","192.168.2.135","5700","$proto","$avp(context)", "
texttest")) {
t_relay();
xlog("$avp(i:10)\n");
xlog("$avp(context)\n");
}

...

// Checks if the tuple IP address/port/protocol of the source message is
in group
// 4 and stores context information in $avp(i:10)
in group 4
if (check_address("4","$si","$sp","$proto")) {
t_relay();
}
Expand All @@ -656,14 +655,14 @@ if (check_address("4","$si","$sp","$proto")) {

// Checks if the tuple IP address/port/protocol stored in AVPs s:ip/s:po
rt/s:proto
// is in group 4 and stores context information in $avp(i:10)
$avp(s:ip) = "192.168.2.135";
$avp(s:port) = 5061;
$avp(s:proto) = "any";
if (check_address("4","$avp(s:ip)","$avp(s:port)","$avp(s:proto)","$avp(
i:10))) {
// is in group 4 and stores context information in $avp(context)
$avp(ip) = "192.168.2.135";
$avp(port) = 5061;
$avp(proto) = "any";
if (check_address("4","$avp(ip)","$avp(port)","$avp(proto)","$avp(contex
t))) {
t_relay();
xlog("$avp(i:10)\n");
xlog("$avp(context)\n");
}

...
Expand Down Expand Up @@ -692,9 +691,9 @@ if (check_address("4","$si","5700","$proto","", "texttest")) {
Example 1.22. check_source_address() usage
...
// Check if source address/port/proto is in group 4 and stores
// context information in $avp(i:9)
if (check_source_address("4","$avp(i:9)")) {
xlog("$avp(i:9)\n");
// context information in $avp(context)
if (check_source_address("4","$avp(context)")) {
xlog("$avp(context)\n");
}else {
sl_send_reply("403", "Forbidden");
}
Expand Down
29 changes: 14 additions & 15 deletions modules/permissions/doc/permissions_admin.xml
Expand Up @@ -773,7 +773,7 @@ if (method=="REGISTER") {
if (allow_uri("basename", "$rt")) { // Check Refer-To URI
t_relay();
};
if (allow_uri("basename", "$avp(i:705)") { // Check URI stored in $avp(i:705)
if (allow_uri("basename", "$avp(basename)") { // Check URI stored in $avp(basename)
t_relay();
};
...
Expand Down Expand Up @@ -867,30 +867,29 @@ if (allow_uri("basename", "$avp(i:705)") { // Check URI stored in $avp(i:705)
// Checks if the tuple IP address/port (given as strings) and source protocol
// (given as pvar), belongs to group 4, verifies if pattern string "texttest"
// matches the regular expression field in the database table and stores the
// context information in $avp(i:10)
if (check_address("4","192.168.2.135","5700","$proto","$avp(i:10)", "texttest")) {
// context information in $avp(context)
if (check_address("4","192.168.2.135","5700","$proto","$avp(context)", "texttest")) {
t_relay();
xlog("$avp(i:10)\n");
xlog("$avp(context)\n");
}

...

// Checks if the tuple IP address/port/protocol of the source message is in group
// 4 and stores context information in $avp(i:10)
// Checks if the tuple IP address/port/protocol of the source message is in group 4
if (check_address("4","$si","$sp","$proto")) {
t_relay();
}

...

// Checks if the tuple IP address/port/protocol stored in AVPs s:ip/s:port/s:proto
// is in group 4 and stores context information in $avp(i:10)
$avp(s:ip) = "192.168.2.135";
$avp(s:port) = 5061;
$avp(s:proto) = "any";
if (check_address("4","$avp(s:ip)","$avp(s:port)","$avp(s:proto)","$avp(i:10))) {
// is in group 4 and stores context information in $avp(context)
$avp(ip) = "192.168.2.135";
$avp(port) = 5061;
$avp(proto) = "any";
if (check_address("4","$avp(ip)","$avp(port)","$avp(proto)","$avp(context))) {
t_relay();
xlog("$avp(i:10)\n");
xlog("$avp(context)\n");
}

...
Expand Down Expand Up @@ -924,9 +923,9 @@ if (check_address("4","$si","5700","$proto","", "texttest")) {
<programlisting format="linespecific">
...
// Check if source address/port/proto is in group 4 and stores
// context information in $avp(i:9)
if (check_source_address("4","$avp(i:9)")) {
xlog("$avp(i:9)\n");
// context information in $avp(context)
if (check_source_address("4","$avp(context)")) {
xlog("$avp(context)\n");
}else {
sl_send_reply("403", "Forbidden");
}
Expand Down
87 changes: 57 additions & 30 deletions modules/pua_dialoginfo/README
Expand Up @@ -2,29 +2,21 @@ pua dialoginfo

Anca-Maria Vamanu

voice-system.ro

Edited by

Anca-Maria Vamanu

Klaus Darilion

IPCom (Module implementation was partly sponsored by Silver
Server (www.sil.at))

Edited by

Klaus Darilion

IPCom

Copyright © 2006 voice-system.ro
Copyright © 2006 Voice Sistem SRL

Copyright © 2008 Klaus Darilion IPCom
Revision History
Revision $Revision$ $Date: 2009-07-21 10:45:05 +0300
(Tue, 21 Jul 2009) $
Revision $Revision: 8740 $ $Date$
__________________________________________________________

Table of Contents
Expand All @@ -43,10 +35,12 @@ Klaus Darilion
1.3.2. include_tags (int)
1.3.3. include_localremote (int)
1.3.4. caller_confirmed (int)
1.3.5. presence_server (string)
1.3.6. caller_spec_param (string)
1.3.7. callee_spec_param (string)
1.3.8. osips_ps (int)
1.3.5. publish_on_trying (int)
1.3.6. nopublish_flag (int)
1.3.7. presence_server (string)
1.3.8. caller_spec_param (string)
1.3.9. callee_spec_param (string)
1.3.10. osips_ps (int)

1.4. Exported Functions

Expand All @@ -58,11 +52,13 @@ Klaus Darilion
1.2. Set include_tags parameter
1.3. Set include_localremote parameter
1.4. Set caller_confirmed parameter
1.5. Set presence_server parameter
1.6. Set caller_spec_param parameter
1.7. Set caller_spec_param parameter
1.8. Set osips_ps parameter
1.9. dialoginfo_set usage
1.5. Set publish_on_trying parameter
1.6. Set nopublish_flag parameter
1.7. Set presence_server parameter
1.8. Set caller_spec_param parameter
1.9. Set caller_spec_param parameter
1.10. Set osips_ps parameter
1.11. dialoginfo_set usage

Chapter 1. Admin Guide

Expand Down Expand Up @@ -293,18 +289,49 @@ modparam("pua_dialoginfo", "include_localremote", 0)
modparam("pua_dialoginfo", "caller_confirmed", 1)
...

1.3.5. presence_server (string)
1.3.5. publish_on_trying (int)

Usually the dialog-info of the caller will be "trying -> early
-> confirmed". "trying" will be triggered as soon as you call
dialoginfo_set on the caller, while "early" is triggered as
soon as the callee is ringing. Sometimes, it is advisable to be
notified only when the callee reaches the early state and not
before. In other cases, it is advisable to notify the early
state. This setting allows controlling the behavior.

Default value is “0”.

Example 1.5. Set publish_on_trying parameter
...
modparam("pua_dialoginfo", "publish_on_trying", 1)
...

1.3.6. nopublish_flag (int)

By default, reINVITEs will trigger a PUBLISH. They are actually
the only in-dialog request for which it makes sense. In some
cases, it does not make sense to republish a dialog state.
(e.g. when handling a B2BUA reINVITE). This setting defines the
flag that needs to be set in the request route to prevent the
generation of a PUBLISH request in case of a specific reINVITE.

Example 1.6. Set nopublish_flag parameter
...
modparam("pua_dialoginfo", "nopublish_flag", 5)
...

1.3.7. presence_server (string)

The address of the presence server, where the PUBLISH messages
should be sent (not compulsory).

Example 1.5. Set presence_server parameter
Example 1.7. Set presence_server parameter
...
modparam("pua_dialoginfo", "presence_server", "sip:ps@opensips.org:5060"
)
...

1.3.6. caller_spec_param (string)
1.3.8. caller_spec_param (string)

The name of the pseudovariable that will hold a custom caller
URI. If this variable is not set, the information in From
Expand All @@ -314,25 +341,25 @@ modparam("pua_dialoginfo", "presence_server", "sip:ps@opensips.org:5060"
the format of To/From SIP headers: "display_name<sip_uri>" or
"sip_uri".

Example 1.6. Set caller_spec_param parameter
Example 1.8. Set caller_spec_param parameter
...
modparam("pua_dialoginfo", "caller_spec_param", "$avp(i:10)")
modparam("pua_dialoginfo", "caller_spec_param", "$avp(caller)")
...

1.3.7. callee_spec_param (string)
1.3.9. callee_spec_param (string)

The name of the pseudovariable that will hold the callee URI.
If this variable will not be set, the callee information used
will be made of To display uri + RURI. the. The format of the
string to set this pseudovariable to is the same as described
in caller_spec_param section.

Example 1.7. Set caller_spec_param parameter
Example 1.9. Set caller_spec_param parameter
...
modparam("pua_dialoginfo", "callee_spec_param", "$avp(i:11)")
modparam("pua_dialoginfo", "callee_spec_param", "$avp(callee)")
...

1.3.8. osips_ps (int)
1.3.10. osips_ps (int)

It is advisable to specify if you use a different presence
server than OpenSIPS presence server, by setting this parameter
Expand All @@ -343,7 +370,7 @@ modparam("pua_dialoginfo", "callee_spec_param", "$avp(i:11)")

Default value is “1”.

Example 1.8. Set osips_ps parameter
Example 1.10. Set osips_ps parameter
...
modparam("pua_dialoginfo", "osips_ps", 0)
...
Expand All @@ -360,7 +387,7 @@ modparam("pua_dialoginfo", "osips_ps", 0)
* side (optional) - can be "A" or "B" for caller or callee
PUBLISH only - if missing, both sides will be published.

Example 1.9. dialoginfo_set usage
Example 1.11. dialoginfo_set usage
...
if(is_method("INVITE"))
if(uri =~ "opensips.org")
Expand Down
4 changes: 2 additions & 2 deletions modules/pua_dialoginfo/doc/pua_dialoginfo_admin.xml
Expand Up @@ -368,7 +368,7 @@ modparam("pua_dialoginfo", "presence_server", "sip:ps@opensips.org:5060")
<title>Set <varname>caller_spec_param</varname> parameter</title>
<programlisting format="linespecific">
...
modparam("pua_dialoginfo", "caller_spec_param", "$avp(i:10)")
modparam("pua_dialoginfo", "caller_spec_param", "$avp(caller)")
...
</programlisting>
</example>
Expand All @@ -387,7 +387,7 @@ modparam("pua_dialoginfo", "caller_spec_param", "$avp(i:10)")
<title>Set <varname>caller_spec_param</varname> parameter</title>
<programlisting format="linespecific">
...
modparam("pua_dialoginfo", "callee_spec_param", "$avp(i:11)")
modparam("pua_dialoginfo", "callee_spec_param", "$avp(callee)")
...
</programlisting>
</example>
Expand Down

0 comments on commit 8ce3850

Please sign in to comment.