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.
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.
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;
}
MS2_DEPRECATED LinphoneChatRoom * linphone_core_create_chat_room(LinphoneCore *core, const LinphoneChatRoomParams *params, const LinphoneAddress *localAddr, const char *subject, const bctbx_list_t *participants)
Create a chat room.
struct _LinphoneChatRoom LinphoneChatRoom
A chat room is the place where LinphoneChatMessage are exchanged.
Definition c-types.h:423
void linphone_chat_room_unref(LinphoneChatRoom *chat_room)
Release reference to the chat room.
MS2_DEPRECATED void linphone_chat_room_send_message(LinphoneChatRoom *chat_room, const char *message)
Send a message to peer member of this chat room.
void linphone_core_iterate(LinphoneCore *core)
Main loop function.
MS2_DEPRECATED LinphoneCore * linphone_core_new(const LinphoneCoreVTable *vtable, const char *config_path, const char *factory_config_path, void *userdata)
Instanciates a LinphoneCore object.
struct _LinphoneCore LinphoneCore
Main object to instanciate and on which to keep a reference.
Definition types.h:495
MS2_DEPRECATED void linphone_core_destroy(LinphoneCore *core)
Destroys a LinphoneCore.
char * linphone_address_as_string(const LinphoneAddress *address)
Returns the address as a string.
struct _LinphoneAddress LinphoneAddress
Object that represents a parsed SIP address.
Definition c-types.h:131
This structure holds all callbacks that the application should implement.
Definition core.h:217
MS2_DEPRECATED LinphoneCoreTextMessageReceivedCb text_received
Notifies configuring status changes.
Definition core.h:264