<commit_before># Metadata Fields
NkSIP allows the retrieval of specific information from requests, reponses, dialogs and subscriptions.
The available options are defined here.

* [Requests and Responses](#requests-and-responses-metadata)
* [Dialogs](#fialog-metadata)
* [Subscriptions](#subscriptions-metadata)


Installed plugins can install aditional metadata fields.



## Request and Responses Metadata
Accesible when calling `nksip_request:meta/2`, `nksip_response:meta/2` and when using the option `meta` in the [requests sending functions](../guide/sending_requests.md).

Name|Type|Description
---|---|---
id|`nksip:id()`|Request or response's id
app_id|`nksip:app_id()`|Internal SipApp name this request or response belongs to
app_name|`term()`|User SipApp name this request or response belongs to
dialog_id|`nksip:id()`|Dialog's id of this request or response
subscription_id|`nksip_id()`|Subscription's id of this request or response
proto|`nksip:protocol()`|Transport protocol
local|`{nksip:protocol(),inet:ip_address(),inet:port_number()}`|Local transport protocol, ip and port
remote|`{nksip:protocol(),inet:ip_address(),inet:port_number()}`|Remote transport protocol, ip and port
method|`nksip:method(`)|Method of the request (undefined if it is a response)
ruri|`nksip:uri()`|RUri of the request
scheme|`nksip:scheme()`|Scheme of RUri
user|`binary()`|User of RUri
domain|`binary()`|Domain of RUri
aor|`nksip:aor()`|Address-Of-Record of the RUri
code|`nksip:sip_code()`|SIP Code of the response (0 if it as request)
reason_phrase|`binary()`|Reason Phrase of the response
content_type|`nksip:token()`|Content-Type header
body|`nksip:body()`|Body<commit_msg>Update metadata.md<commit_after># Metadata Fields
NkSIP allows the retrieval of specific information from requests, reponses, dialogs and subscriptions.
The available options are defined here for:

* [Requests and Responses](#requests-and-responses-metadata) (See [requests](../api/requests.md) and  [responses](../api/responses.md) APIs).
* [Dialogs](#fialog-metadata) (See [dialogs](../api/dialogs.md) API)
* [Subscriptions](#subscriptions-metadata) (See [subscriptions](../api/subscriptions.md) API)


Keep in mind that activated plugins can install aditional metadata fields. See the [plugins documentation](../plugins/README.md).


## Request and Responses Metadata
Accesible when calling `nksip_request:meta/2`, `nksip_response:meta/2` and when using the option `meta` in the [requests sending functions](../guide/sending_requests.md).

Name|Type|Description
---|---|---
id|`nksip:id()`|Request or response's id
app_id|`nksip:app_id()`|Internal SipApp name this request or response belongs to
app_name|`term()`|User SipApp name this request or response belongs to
dialog_id|`nksip:id()`|Dialog's id of this request or response
subscription_id|`nksip_id()`|Subscription's id of this request or response
proto|`nksip:protocol()`|Transport protocol
local|`{nksip:protocol(),inet:ip_address(),inet:port_number()}`|Local transport protocol, ip and port
remote|`{nksip:protocol(),inet:ip_address(),inet:port_number()}`|Remote transport protocol, ip and port
method|`nksip:method(`)|Method of the request (undefined if it is a response)
ruri|`nksip:uri()`|RUri of the request
scheme|`nksip:scheme()`|Scheme of RUri
user|`binary()`|User of RUri
domain|`binary()`|Domain of RUri
aor|`nksip:aor()`|Address-Of-Record of the RUri
code|`nksip:sip_code()`|SIP Code of the response (0 if it as request)
reason_phrase|`binary()`|Reason Phrase of the response
content_type|`nksip:token()`|Content-Type header
body|`nksip:body()`|Body
{'fraction_non_alphanumeric': 0.13808463251670378, 'fraction_numerical': 0.0016703786191536749, 'mean_word_length': 7.414519906323185, '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': '7454412', 'n_tokens_mistral': 1180, 'n_tokens_neox': 1127, 'n_words': 320}