Changes for page Reason Header support

Last modified by SandrineAvakian on 2017/04/26 14:37

From version 8.1
edited by SandrineAvakian
on 2017/04/20 11:00
To version 9.1
edited by Simon Morlat
on 2017/04/21 21:57
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -xwiki:XWiki.SandrineAvakian
1 +xwiki:XWiki.smorlat
Content
... ... @@ -115,21 +115,22 @@
115 115  To get the fields'value of a LinphoneErrorInfo object, the following getters have been implemented :
116 116  
117 117  * Returns the reason : {{code}}LinphoneReason linphone_error_info_get_reason(const LinphoneErrorInfo *ei){{/code}}
118 -* Returns the pointer to the other LinphoneErrorInfo associated with the object: {{code}}LinphoneErrorInfo* linphone_error_info_get_sub(const LinphoneErrorInfo *ei){{/code}}
118 +* Returns the pointer to the other LinphoneErrorInfo associated with the object: {{code}}LinphoneErrorInfo* linphone_error_info_get_sub_error_info(const LinphoneErrorInfo *ei){{/code}}
119 119  * Returns the pointer on the error text : {{code}}const char * linphone_error_info_get_phrase(const LinphoneErrorInfo *ei){{/code}}
120 120  * Returns the pointer on the protocol name : {{code}}const char *linphone_error_info_get_protocol(const LinphoneErrorInfo *ei){{/code}}
121 121  * Returns the pointer on the warning header: {{code}}const char * linphone_error_info_get_warnings(const LinphoneErrorInfo *ei){{/code}}
122 122  * Returns the protocol code value : {{code}}int linphone_error_info_get_protocol_code(const LinphoneErrorInfo *ei){{/code}}
123 123  
124 -=== Decline or terminate a call with one or two reason headers ===
124 +=== Decline or terminate a call ===
125 125  
126 126  In order to use a reason header, a LinphoneErrorInfo object has to be instanciated with a call to linphone_factory_create_error_info and the fields must be defined with linphone_error_info_set. The warning pointer can be set to NULL if not used.
127 127  
128 -In case where multiple error happened ( at most two, the first reason header will be used for the response code and the second will be used for the response's reason header (refer to the reason header description above). Then, a second LinphoneErrorInfo will be linked to the first one through a reference with a call to linphone_error_info_set_sub_error_info.
129 -
130 130  With the LinphoneErrorInfo object then created, a call can be :
131 131  
132 132  * declined with {{code}}int linphone_call_decline_with_error_info(LinphoneCall * call, const LinphoneErrorInfo *ei); {{/code}}
131 +
132 +The LinphoneErrorInfo ei is then mapped to the SIP response code and status phrase. In order to specify a Reason header in the response, the LinphoneErrorInfo must contain a "sub" error info object describing the Reason header content (set by linphone_error_info_set_sub_error_info()).
133 +
133 133  * terminated with {{code}}int linphone_call_terminate_with_error_info(LinphoneCall * call, const LinphoneErrorInfo *ei);{{/code}}
134 134  
135 135  For each LinphoneErrorInfo created, a call to oid linphone_error_info_unref(LinphoneErrorInfo *ei) allows to free the allocated memory.
... ... @@ -137,16 +137,11 @@
137 137  
138 138  === Determining the causes of an ended call ===
139 139  
140 -The function const LinphoneErrorInfo *linphone_call_get_error_info(const LinphoneCall *call) returns a pointer on the reason header of call which allows to get the error information on a call declined or terminated.
141 +The function const LinphoneErrorInfo *linphone_call_get_error_info(const LinphoneCall *call) returns a pointer on the reason header of call which allows to get the error information on a call declined or terminated. If an outgoing call is declined by the remote party, and the decline response contains a Reason header, a sub LinphoneErrorInfo will be attached to the returned LinphoneErrorInfo.
141 141  
142 142  If knowing the cause is enough, and the other fields are not needed, one can simply use : {{code}}LinphoneReason linphone_call_get_reason(const LinphoneCall *call){{/code}}.
143 143  
144 144  
145 -= Manipulating call parameters =
146 -
147 -During a call, it is possible to change parameters such as sdp or headers **if and only if the call is either in the state LinphoneCallOutgoingInit or LinphoneCallIncomingReceived. ** This is done using the function {{code}} void linphone_call_set_params(LinphoneCall *call, const LinphoneCallParams *params).{{/code}}
148 -To get the call parameters, its counterpart {{code}} const LinphoneCallParams * linphone_call_get_params(LinphoneCall *call){{/code}} can be used.
149 -
150 150  = API functions list =
151 151  
152 152  (% style="color:#aaaaaa;font-style:italic;" %)
... ... @@ -196,9 +196,4 @@
196 196  LINPHONE_PUBLIC LinphoneReason linphone_error_code_to_reason(int err);{{/code}}
197 197  
198 198  (% style="color:#aaaaaa;font-style:italic;" %)
199 -=== linphone/private.h ===
200 -
201 -{{code}}
202 -void linphone_call_set_params(LinphoneCall *call, const LinphoneCallParams *params);
203 -const LinphoneCallParams * linphone_call_get_params(LinphoneCall *call);
204 -{{/code}}
195 +=== ===