[Osip] where to get josua
Manish Patel
manish.patel at avinashi.com
Sat May 17 06:25:52 CEST 2008
Aymeric,
Thanks for your kind reply.
I have checked that sip_reg.c for registration but I want to use it for
making a call and I am not able to do that. I have made some code that I
want to show you.
if (eXosip_add_authentication_info
(username, username, password, NULL, NULL))
{
syslog_wrapper (LOG_ERR, "eXosip_add_authentication_info
failed");
exit (1);
}
osip_message_t *call = NULL;
int callID = -1;
osip_message_t *subcribe;
int i = eXosip_subscribe_build_initial_request(&subcribe,
"sip:1119 at 192.168.0.213", "sip:1116 at 192.168.0.213", "", "Event Summary",
300);
if (i < 0)
{
syslog_wrapper (LOG_ERR,
"eXosip_subscribe_build_initial_request failed");
exit (1);
}
i = eXosip_subscribe_send_initial_request(subcribe);
if (i < 0)
{
syslog_wrapper (LOG_ERR,
"eXosip_subscribe_send_initial_request failed");
exit (1);
}
for (;;)
{
eXosip_event_t *event;
if (!(event = eXosip_event_wait (0, 1)))
{
#ifndef OSIP_MT
eXosip_execute();
eXosip_automatic_action ();
#endif
osip_usleep (10000);
continue;
}
#ifndef OSIP_MT
eXosip_execute();
#endif
eXosip_automatic_action ();
int i;
switch (event->type)
{
case EXOSIP_SUBCRSTATE_ACTIVE:
syslog_wrapper(LOG_INFO, "Subcribe Success");
callID = eXosip_call_build_initial_invite(&call,
"sip:1119 at 192.168.0.213", "sip:1116 at 192.168.0.213", "", "Test Call");
if (callID != 0)
{
syslog_wrapper (LOG_ERR,
"eXosip_call_build_initial_invite failed");
exit (1);
}
i = eXosip_call_send_initial_invite(call);
if (i < 0)
{
syslog_wrapper (LOG_ERR,
"eXosip_call_send_initial_invite failed");
exit (1);
}
break;
default:
syslog_wrapper (LOG_DEBUG,
"recieved unknown eXosip event (type, did,
cid) = (%d, %d, %d)",
event->type, event->did, event->cid);
}
eXosip_event_free (event);
}
This is what I have coded to make a call. I have not putted the code for
registration. But I have done that also. Registration completes
perfectly. But it is not able to subscribe.
Any idea regarding this? Or give me any sample that is coded for making
a call.
I am using asterisk as a server.
Waiting for your reply.
Regards,
Manish Patel
SysBrain Unit - Avinashi Systems Pvt Ltd.
-----Original Message-----
From: Aymeric Moizard [mailto:jack at atosc.org]
Sent: Friday, May 16, 2008 8:24 PM
To: Manish Patel
Cc: osip at atosc.org
Subject: Re: [Osip] where to get josua
On Fri, 16 May 2008, Manish Patel wrote:
> Hello all list members,
>
>
>
> I am a newbie to osip. I want a test application for making a call
from
> asterisk server. But I am not able to understand how to use libosip.
>
> I have search on web, someone says that it is described in josua. But
I
> am not able to find josua to download.
Josua is deprecated/removed since several years.
> So please provide me link to josua or provide other link to other
> testing application.
Try eXosip2 first and play with the sip_reg.c sample for registrations.
tks,
Aymeric MOIZARD / ANTISIP
amsip - http://www.antisip.com
osip2 - http://www.osip.org
eXosip2 - http://savannah.nongnu.org/projects/exosip/
> Please help me out on this.
>
> Thanks in advance.
>
>
>
> Regards,
>
> Manish Patel
>
> SysBrain Unit - Avinashi Systems Pvt Ltd.
>
>
>
> _______________________________________________
> Osip mailing list
> Osip at atosc.org
> http://www.atosc.org/mailinglist/listinfo/osip
>
More information about the Osip
mailing list