This program is a very simple usage example of liblinphone, desmonstrating how to send/receive SIP MESSAGE from a sip uri identity passed from the command line.
Argument must be like sip:jehan.nosp@m.@sip.nosp@m..linp.nosp@m.hone.nosp@m..org .
ex chatroom sip:jehan.nosp@m.@sip.nosp@m..linp.nosp@m.hone.nosp@m..org
#include "linphone/core.h"
#include <signal.h>
static bool_t running = TRUE;
static void stop(int signum) {
running = FALSE;
}
}
int main(int argc, char *argv[]) {
char *dest_friend = NULL;
if (argc > 1) {
dest_friend = argv[1];
}
signal(SIGINT, stop);
#ifdef DEBUG_LOGS
linphone_core_enable_logs(NULL);
#endif
while (running) {
ms_usleep(50000);
}
printf("Shutting down...\n");
printf("Exited\n");
return 0;
}