[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[osip-dev] (no subject)

From: giovanni sandra
Subject: [osip-dev] (no subject)
Date: Mon, 29 Jul 2013 12:08:24 +0100


I am trying to implement a UA with eXosip.
To test my code, I created a sip account via the antisip website and installed the zoiper softphone.

when I execute my code, the call cannot be received by the softphone.
I am working with ubuntu 12.04.

#include <eXosip2/eXosip.h>
#include <netinet/in.h>
#include <ares.h>
#include <pthread.h>
void *sendinvite( void *ptr ) {
char *source_call = "sip:address@hidden:5061";
 char *dest_call = "<sip:address@hidden:5062>";
  int i;
  char tmp[4096];
  char localip[128];
osip_message_t *invite = NULL;
  if (i != 0)
      printf ("Couldn't initialize eXosip!\n");
      return -1;
      printf ("eXosip_init successfully!\n");
i = eXosip_listen_addr (IPPROTO_UDP, NULL, 5061, AF_INET, 0);
  if (i != 0)
      eXosip_quit ();
      fprintf (stderr, "Couldn't initialize transport layer!\n");
      return -1;
 i = eXosip_call_build_initial_invite (&invite, dest_call, source_call, NULL, "This is a call for a conversation");

          if (i != 0)
          printf ("Intial INVITE failed!\n");
 snprintf (tmp, 4096,
            "o=anonymous 0 0 IN IP4\r\n"
            "t=1 10\r\n"
      osip_message_set_body (invite, tmp, strlen(tmp));
      osip_message_set_content_type (invite, "application/sdp");
      eXosip_lock ();
      i = eXosip_call_send_initial_invite (invite);
      eXosip_unlock ();
     printf("\n salut2\n");
int main(int argc, int argv[])
 pthread_t thread1;
int ii; 
ii = pthread_create( &thread1, NULL, sendinvite, NULL);
 pthread_join( thread1, NULL);

Can you help me please.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]