eXosip使用实例 下载本文

} i = eXosip_listen_addr(IPPROTO_UDP,NULL,localport,AF_INET,0); if(i != 0) { eXosip_quit(); fprintf(stderr,\ return -1; } //test(); flag = 1; while(flag) {

printf(\ je = eXosip_event_wait(0,10); printf(\ eXosip_lock(); eXosip_default_action(je); eXosip_unlock(); printf(\ scanf(\ getchar(); if(strcmp(command,COM_REG) == 0) com[REG](); else if(strcmp(command,COM_UNREG) == 0) com[UNREG](); else if(strcmp(command,COM_INVITE) == 0) com[INVITE](); else if(strcmp(command,COM_BYE) == 0) com[BYE](); else if(strcmp(command,COM_HOLD) == 0) com[HOLD](); else if(strcmp(command,COM_UNHOLD) == 0) com[UNHOLD](); else if(strcmp(command,COM_QUIT) == 0) com[QUIT](); else if(strcmp(command,COM_SHOW) == 0) com[SHOW]();

}

}

else printf(\

return 0;