[Osip] new thread: peer to peer presence status without SIP server

Sithara Santharam tssithara at gmail.com
Fri Aug 28 08:56:35 CEST 2009


Hi Aymeric,
I am trying to exchange presence status between 2 clients without using a
SIP server.
I am able to send subscribe request from client 1 to client 2. Then i get
"SUBSCRIBE is being processed!" and then "4xx received for SUBSCRIBE" in
cleint 1. In the meanwhile, client 2 recieves the Subscribe request , and
then there is a segmentaiton fault.
Can you help me out with this?

*In client 1, I am using the following code to send subscription request*
    osip_message_t *subscribe;
    char buf[256] = "subscribe from 172.24.190.77";
    i = eXosip_subscribe_build_initial_request(&subscribe,172.24.190.81,
172.24.190.77, NULL, "presence", 600 );
    if (i < 0) {
        printf("eXosip_subscribe_build_initial_request failed\n");
        return i;
    }
    osip_message_set_body (subscribe, buf, strlen (buf));
    osip_message_set_content_type (subscribe, "text/plain");
    eXosip_lock ();
    i = eXosip_subscribe_send_initial_request(subscribe);
    if (i < 0) {
        printf("eXosip_subscribe_send_initial_request failed i = %d\n",i);
    }
    eXosip_unlock ();

*
this the log for client 1*

| INFO4 | <osip_transaction.c: 388> sipevent tr->transactionid: 1
| INFO4 | <osip_transaction.c: 391> sipevent tr->state: 10
| INFO4 | <osip_transaction.c: 394> sipevent evt->type: 18
| INFO4 | <osip_transaction.c: 397> sipevent evt->sip: 2e7bf0
| INFO2 | <eXutils.c: 858> DNS resolution with 172.24.190.81:5060
| INFO2 | <eXutils.c: 876> getaddrinfo returned the following addresses:
| INFO2 | <eXutils.c: 883> 172.24.190.81 port 5060
| INFO1 | <eXtl_udp.c: 570> Message sent: (to dest=172.24.190.81:5060)
SUBSCRIBE sip:172.24.190.81:5060 SIP/2.0
Via: SIP/2.0/UDP 172.24.190.77:5060;rport;branch=z9hG4bK1984132514
From: <sip:172.24.190.77:5060>;tag=1433312345
To: <sip:172.24.190.81:5060>
Call-ID: 1843029254
CSeq: 20 SUBSCRIBE
Contact: <sip:172.24.190.77:5060>
Content-Type: text/plain
Max-Forwards: 70
User-Agent: eXosip/3.1.0
Expires: 600
Event: presence
Content-Length:    28

subscribe from 172.24.190.77
| INFO3 | <jcallback.c: 588> cb_sndsubscibe (id=1)
| INFO4 | <osip_transaction.c: 436> sipevent evt: method called!
| INFO2 | <eXconf.c: 798> eXosip: timer sec:0 usec:100000!
| INFO1 | <eXtl_udp.c: 287> Received message:
SIP/2.0 101 Dialog Establishement
Via: SIP/2.0/UDP 172.24.190.77:5060;rport=5060;branch=z9hG4bK1984132514
From: <sip:172.24.190.77:5060>;tag=1433312345
To: <sip:172.24.190.81:5060>;tag=1806277727
Call-ID: 1843029254
CSeq: 20 SUBSCRIBE
Contact: <sip:172.24.190.81:5060>
Event: presence
User-Agent: eXosip/3.1.0
Content-Length: 0


| INFO1 | <eXtl_udp.c: 331> Message received from: 172.24.190.81:5060
| INFO1 | <eXtl_udp.c: 337> Message received from: 172.24.190.81:5060
| INFO3 | <udp.c: 1602> MESSAGE REC. CALLID:1843029254
| INFO1 | <udp.c: 1640> Message received from: 172.24.190.81:5060
| INFO4 | <osip_transaction.c: 388> sipevent tr->transactionid: 1
| INFO4 | <osip_transaction.c: 391> sipevent tr->state: 11
| INFO4 | <osip_transaction.c: 394> sipevent evt->type: 13
| INFO4 | <osip_transaction.c: 397> sipevent evt->sip: 31fc98
| INFO3 | <jcallback.c: 649> cb_rcv1xx (id=1)
| INFO4 | <osip_transaction.c: 436> sipevent evt: method called!
| INFO2 | <eXconf.c: 798> eXosip: timer sec:0 usec:100000!
Event 'SUBSCRIBE is being processed!' received...
response = '101'
.
.
.
.

