#include <nua_client.h>
Data Fields | |
size_t | crm_extra |
Size of private data. | |
int(* | crm_template )(nua_client_request_t *cr, msg_t **return_msg, tagi_t const *tags) |
Generate a request message. | |
int(* | crm_init )(nua_client_request_t *, msg_t *msg, sip_t *sip, tagi_t const *tags) |
crm_init is called when a client request is sent first time. | |
int(* | crm_send )(nua_client_request_t *, msg_t *msg, sip_t *sip, tagi_t const *tags) |
crm_send is called each time when a client request is sent. | |
int(* | crm_check_restart )(nua_client_request_t *, int status, char const *phrase, sip_t const *sip) |
crm_check_restart is called each time when a response is received. | |
int(* | crm_recv )(nua_client_request_t *, int status, char const *phrase, sip_t const *sip) |
crm_recv is called each time a final response is received. | |
int(* | crm_preliminary )(nua_client_request_t *, int status, char const *phrase, sip_t const *sip) |
crm_preliminary is called each time a preliminary response is received. | |
int(* | crm_report )(nua_client_request_t *, int status, char const *phrase, sip_t const *sip, nta_outgoing_t *orq, tagi_t const *tags) |
crm_report is called each time a response is received and it is reported to the application. | |
int(* | crm_complete )(nua_client_request_t *) |
crm_complete is called when a client-side request is destroyed. |
int(* crm_template)(nua_client_request_t *cr, msg_t **return_msg, tagi_t const *tags) |
Generate a request message.
1 | when request message has been created | |
0 | when request message should be created in normal fashion | |
-1 | upon an error |
crm_init is called when a client request is sent first time.
1 | when request has been responded | |
0 | when request should be sent in normal fashion | |
-1 | upon an error |
crm_send is called each time when a client request is sent.
1 | when request has been responded | |
0 | when request has been sent | |
-1 | upon an error (but request message has not been destroyed) | |
-2 | upon an error |
int(* crm_check_restart)(nua_client_request_t *, int status, char const *phrase, sip_t const *sip) |
crm_check_restart is called each time when a response is received.
It is used to restart request after responses with method-specific status code or method-specific way of restarting the request.
1 | when request has been restarted | |
0 | when response should be processed normally |
crm_recv is called each time a final response is received.
A final response is in range 200 .. 699 (or internal response) and it cannot be restarted.
crm_recv() should call nua_base_client_response() or nua_base_client_tresponse(). The return values below are documented with nua_base_client_response(), too.
0 | if response was preliminary | |
1 | if response was final | |
2 | if response destroyed the handle, too. |
int(* crm_preliminary)(nua_client_request_t *, int status, char const *phrase, sip_t const *sip) |
crm_preliminary is called each time a preliminary response is received.
A preliminary response is in range 101 .. 199.
crm_preliminary() should call nua_base_client_response() or nua_base_client_tresponse().
0 | if response was preliminary | |
1 | if response was final | |
2 | if response destroyed the handle, too. |
int(* crm_report)(nua_client_request_t *, int status, char const *phrase, sip_t const *sip, nta_outgoing_t *orq, tagi_t const *tags) |
crm_report is called each time a response is received and it is reported to the application.
The status and phrase may be different from the status and phrase received from the network, e.g., when the request is restarted.
int(* crm_complete)(nua_client_request_t *) |
crm_complete is called when a client-side request is destroyed.