Skip to content

Commit

Permalink
Merge pull request #2375 from sergey-safarov/dipatcher-frmating
Browse files Browse the repository at this point in the history
dipatcher: dockbook and config formatting
  • Loading branch information
miconda committed Jun 29, 2020
2 parents b7c7976 + bef306b commit ae828e8
Show file tree
Hide file tree
Showing 4 changed files with 807 additions and 822 deletions.
57 changes: 30 additions & 27 deletions src/modules/dispatcher/doc/dispatcher.cfg
Expand Up @@ -209,36 +209,39 @@ route[REQINIT] {

# Handle requests within SIP dialogs
route[WITHINDLG] {
if (has_totag()) {
# sequential request withing a dialog should
# take the path determined by record-routing
if (loose_route()) {
if (is_method("BYE")) {
setflag(FLT_ACC); # do accounting ...
setflag(FLT_ACCFAILED); # ... even if the transaction fails
}
route(RELAY);
if (!has_totag()) {
return;
}

# sequential request withing a dialog should
# take the path determined by record-routing
if (loose_route()) {
if (is_method("BYE")) {
setflag(FLT_ACC); # do accounting ...
setflag(FLT_ACCFAILED); # ... even if the transaction fails
}
route(RELAY);
}

if (is_method("SUBSCRIBE") && uri == myself) {
# in-dialog subscribe requests
route(PRESENCE);
}

if ( is_method("ACK") ) {
if ( t_check_trans() ) {
# non loose-route, but stateful ACK;
# must be ACK after a 487 or e.g. 404 from upstream server
t_relay();
exit;
} else {
if (is_method("SUBSCRIBE") && uri == myself) {
# in-dialog subscribe requests
route(PRESENCE);
exit;
}
if ( is_method("ACK") ) {
if ( t_check_trans() ) {
# non loose-route, but stateful ACK;
# must be ACK after a 487 or e.g. 404 from upstream server
t_relay();
exit;
} else {
# ACK without matching transaction ... ignore and discard.
exit;
}
}
sl_send_reply("404","Not here");
# ACK without matching transaction ... ignore and discard.
exit;
}
exit;
}

sl_send_reply("404","Not here");
exit;
}

# Handle SIP registrations
Expand Down
179 changes: 90 additions & 89 deletions src/modules/dispatcher/doc/dispatcher.xml
Expand Up @@ -6,97 +6,98 @@
<!ENTITY % docentities SYSTEM "../../../../doc/docbook/entities.xml">
%docentities;

<!ENTITY % xinclude SYSTEM "http://www.docbook.org/xml/4.4/xinclude.mod" >
%xinclude;

]>

<book xmlns:xi="http://www.w3.org/2001/XInclude">
<bookinfo>
<title>DISPATCHER Module</title>
<productname class="trade">&kamailioname;</productname>
<authorgroup>
<author>
<firstname>Daniel-Constantin</firstname>
<surname>Mierla</surname>
<email>miconda@gmail.com</email>
</author>
<editor>
<firstname>Daniel-Constantin</firstname>
<surname>Mierla</surname>
<email>miconda@gmail.com</email>
</editor>
<editor>
<firstname>Carsten</firstname>
<surname>Bock</surname>
<affiliation><orgname>ng-voice GmbH</orgname></affiliation>
<address>
<email>carsten@ng-voice.com</email>
</address>
</editor>
<editor>
<firstname>Olle E.</firstname>
<surname>Johansson</surname>
<affiliation><orgname>Edvina AB</orgname></affiliation>
<address>
<email>oej@edvina.net</email>
</address>
</editor>
<editor>
<firstname>Alessandro</firstname>
<surname>Arrichiello</surname>
<affiliation><orgname>Hewlett Packard</orgname></affiliation>
<address>
<email>alezzandro@gmail.com</email>
</address>
</editor>
<editor>
<firstname>Luis</firstname>
<surname>Martin</surname>
<address>
<email>martingil.luis@gmail.com</email>
</address>
</editor>
<editor>
<firstname>Julien</firstname>
<surname>Chavanton</surname>
<email>jchavanton@gmail.com</email>
</editor>
<editor>
<firstname>Federico</firstname>
<surname>Cabiddu</surname>
<email>federico.cabiddu@gmail.com</email>
</editor>
</authorgroup>
<copyright>
<year>2004</year>
<holder>&fhg;</holder>
</copyright>
<copyright>
<year>2005</year>
<holder>Voice Sistem</holder>
</copyright>
<copyright>
<year>2010</year>
<holder>Daniel-Constantin Mierla (asipto.com)</holder>
</copyright>
<copyright>
<year>2014</year>
<holder>Olle E. Johansson, Edvina AB</holder>
</copyright>
<copyright>
<year>2015</year>
<holder>Alessandro Arrichiello, Hewlett Packard</holder>
</copyright>
<copyright>
<year>2017, 2018</year>
<holder>Julien chavanton, Flowroute</holder>
</copyright>
<copyright>
<year>2020</year>
<holder>Federico Cabiddu, Libon</holder>
</copyright>
</bookinfo>
<toc></toc>

<xi:include href="dispatcher_admin.xml"/>
<xi:include href="dispatcher_faq.xml"/>
<bookinfo>
<title>DISPATCHER Module</title>
<productname class="trade">&kamailioname;</productname>
<authorgroup>
<author>
<firstname>Daniel-Constantin</firstname>
<surname>Mierla</surname>
<email>miconda@gmail.com</email>
</author>
<editor>
<firstname>Daniel-Constantin</firstname>
<surname>Mierla</surname>
<email>miconda@gmail.com</email>
</editor>
<editor>
<firstname>Carsten</firstname>
<surname>Bock</surname>
<affiliation>
<orgname>ng-voice GmbH</orgname>
</affiliation>
<address><email>carsten@ng-voice.com</email></address>
</editor>
<editor>
<firstname>Olle E.</firstname>
<surname>Johansson</surname>
<affiliation>
<orgname>Edvina AB</orgname>
</affiliation>
<address><email>oej@edvina.net</email></address>
</editor>
<editor>
<firstname>Alessandro</firstname>
<surname>Arrichiello</surname>
<affiliation>
<orgname>Hewlett Packard</orgname>
</affiliation>
<address><email>alezzandro@gmail.com</email></address>
</editor>
<editor>
<firstname>Luis</firstname>
<surname>Martin</surname>
<address><email>martingil.luis@gmail.com</email></address>
</editor>
<editor>
<firstname>Julien</firstname>
<surname>Chavanton</surname>
<email>jchavanton@gmail.com</email>
</editor>
<editor>
<firstname>Federico</firstname>
<surname>Cabiddu</surname>
<email>federico.cabiddu@gmail.com</email>
</editor>
</authorgroup>
<copyright>
<year>2004</year>
<holder>&fhg;</holder>
</copyright>
<copyright>
<year>2005</year>
<holder>Voice Sistem</holder>
</copyright>
<copyright>
<year>2010</year>
<holder>Daniel-Constantin Mierla (asipto.com)</holder>
</copyright>
<copyright>
<year>2014</year>
<holder>Olle E. Johansson, Edvina AB</holder>
</copyright>
<copyright>
<year>2015</year>
<holder>Alessandro Arrichiello, Hewlett Packard</holder>
</copyright>
<copyright>
<year>2017, 2018</year>
<holder>Julien chavanton, Flowroute</holder>
</copyright>
<copyright>
<year>2020</year>
<holder>Federico Cabiddu, Libon</holder>
</copyright>
</bookinfo>
<toc/>

<xi:include href="dispatcher_admin.xml"/>
<xi:include href="dispatcher_faq.xml"/>

</book>

0 comments on commit ae828e8

Please sign in to comment.