Table of Contents
1xx_replies
200_replies
202_replies
2xx_replies
300_replies
301_replies
302_replies
3xx_replies
400_replies
401_replies
403_replies
404_replies
407_replies
408_replies
483_replies
4xx_replies
500_replies
5xx_replies
6xx_replies
xxx_replies
sent_replies
sent_err_replies
failures
received_ACKs
List of Examples
sl_send_reply
usagesend_reply
usagesl_reply_error
usagesend_reply
usageTable of Contents
1xx_replies
200_replies
202_replies
2xx_replies
300_replies
301_replies
302_replies
3xx_replies
400_replies
401_replies
403_replies
404_replies
407_replies
408_replies
483_replies
4xx_replies
500_replies
5xx_replies
6xx_replies
xxx_replies
sent_replies
sent_err_replies
failures
received_ACKs
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 beneficial in many scenarios, in which you wish not to burden server's memory and scale well.
The SL module needs to filter ACKs sent after a local stateless reply to an INVITE was generated. To recognize such ACKs, ser adds a special "signature" in to-tags. This signature is sought for in incoming ACKs, and if included, the ACKs are absorbed.
To speed up the filtering process, the module uses a timeout mechanism. When a reply is sent, a timer us set. As long as the timer is valid, the incoming ACK requests will be checked using TO tag value. Once the timer expires, all the ACK messages are let through - a long time passed till it sent a reply, so it does not expect any ACK that have to be blocked.
The ACK filtering may fail in some rare cases. If you think these matter to you, better use stateful processing (TM module) for INVITE processing. Particularly, the problem happens when a UA sends an INVITE which already has a to-tag in it (e.g., a re-INVITE) and the server want to reply to it. Then, it will keep the current to-tag, which will 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.
Default reply status code.
Default value is 500.
Default reply reason phrase.
Default value is 'Internal Server Error'.
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 Transaction module and with no retransmission for the INVITE's replies.
If the code is in the range 300-399 (redirect reply), the current destination set is appended to the reply as Contact headers. The destination set contains the request URI (R-URI), if it is modified compared to the received one, plus the branches added to the request (e.g., after an append_branch() or lookup("location")). If the R-URI was changed but it is not desired to be part of the destination set, it can be reverted using the function revert_uri().
Custom headers to the reply can be added using append_to_reply() function from textops module.
Meaning of the parameters is as follows:
code - Return code.
reason - Reason phrase.
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 TM module: if a transaction exists for the current request, then the reply is sent statefully, otherwise stateless.
Meaning of the parameters is as follows:
code - Return code.
reason - Reason phrase.
This function can be used from REQUEST_ROUTE and FAILURE_ROUTE. It can be used on ONREPLY_ROUTE executed by tm module (upon a t_on_reply() callback).
Example 1.5. send_reply
usage
... send_reply("404", "Not found"); ... send_reply("403", "Invalid user - $fU"); ...
Sends back an error reply describing the nature of the last internal error. Usually this function should be used after a script function that returned an error code.
Forward statelessy the current received SIP reply, with the option to change the status code and reason text. The new code has to be in the same class. The received reply is forwarded as well by core when the config execution ended, unless it is dropped from config.
Meaning of the parameters is as follows:
code - Status code.
reason - Reason phrase.
This function can be used from ONREPLY_ROUTE.