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
.
None
None
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.
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.
None
You can implement any of these callback functions in your Service callback module.
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.
See prack_test.erl for examples