| INFO2 | <eXconf.c: 798> eXosip: timer sec:0 usec:100000!
| INFO1 | <jcallback.c: 1837> cb_sndreq_retransmission (id=1)
| INFO4 | <osip_transaction.c: 436> sipevent evt: method called!
| INFO2 | <eXconf.c: 798> eXosip: timer sec:3 usec:100000!
| INFO2 | <eXconf.c: 798> eXosip: timer sec:0 usec:100000!
| INFO2 | <eXconf.c: 798> eXosip: timer sec:0 usec:100000!
| INFO2 | <eXconf.c: 798> eXosip: timer sec:0 usec:100000!
| INFO4 | <osip_transaction.c: 388> sipevent tr->transactionid: 1
| INFO4 | <osip_transaction.c: 391> sipevent tr->state: 12
| INFO4 | <osip_transaction.c: 394> sipevent evt->type: 4
| INFO4 | <osip_transaction.c: 397> sipevent evt->sip: 0
| INFO1 | <jcallback.c: 239> cb_nict_kill_transaction (id=1)
| INFO4 | <osip_transaction.c: 436> sipevent evt: method called!
| INFO3 | <udp.c: 2223> Release a terminated transaction
| INFO4 | <osip_transaction.c: 294> transaction already removed from list 1!
| INFO2 | <osip_transaction.c: 317> free transaction ressource 1 1843029254
| INFO2 | <nict.c: 135> free nict ressource
| INFO2 | <eXconf.c: 783> eXosip: Reseting timer to 10s before waking up!
event :40
Event '4xx received for SUBSCRIBE!' received...
response = '101'



*log for client 2, *
SUBSCRIBE sip:172.24.190.81:5060 SIP/2.0
Via: SIP/2.0/UDP 172.24.190.77:5060;rport;branch=z9hG4bK1984132514
From: <sip:172.24.190.77:5060>;tag=1433312345
To: <sip:172.24.190.81:5060>
Call-ID: 1843029254
CSeq: 20 SUBSCRIBE
Contact: <sip:172.24.190.77:5060>
Content-Type: text/plain
Max-Forwards: 70
User-Agent: eXosip/3.1.0
Expires: 600
Event: presence
Content-Length:    28

subscribe from 172.24.190.77
| INFO1 | <eXtl_udp.c: 331> Message received from: 172.24.190.77:5060
| INFO1 | <eXtl_udp.c: 337> Message received from: 172.24.190.77:5060
| INFO3 | <udp.c: 1602> MESSAGE REC. CALLID:1843029254
| INFO1 | <udp.c: 1640> Message received from: 172.24.190.77:5060
| INFO1 | <udp.c: 1650> This is a request
| INFO2 | <osip_transaction.c: 138> allocating transaction ressource 1
1843029254
| INFO2 | <nist.c: 32> allocating NIST context
| INFO4 | <osip_transaction.c: 388> sipevent tr->transactionid: 1
| INFO4 | <osip_transaction.c: 391> sipevent tr->state: 15
| INFO4 | <osip_transaction.c: 394> sipevent evt->type: 12
| INFO4 | <osip_transaction.c: 397> sipevent evt->sip: 2e7b50
| INFO3 | <jcallback.c: 442> cb_rcvunkrequest (id=1)
| INFO4 | <osip_transaction.c: 436> sipevent evt: method called!
| INFO4 | <osip_transaction.c: 388> sipevent tr->transactionid: 1
| INFO4 | <osip_transaction.c: 391> sipevent tr->state: 16
| INFO4 | <osip_transaction.c: 394> sipevent evt->type: 19
| INFO4 | <osip_transaction.c: 397> sipevent evt->sip: 31b348
| INFO2 | <eXutils.c: 858> DNS resolution with 172.24.190.77:5060
| INFO2 | <eXutils.c: 876> getaddrinfo returned the following addresses:
| INFO2 | <eXutils.c: 883> 172.24.190.77 port 5060
| INFO1 | <eXtl_udp.c: 570> Message sent: (to dest=172.24.190.77:5060)
SIP/2.0 101 Dialog Establishement
Via: SIP/2.0/UDP 172.24.190.77:5060;rport=5060;branch=z9hG4bK1984132514
From: <sip:172.24.190.77:5060>;tag=1433312345
To: <sip:172.24.190.81:5060>;tag=1806277727
Call-ID: 1843029254
CSeq: 20 SUBSCRIBE
Contact: <sip:172.24.190.81:5060>
Event: presence
User-Agent: eXosip/3.1.0
Content-Length: 0


| INFO3 | <jcallback.c: 1775> cb_snd123456xx (id=1)
| INFO4 | <osip_transaction.c: 436> sipevent evt: method called!
| INFO2 | <eXconf.c: 783> eXosip: Reseting timer to 10s before waking up!
Segmentation fault


Thanks
Sithara

On Thu, Aug 27, 2009 at 6:49 PM, Aymeric Moizard <jack at atosc.org> wrote:

>
>
>
> On Thu, 27 Aug 2009, Sithara Santharam wrote:
>
> > Hi,
> > Is there a way to send presence status within clients without involving a
> > SIP server ? Can this be done using Subscription and notify? The clients
> > have SIP uri in <sip:192.168.1.100:5060> format and they are connected
> to
> > each other using a switch.
>
> No need for a server if you already know the destination IP.
> Aymeric
>
> > Thanks
> > Sithara
> > _______________________________________________
> > Osip mailing list
> > Osip at atosc.org
> > http://www.atosc.org/mailinglist/listinfo/osip
> >
> _______________________________________________
> Osip mailing list
> Osip at atosc.org
> http://www.atosc.org/mailinglist/listinfo/osip
>


More information about the Osip mailing list