我在忘了哪个.c文件里看到了一种写法:body = (osip_body_t *) osip_list_get(&sip->bodies, pos); (其中,如果只有一个body,pos取0;如果取第二个body,pos取1)。在osip_list.c中, osip_list_get的函数体如下图所示: 既然得到了body,那就set_content_type吧,可以为啊application/sdp,也可以为applicati...
while (!osip_list_eol ( &(remote_sdp->a_attributes), pos)) { sdp_attribute_t *at; at = (sdp_attribute_t *) osip_list_get ( &remote_sdp->a_attributes, pos); printf ("%s : %s\n", at->a_att_field, at->a_att_value);//这里解释了为什么在SDP消息体中属性a里面存放必须是两列...
eXosip_unlock ();//显示出在sdp消息体中的attribute 的内容,里面计划存放我们的信息printf ("the INFO is :\n");while(!osip_list_eol ( &(remote_sdp->a_attributes), pos)) { sdp_attribute_t*at; at= (sdp_attribute_t *) osip_list_get ( &remote_sdp->a_attributes, pos); printf ("%s...
tr = (osip_transaction_t*) osip_list_get (jd->d_inc_trs,0); osip_list_remove (jd->d_inc_trs,0); __eXosip_delete_jinfo (tr); osip_list_add (eXosip.j_transactions, tr,0); }while(!osip_list_eol(jd->d_out_trs,0)) {osip_transaction_t*tr; tr = (osip_transaction_t*) ...
6. 参考[1] SIP -- RFC3261 (http://www.ietf.org) [2] SDP -- RFC2327(http://www.ieft.org) [3] oSIP Library -- http://www.gnu.org/software/osip/ [4] oSIP mailing list -- http://www.atosc.org/pipermail/public/osip/...
osip_list_size @125 osip_list_special_free @126 osip_malloc @127 osip_message_clone @128 osip_message_fix_last_via_header @129 osip_message_force_update @130 osip_message_free @131 osip_message_get__property @132 osip_message_get_accept @133 osip_message_get_accept_encoding @134 osip_...
at = (sdp_attribute_t *) osip_list_get ( &remote_sdp->a_attributes, pos); printf ("%s : %s/n", at->a_att_field, at->a_att_value); //这里解释了为什么在SDP消息体中属性a里面存放必须是两列 pos ++; } break; case EXOSIP_CALL_ACK: printf ("ACK recieved!/n"); // printf ...
(from), "sip:alice@example.com");osip_from_set_tag(from, "1234567890");osip_message_add_from(request, from);/* 设置 To 头域 */to = osip_list_create();osip_to_init(to);osip_address_init(osip_to_get_address(to));osip_address_set_uri(osip_to_get_address(to), "sip:bob@example...
u_param = (osip_generic_param_t *)osip_list_get(accept->gen_params, pos); if (u_param->gvalue == NULL)//---要为所有的函数调用判断是否成功 { osip_free(buf); return -1; } tmp_len = strlen(buf) + 4 + strlen(u_param->gname) + strlen(u_param...
while (!osip_list_eol ( &(remote_sdp->a_attributes), pos)) { sdp_attribute_t *at; //这里解释了为什么在SDP消息体中属性a里面存放必须是两列 at = (sdp_attribute_t *) osip_list_get ( &remote_sdp->a_attributes, pos); cout << "\n\t" << at->a_att_field ...