To implement conferencing functionality in a mobile client, start with an audio conference (which may be a good point to process). The server is Centos7 + Freeswitch1.4. The client is based on the Doubango imsdroid, as well as the Jitsi on the PC.
In Doubango
1. The AddHeader function can add fields to sip messages, such as "P-preferred-service"
2. addcaps function in SIP message contact field <> After adding content, there are 2 overloads
However, none of these 2 functions can modify the contents of a contact<>.
Search a lap and a circle, found that Doubango did not provide can modify the contact <> contents of the function (if found please tell me, QQ 1985082200, thank you), no way, only on their own.
On the PC, Jitsi can initiate video, audio conferencing, grab-and-pack comparisons, and guess how to initiate a meeting:
1. Last add isfocus parameter in contact, test not
2. Add REGISTERING_ACC to the contact<>
3. Add the above 2 simultaneously
4. Other possibilities ...
Now that we find a way, that is dry, find the last place to convert the contact into a string, Huang Tian, a layer to find down finally found hiding here:
1) SipSession.cpp
BOOL Sipsession::addcaps (const char* name, const char* value)
2) tsip_session.c
Tsk_params_add_param
3) tsip_header_contact.c
int tsip_header_contact_serialize (const tsip_header_t* header, tsk_buffer_t* output)
4) TSIP_URI.C
int tsip_uri_serialize (const tsip_uri_t *uri, tsk_bool_t with_params, tsk_bool_t quote, tsk_buffer_t *output)
int __tsip_uri_serialize (const tsip_uri_t *uri, tsk_bool_t with_params, tsk_buffer_t *output)
Well, in the end is the __tsip_uri_serialize in the content of the contact, the code has a paragraph:
Red box, gee, feel can add parameters, looked up a layer, and finally disappointed, did not provide the operation of the params function
In Doubango, the "uri" Inside is "Sipuri", in "SipUri.h", and the actual data structure is "tsip_uri_t"
Well, now that we have found the place, then tomorrow will be written dead plus look at the line, if you can provide the API, but I remember to compile the goods is not too easy, eh ~ ~ ~
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Doubango Library Modify the location of the contact content