Module: sip-router Branch: master Commit: 7f532c2994a824c33c2e9e2348a10df734c1d3a7 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7f532c29...
Author: Olle E. Johansson oej@edvina.net Committer: Olle E. Johansson oej@edvina.net Date: Thu Dec 20 20:59:59 2012 +0100
sl Minor README updates (file name changes)
---
modules/sl/README | 154 ++++++++++---------- modules/sl/doc/sl.xml | 16 +- modules/sl/doc/{functions.xml => sl_functions.xml} | 0 modules/sl/doc/{params.xml => sl_params.xml} | 0 modules/sl/doc/{stats.xml => sl_stats.xml} | 0 5 files changed, 86 insertions(+), 84 deletions(-)
diff --git a/modules/sl/README b/modules/sl/README index 03f8d26..9d5b29c 100644 --- a/modules/sl/README +++ b/modules/sl/README @@ -1,4 +1,4 @@ -1. SL Module +The SL Module - Statless request handling
Bogdan Iancu
@@ -11,47 +11,16 @@ Daniel-Constantin Mierla Copyright � 2003 FhG FOKUS __________________________________________________________________
- 1.1. Overview - 1.2. Parameters - - 1.2.1. default_code (int) - 1.2.2. default_reason (str) - 1.2.3. bind_tm (int) - - 1.3. Functions - - 1.3.1. sl_send_reply(code, reason) - 1.3.2. send_reply(code, reason) - 1.3.3. sl_reply_error() - - 1.4. Statistics - - 1.4.1. 1xx_replies - 1.4.2. 200_replies - 1.4.3. 202_replies - 1.4.4. 2xx_replies - 1.4.5. 300_replies - 1.4.6. 301_replies - 1.4.7. 302_replies - 1.4.8. 3xx_replies - 1.4.9. 400_replies - 1.4.10. 401_replies - 1.4.11. 403_replies - 1.4.12. 404_replies - 1.4.13. 407_replies - 1.4.14. 408_replies - 1.4.15. 483_replies - 1.4.16. 4xx_replies - 1.4.17. 500_replies - 1.4.18. 5xx_replies - 1.4.19. 6xx_replies - 1.4.20. xxx_replies - 1.4.21. sent_replies - 1.4.22. sent_err_replies - 1.4.23. failures - 1.4.24. received_ACKs - -1.1. Overview + List of Examples + + 1. default_code example + 2. default_reason example + 3. bind_tm example + 4. sl_send_reply usage + 5. send_reply usage + 6. sl_reply_error usage + +1. Overview
The SL module allows the SIP server to act as a stateless UA server and generate replies to SIP requests without keeping state. That is @@ -78,9 +47,13 @@ Daniel-Constantin Mierla be mirrored in ACK. SER will not see its signature and forward the ACK downstream. Caused harm is not bad--just a useless ACK is forwarded.
-1.2. Parameters +2. Parameters + + 2.1. default_code (int) + 2.2. default_reason (str) + 2.3. bind_tm (int)
-1.2.1. default_code (int) +2.1. default_code (int)
Default reply status code.
@@ -91,7 +64,7 @@ Daniel-Constantin Mierla modparam("sl", "default_code", 505) ...
-1.2.2. default_reason (str) +2.2. default_reason (str)
Default reply reason phrase.
@@ -102,7 +75,7 @@ modparam("sl", "default_code", 505) modparam("sl", "default_reason", "Server Error") ...
-1.2.3. bind_tm (int) +2.3. bind_tm (int)
Controls if SL module should attempt to bind to TM module in order to send stateful reply when the transaction is created. @@ -114,9 +87,13 @@ modparam("sl", "default_reason", "Server Error") modparam("sl", "bind_tm", 0) # feature disabled ...
-1.3. Functions +3. Functions
-1.3.1. sl_send_reply(code, reason) + 3.1. sl_send_reply(code, reason) + 3.2. send_reply(code, reason) + 3.3. sl_reply_error() + +3.1. sl_send_reply(code, reason)
For the current request, a reply is sent back having the given code and text reason. The reply is sent stateless, totally independent of the @@ -131,7 +108,7 @@ modparam("sl", "bind_tm", 0) # feature disabled sl_send_reply("404", "Not found"); ...
-1.3.2. send_reply(code, reason) +3.2. send_reply(code, reason)
For the current request, a reply is sent back having the given code and text reason. The reply is sent stateful or stateless, depending of the @@ -152,7 +129,7 @@ send_reply("404", "Not found"); send_reply("403", "Invalid user - $fU"); ...
-1.3.3. sl_reply_error() +3.3. sl_reply_error()
Sends back an error reply describing the nature of the last internal error. Usually this function should be used after a script function @@ -163,100 +140,125 @@ send_reply("403", "Invalid user - $fU"); sl_reply_error(); ...
-1.4. Statistics - -1.4.1. 1xx_replies +4. Statistics + + 4.1. 1xx_replies + 4.2. 200_replies + 4.3. 202_replies + 4.4. 2xx_replies + 4.5. 300_replies + 4.6. 301_replies + 4.7. 302_replies + 4.8. 3xx_replies + 4.9. 400_replies + 4.10. 401_replies + 4.11. 403_replies + 4.12. 404_replies + 4.13. 407_replies + 4.14. 408_replies + 4.15. 483_replies + 4.16. 4xx_replies + 4.17. 500_replies + 4.18. 5xx_replies + 4.19. 6xx_replies + 4.20. xxx_replies + 4.21. sent_replies + 4.22. sent_err_replies + 4.23. failures + 4.24. received_ACKs + +4.1. 1xx_replies
Number of 1xx replies.
-1.4.2. 200_replies +4.2. 200_replies
Number of 201 replies.
-1.4.3. 202_replies +4.3. 202_replies
Number of 202 replies.
-1.4.4. 2xx_replies +4.4. 2xx_replies
Number of 2xx replies.
-1.4.5. 300_replies +4.5. 300_replies
Number of 300 replies.
-1.4.6. 301_replies +4.6. 301_replies
Number of 301 replies.
-1.4.7. 302_replies +4.7. 302_replies
Number of 302 replies.
-1.4.8. 3xx_replies +4.8. 3xx_replies
Number of 3xx replies.
-1.4.9. 400_replies +4.9. 400_replies
Number of 400 replies.
-1.4.10. 401_replies +4.10. 401_replies
Number of 401 replies.
-1.4.11. 403_replies +4.11. 403_replies
Number of 403 replies.
-1.4.12. 404_replies +4.12. 404_replies
Number of 404 replies.
-1.4.13. 407_replies +4.13. 407_replies
Number of 407 replies.
-1.4.14. 408_replies +4.14. 408_replies
Number of 408 replies.
-1.4.15. 483_replies +4.15. 483_replies
Number of 483 replies.
-1.4.16. 4xx_replies +4.16. 4xx_replies
Number of 4xx replies.
-1.4.17. 500_replies +4.17. 500_replies
Number of 500 replies.
-1.4.18. 5xx_replies +4.18. 5xx_replies
Number of 5xx replies.
-1.4.19. 6xx_replies +4.19. 6xx_replies
Number of 6xx replies.
-1.4.20. xxx_replies +4.20. xxx_replies
Number of replies whose code don't match any above.
-1.4.21. sent_replies +4.21. sent_replies
Number of all sent replies.
-1.4.22. sent_err_replies +4.22. sent_err_replies
Number of sent error replies.
-1.4.23. failures +4.23. failures
Number of failures.
-1.4.24. received_ACKs +4.24. received_ACKs
Number of received ACKs filtered by SL module. diff --git a/modules/sl/doc/sl.xml b/modules/sl/doc/sl.xml index 4b5a402..e560858 100644 --- a/modules/sl/doc/sl.xml +++ b/modules/sl/doc/sl.xml @@ -2,8 +2,9 @@ <!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<section id="sl" xmlns:xi="http://www.w3.org/2001/XInclude"> - <sectioninfo> +<book id="sl" xmlns:xi="http://www.w3.org/2001/XInclude"> + <bookinfo> + <title>The SL Module - Statless request handling</title> <authorgroup> <author> <firstname>Bogdan</firstname> @@ -26,9 +27,8 @@ <year>2003</year> <holder>FhG FOKUS</holder> </copyright> - </sectioninfo> + </bookinfo>
- <title>SL Module</title>
<section id="sl.overview"> <title>Overview</title> @@ -66,8 +66,8 @@
</section>
- <xi:include href="params.xml"/> - <xi:include href="functions.xml"/> - <xi:include href="stats.xml"/> + <xi:include href="sl_params.xml"/> + <xi:include href="sl_functions.xml"/> + <xi:include href="sl_stats.xml"/>
-</section> +</book> diff --git a/modules/sl/doc/functions.xml b/modules/sl/doc/sl_functions.xml similarity index 100% rename from modules/sl/doc/functions.xml rename to modules/sl/doc/sl_functions.xml diff --git a/modules/sl/doc/params.xml b/modules/sl/doc/sl_params.xml similarity index 100% rename from modules/sl/doc/params.xml rename to modules/sl/doc/sl_params.xml diff --git a/modules/sl/doc/stats.xml b/modules/sl/doc/sl_stats.xml similarity index 100% rename from modules/sl/doc/stats.xml rename to modules/sl/doc/sl_stats.xml
Hello,
On 12/20/12 9:00 PM, Olle E. Johansson wrote:
sl Minor README updates (file name changes)
modules/sl/README | 154 ++++++++++---------- modules/sl/doc/sl.xml | 16 +- modules/sl/doc/{functions.xml => sl_functions.xml} | 0 modules/sl/doc/{params.xml => sl_params.xml} | 0 modules/sl/doc/{stats.xml => sl_stats.xml} | 0
is this rename necessary for some reason? I see you started doing it to many modules.
The point is that it breaks the script that generates the alphabetic indexes.
Cheers, Daniel
20 dec 2012 kl. 21:07 skrev Daniel-Constantin Mierla miconda@gmail.com:
Hello,
On 12/20/12 9:00 PM, Olle E. Johansson wrote:
sl Minor README updates (file name changes)
modules/sl/README | 154 ++++++++++---------- modules/sl/doc/sl.xml | 16 +- modules/sl/doc/{functions.xml => sl_functions.xml} | 0 modules/sl/doc/{params.xml => sl_params.xml} | 0 modules/sl/doc/{stats.xml => sl_stats.xml} | 0
is this rename necessary for some reason? I see you started doing it to many modules.
The point is that it breaks the script that generates the alphabetic indexes.
Ouch. Different modules seems to have different naming and XML formatting ideas
Another reason is that I want to aggregate the files and produce a combined documentation set and the way I have been playing with doesn't work with the same file names - like "params.xml" for multiple modules. Since many modules had modname_params.xml I decided to start moving the xml file names to a standard way.
Sorry for causing trouble.
Where's the script that generates the alphabetic indexes? Is it in /docbook/scripts ?
/O
On 12/20/12 9:14 PM, Olle E. Johansson wrote:
20 dec 2012 kl. 21:07 skrev Daniel-Constantin Mierla miconda@gmail.com:
Hello,
On 12/20/12 9:00 PM, Olle E. Johansson wrote:
sl Minor README updates (file name changes)
modules/sl/README | 154 ++++++++++---------- modules/sl/doc/sl.xml | 16 +- modules/sl/doc/{functions.xml => sl_functions.xml} | 0 modules/sl/doc/{params.xml => sl_params.xml} | 0 modules/sl/doc/{stats.xml => sl_stats.xml} | 0
is this rename necessary for some reason? I see you started doing it to many modules.
The point is that it breaks the script that generates the alphabetic indexes.
Ouch. Different modules seems to have different naming and XML formatting ideas
The name patterns were two so far (I normalized them when I built the indexing script):
1) old kamailio style: modname.xml, modname_admin.xml, modname_devel.xml and modname_faq.xml. The first two are most common, modname.xml with the header, modname_admin.xml with top description, functions/params/mi cmds/etc.. usable from config
2) old ser style: modname.xml, functions.xml, params.xml, etc... Each file contains parts of what is modname_admin.xml in kamailio style
Another reason is that I want to aggregate the files and produce a combined documentation set and the way I have been playing with doesn't work with the same file names - like "params.xml" for multiple modules. Since many modules had modname_params.xml
I don't recall modname_params.xml being used so far (modules/ and modules_k/ were indexed so far for sure), which modules had it?
I decided to start moving the xml file names to a standard way.
At the end I wouldn't be against of having a (new) 'standard' way, but it has to be defined with some clear patterns/rules, because what you started to use as new name was not a 'standard' pattern so far.
Sorry for causing trouble.
Where's the script that generates the alphabetic indexes? Is it in /docbook/scripts ?
It's on my computer, had no time to make it ready for pushing it out, i'll try to find some time for it. It is used to generate indexes (in dokuwiki format) published at:
http://www.kamailio.org/wiki/#alphabetic_indexes
IIRC, Henning had a different one for old openser/kamailio style.
Cheers, Daniel
20 dec 2012 kl. 21:53 skrev Daniel-Constantin Mierla miconda@gmail.com:
On 12/20/12 9:14 PM, Olle E. Johansson wrote:
20 dec 2012 kl. 21:07 skrev Daniel-Constantin Mierla miconda@gmail.com:
Hello,
On 12/20/12 9:00 PM, Olle E. Johansson wrote:
sl Minor README updates (file name changes)
modules/sl/README | 154 ++++++++++---------- modules/sl/doc/sl.xml | 16 +- modules/sl/doc/{functions.xml => sl_functions.xml} | 0 modules/sl/doc/{params.xml => sl_params.xml} | 0 modules/sl/doc/{stats.xml => sl_stats.xml} | 0
is this rename necessary for some reason? I see you started doing it to many modules.
The point is that it breaks the script that generates the alphabetic indexes.
Ouch. Different modules seems to have different naming and XML formatting ideas
The name patterns were two so far (I normalized them when I built the indexing script):
old kamailio style: modname.xml, modname_admin.xml, modname_devel.xml and modname_faq.xml. The first two are most common, modname.xml with the header, modname_admin.xml with top description, functions/params/mi cmds/etc.. usable from config
old ser style: modname.xml, functions.xml, params.xml, etc... Each file contains parts of what is modname_admin.xml in kamailio style
Right.
Another reason is that I want to aggregate the files and produce a combined documentation set and the way I have been playing with doesn't work with the same file names - like "params.xml" for multiple modules. Since many modules had modname_params.xml
I don't recall modname_params.xml being used so far (modules/ and modules_k/ were indexed so far for sure), which modules had it?
I think I came up with that based on functions and others. Made sense. But I could combine them into <name>_admin.xml
I decided to start moving the xml file names to a standard way.
At the end I wouldn't be against of having a (new) 'standard' way, but it has to be defined with some clear patterns/rules, because what you started to use as new name was not a 'standard' pattern so far.
Ok. What's the proposal? I would prefer kamailio style file names and <book> as the main item in the <modname>.xml file.
/O
Sorry for causing trouble.
Where's the script that generates the alphabetic indexes? Is it in /docbook/scripts ?
It's on my computer, had no time to make it ready for pushing it out, i'll try to find some time for it. It is used to generate indexes (in dokuwiki format) published at:
http://www.kamailio.org/wiki/#alphabetic_indexes
IIRC, Henning had a different one for old openser/kamailio style.
Cheers, Daniel
-- Daniel-Constantin Mierla - http://www.asipto.com http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
21 dec 2012 kl. 08:15 skrev Olle E. Johansson oej@edvina.net:
20 dec 2012 kl. 21:53 skrev Daniel-Constantin Mierla miconda@gmail.com:
On 12/20/12 9:14 PM, Olle E. Johansson wrote:
20 dec 2012 kl. 21:07 skrev Daniel-Constantin Mierla miconda@gmail.com:
Hello,
On 12/20/12 9:00 PM, Olle E. Johansson wrote:
sl Minor README updates (file name changes)
modules/sl/README | 154 ++++++++++---------- modules/sl/doc/sl.xml | 16 +- modules/sl/doc/{functions.xml => sl_functions.xml} | 0 modules/sl/doc/{params.xml => sl_params.xml} | 0 modules/sl/doc/{stats.xml => sl_stats.xml} | 0
is this rename necessary for some reason? I see you started doing it to many modules.
The point is that it breaks the script that generates the alphabetic indexes.
Ouch. Different modules seems to have different naming and XML formatting ideas
The name patterns were two so far (I normalized them when I built the indexing script):
old kamailio style: modname.xml, modname_admin.xml, modname_devel.xml and modname_faq.xml. The first two are most common, modname.xml with the header, modname_admin.xml with top description, functions/params/mi cmds/etc.. usable from config
old ser style: modname.xml, functions.xml, params.xml, etc... Each file contains parts of what is modname_admin.xml in kamailio style
Right.
Another reason is that I want to aggregate the files and produce a combined documentation set and the way I have been playing with doesn't work with the same file names - like "params.xml" for multiple modules. Since many modules had modname_params.xml
I don't recall modname_params.xml being used so far (modules/ and modules_k/ were indexed so far for sure), which modules had it?
I think I came up with that based on functions and others. Made sense. But I could combine them into <name>_admin.xml
I decided to start moving the xml file names to a standard way.
At the end I wouldn't be against of having a (new) 'standard' way, but it has to be defined with some clear patterns/rules, because what you started to use as new name was not a 'standard' pattern so far.
Ok. What's the proposal? I would prefer kamailio style file names and <book> as the main item in the <modname>.xml file.
The Kamailio way is better, when comparing HTML output.
Any other opinions?
/O
On 12/21/12 11:01 AM, Olle E. Johansson wrote:
[...]
At the end I wouldn't be against of having a (new) 'standard' way, but it has to be defined with some clear patterns/rules, because what you started to use as new name was not a 'standard' pattern so far.
Ok. What's the proposal? I would prefer kamailio style file names and <book> as the main item in the <modname>.xml file.
The Kamailio way is better, when comparing HTML output.
The output is probably a matter of the root tag in the xml docs. All htmls are generated by the same command and use the same css file.
To put a bit more, kamailio inherited the initial structure, which was: - modname.xml - just the details about the author, editor, etc... - modname_admin.xml - the admin guide for the module - modname_devel.xml - the devel guide for the module - modname_faq.xml - the faq guide for the module
But 99% of the modules have only admin guide. This file became quite big for some files and I guess ser guys decided to split it in: params.xml, functions.xml, rpc.xml, ... Also, the first chapters (like short descriptions, dependencies) were moved to modname.xml. I think ser went for section as root tag for its docs, to be able to build one book, by including all the other xmls. Not sure it can be done anumore if the root tag is book for each module.
At the end the content is the same structure, but kept in different files.
Can't say by now which broken-files structure is better. Let's see if there are other opinions.
But I would prefer to be something to stick with for long time if decide to change massively. For me is more important the internal structure (e.g., the chapter for listing the functions to be named 'Functions').
Cheers, Daniel
Any other opinions?
/O
21 dec 2012 kl. 17:15 skrev Daniel-Constantin Mierla miconda@gmail.com:
On 12/21/12 11:01 AM, Olle E. Johansson wrote:
[...]
At the end I wouldn't be against of having a (new) 'standard' way, but it has to be defined with some clear patterns/rules, because what you started to use as new name was not a 'standard' pattern so far.
Ok. What's the proposal? I would prefer kamailio style file names and <book> as the main item in the <modname>.xml file.
The Kamailio way is better, when comparing HTML output.
The output is probably a matter of the root tag in the xml docs. All htmls are generated by the same command and use the same css file.
To put a bit more, kamailio inherited the initial structure, which was:
- modname.xml - just the details about the author, editor, etc...
- modname_admin.xml - the admin guide for the module
- modname_devel.xml - the devel guide for the module
- modname_faq.xml - the faq guide for the module
But 99% of the modules have only admin guide. This file became quite big for some files and I guess ser guys decided to split it in: params.xml, functions.xml, rpc.xml, ... Also, the first chapters (like short descriptions, dependencies) were moved to modname.xml. I think ser went for section as root tag for its docs, to be able to build one book, by including all the other xmls. Not sure it can be done anumore if the root tag is book for each module.
It can be done - it's a book set.
At the end the content is the same structure, but kept in different files.
My problem is having "params.xml" in many directories.
Can't say by now which broken-files structure is better. Let's see if there are other opinions.
But I would prefer to be something to stick with for long time if decide to change massively. For me is more important the internal structure (e.g., the chapter for listing the functions to be named 'Functions').
Absolutely.
Waiting for some sort of conclusion. /O