Skip to content

Latest commit

 

History

History
74 lines (38 loc) · 2.48 KB

100rel.md

File metadata and controls

74 lines (38 loc) · 2.48 KB

Reliable Provisional Responses Plugin

Name

nksip_100rel

Description

This plugin provides reliable provisional responses, according to RFC3262.

Ater an INVITE request, the UAS can send provisional (1xx) responses, that are not usually acknowledged. Activating this plugin, "100rel" is added to the all generated Supported headers, indicating to the remote party that we support reliable provisional responses. If the other party supports them also, it can add a "Require: 100rel" header to any provisional response, and NkSIP will send a PRACK request to acknowledge them.

PRACK will also be added to automatically generated Allow headers.

To send reliable provisonal responses when receiving an INVITE request, you can use the reply codes rel_ringing and rel_session_progress instead of ringing and session_progress.

Dependant Plugins

None

Configuration Values

Service configuration values

None

Request generating options

When sending an INVITE using invite/2,3, you can add the option {prack_callback, Fun}. If included, this function will be called when a reliable provisional response has been received, and before sending the corresponding PRACK.

It will be called as Fun(RemoteSDP, {resp, Code, Resp, Call}). If RemoteSDP is a SDP, it is an offer and you must supply an answer as function return. If it is <<>>, you can return <<>> or send a new offer. If this option is not included, PRACKs will be sent with no body.

Reply options

When sending a reply to an incoming request, if you want it to be sent as a reliable provisional response, use reply codes rel_ringing and rel_session_progress instead of ringing and session_progress.

You can also add the option do100rel to any response to use a reliable provisional response.

API functions

None

Callback functions

You can implement any of these callback functions in your Service callback module.

sip_prack/2

sip_prack(Req::nksip:request(), Call::nksip:call()) ->
    {reply, nksip:sipreply()} | noreply.

Called when a valid PRACK request is received. You should not usually implement this function.

Examples

See prack_test.erl for examples