页眉内容
if (eXosip_add_authentication_info(\
{
printf(\return -4;
}
i = eXosip_register_send_register (id, reg) ; eXosip_unlock ();
printf (\flag1 = 1; while (flag1)
{
// je = eXosip_event_wait (0, 200);
je = eXosip_event_wait (0, 500); //协议栈带有此语句 ,具体作用未知 eXosip_lock ();
eXosip_default_action (je);
eXosip_automatic_refresh (); eXosip_unlock ();
if (je == NULL)
{
printf (\break;
switch (je->type)
{
case EXOSIP_REGISTRATION_FAILURE:
printf (\eXosip_register_send_register (id, reg); printf(\break;
case EXOSIP_REGISTRATION_SUCCESS: printf(\break; default:
printf(\break;
}
eXosip_event_free (je); break;
}
break; case 'i':/* INVITE */
i = eXosip_call_build_initial_invite (&invite, dest_call, source_call, NULL, \
conversation\
if (i != 0)
{
printf (\break;
}
〃符合SDP格式,其中属性a是自定义格式,也就是说可以存放自己的信息
是两列 ,比如帐户信息
,但是只能
〃但是经测试,格式:v o t必不可少,原因未知,估计是协议栈在传输时需要检查的 snprintf
(tmp, 4096,
\
页眉内容
\\
\
osip_message_set_body (invite, tmp, strlen(tmp)); osip_message_set_content_type (invite, \
i = eXosip_call_send_initial_invite (invite); eXosip_unlock (); flag1 = 1; while (flag1)
{
je = eXosip_event_wait (0, 200); if (je == NULL)
{
printf (\
}
switch (je->type)
{
case EXOSIP_CALL_INVITE: printf (\case EXOSIP_CALL_PROCEEDING: printf (\
case EXOSIP_CALL_RINGING: printf (\printf (\
case EXOSIP_CALL_ANSWERED: printf (\je->did;
printf (\&ack); eXosip_call_send_ack (je->did, ack); flag1 = 0; break;
case EXOSIP_CALL_CLOSED: printf (\case EXOSIP_CALL_ACK: printf (\default:
printf (\
}
eXosip_event_free (je); break;
} }
return (0); }