<commit_before># Reply Options

Many of the SipApp's [callback functions](callback_functions.md) allows you to send a response back for the received request. Currently the following replies are recognized:

Response|Types|Code|Comments
---|---|---|---
Code|Code::`nksip:sip_code()`|Code|
{Code, Opts}|Code::`nksip:sip_code()`, Opts::`nksip:optslist()`|Code|See [options](#options)
ringing||180|
rel_ringing||180|_Reliable responses_ will be used
{rel_ringing, Body}|Body::`nksip:body()`|180|_Reliable responses_ will be used, send a body
session_progress||183|
rel_session_progress||183|_Reliable responses_ will be used
{rel_session_progress, Body}|Body:`nksip:body()`|183|_Reliable responses_ will be used, send a body
ok||200|
{ok, Opts}|Opts:`nksip:optslist()`|200|See [options](#options)
{answer, Body}|Body::`nksip:body()`|200|Send a body
accepted||202|
{redirect, [Contact]}|Contact::`string()`&#124;`binary()`&#124;`nksip:uri()`|300|Generates _Contact_ headers
{redirect_permanent, Contact}|Contact::`string()`&#124;`binary()`&#124;`nksip:uri()`|301|Generates a _Contact_ header
{redirect_temporary, Contact}|Contact::`string()`&#124;`binary()`&#124;`nksip:uri()`|302|Generates a _Contact_ header
invalid_request||400|
{invalid_request, Phrase}|Phrase::`string()`&#124;`binary()`|400|Use custom SIP phrase
authenticate||401|Generates a new _WWW-Authenticate_ header, using current _From_ domain as `realm`
{authenticate, Realm}|Realm::`string()`&#124;`binary()`|401|Generates a valid new _WWW-Authenticate header_, using `Realm`
forbidden||403|
{forbidden, Text}|Text::`string()`&#124;`binary()`|403|Use custom SIP phrase
not_found||404|
{not_found, Text}|Text::`string()`&#124;`binary()`|404|Use custom SIP phrase
{method_not_allowed, Allow}|Allow::`string()`&#124;`binary()`|405|Generates an _Allow_ header
proxy_authenticate||407|Generates a valid new _Proxy-Authenticate header_, using current _From_ domain as `Realm`
{proxy_authenticate, Realm}|Realm::`string()`&#124;`binary()`|407|Generates a valid new _Proxy-Authenticate header_, using `Realm`
timeout||408|
{timeout, Text}|Text::`string()`&#124;`binary()`|408|Use custom SIP phrase<commit_msg>Update reply_options.md<commit_after># Reply Options

Many of the SipApp's [callback functions](callback_functions.md) allows you to send a response back for the received request. Currently recognized options are documented in this page.

Keep in mind that activated pluings can add new options. See the [plugins documentation](../plugins/README.md).

Response|Types|Code|Comments
---|---|---|---
Code|Code::`nksip:sip_code()`|Code|
{Code, Opts}|Code::`nksip:sip_code()`, Opts::`nksip:optslist()`|Code|See [options](#options)
ringing||180|
rel_ringing||180|_Reliable responses_ will be used (eee [plugin](../plugins/100rel.md))
{rel_ringing, Body}|Body::`nksip:body()`|180|_Reliable responses_ will be used, send a body (see [plugin](../plugins/100rel.md))
session_progress||183|
rel_session_progress||183|_Reliable responses_ will be used (see [plugin](../plugins/100rel.md))
{rel_session_progress, Body}|Body:`nksip:body()`|183|_Reliable responses_ will be used, send a body (see [plugin](../plugins/100rel.md))
ok||200|
{ok, Opts}|Opts:`nksip:optslist()`|200|See [options](#options)
{answer, Body}|Body::`nksip:body()`|200|Send a body
accepted||202|
{redirect, [Contact]}|Contact::`string()`&#124;`binary()`&#124;`nksip:uri()`|300|Generates _Contact_ headers
{redirect_permanent, Contact}|Contact::`string()`&#124;`binary()`&#124;`nksip:uri()`|301|Generates a _Contact_ header
{redirect_temporary, Contact}|Contact::`string()`&#124;`binary()`&#124;`nksip:uri()`|302|Generates a _Contact_ header
invalid_request||400|
{invalid_request, Phrase}|Phrase::`string()`&#124;`binary()`|400|Use custom SIP phrase
authenticate||401|Generates a new _WWW-Authenticate_ header, using current _From_ domain as `realm`
{authenticate, Realm}|Realm::`string()`&#124;`binary()`|401|Generates a valid new _WWW-Authenticate header_, using `Realm`
forbidden||403|
{forbidden, Text}|Text::`string()`&#124;`binary()`|403|Use custom SIP phrase
not_found||404|
{not_found, Text}|Text::`string()`&#124;`binary()`|404|Use custom SIP phrase
{method_not_allowed, Allow}|Allow::`string()`&#124;`binary()`|405|Generates an _Allow_ header
proxy_authenticate||407|Generates a valid new _Proxy-Authenticate header_, using current _From_ domain as `Realm`
{proxy_authenticate, Realm}|Realm::`string()`&#124;`binary()`|407|Generates a valid new _Proxy-Authenticate header_, using `Realm`
timeout||408|
{timeout, Text}|Text::`string()`&#124;`binary()`|408|Use custom SIP phrase
{'fraction_non_alphanumeric': 0.18197611292073831, 'fraction_numerical': 0.053420195439739415, 'mean_word_length': 10.344827586206897, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7461957', 'n_tokens_mistral': 1773, 'n_tokens_neox': 1523, 'n_words': 334}