List Info

Thread: SipPimClient integration into sipxtapi done




SipPimClient integration into sipxtapi done
country flaguser name
Czech Republic
2007-03-18 20:28:32
I had nothing else to do so I've integrated SipPimClient
from 
sipxtacklib into sipxtapi.

Although I still think this messaging is useless most of the
time, its 
good for experimenting.

I don't like bad solutions of using internal
functions/classes of 
libraries so I decided to integrate sippimclient into
sipxtapi. It 
basically creates an instance in sipxtapi initialization,
starts the 
OsServerTask, registers a new event handler which is defined
in 
sipxtapievents.cpp. You dont need to register any new event
handlers, it 
works with the standard sipxtapi event handler. I have added
code for 
printing event, duplicating, freeing event. There is new
event category 
- EVENT_CATEGORY_PIM, which has its specific event data. All
event data 
is only basic C datatypes, no UtlString or anything like
that. The event 
data contains event enum, which is currently only
PIM_INCOMING_MESSAGE. 
There is SIPX_PIM_INFO struct, which contains the message
details.
During sipxuninitialize, the OsServerTask of sippimclient is
shutdown 
and deleted. I have modified SipPimClient a little bit so it
also 
removes message observer from SipUserAgent in destructor,
and limited 
the number of iterations in internal loop of
sendPagerMessage to 2. It's 
not right to have infinite loops in any function.

To send a message you call new function in sipxtapi - 
sipxPIMSendPagerMessage. The presentityAor of SipPimClient
is set to 
szIdentity parameter of sipxInitialize.

I also found a memory leak in sipxtapievents.cpp - in 
sipxFireKeepaliveEvent memory after strdup is not freed. It
has to be 
freed there, the callback function (which is always only 1 -

SipXEventDispatcher) just makes a copy and frees its own
copy.

So far I haven't had any crashes when using this
sippimclient, but it 
doesn't succeed in delivering message if I use a certain sip
proxy. I 
get 404 Not found response from sip proxy. If I dial the
same sip uri it 
works, but sending message to the same uri doesnt. I have
tried to send 
message to sip:myipaddress and it sent message to myself, I
have 
received my new event type.

Jaroslav Libak

_______________________________________________
sipxtapi-dev mailing list
sipxtapi-devlist.sipfoundry.org
List Archive: http
://list.sipfoundry.org/archive/sipxtapi-dev/

Re: SipPimClient integration into sipxtapi done
user name
2007-03-18 22:47:33
Hi Jaro,

The handleMessage member gets invoked two times for each IM sent to the local IP address. Are you getting the same behavior?

Medhavi.

On 3/18/07, jarol1seznam.cz">jarol1seznam.cz < J.Libaksh.cvut.cz">J.Libaksh.cvut.cz> wrote:
I had nothing else to do so I've integrated SipPimClient from
sipxtacklib into sipxtapi.

Although I still think this messaging is useless most of the time, its
good for experimenting.

I don't like bad solutions of using internal functions/classes of
libraries so I decided to integrate sippimclient into sipxtapi. It
basically creates an instance in sipxtapi initialization, starts the
OsServerTask, registers a new event handler which is defined in
sipxtapievents.cpp . You dont need to register any new event handlers, it
works with the standard sipxtapi event handler. I have added code for
printing event, duplicating, freeing event. There is new event category
- EVENT_CATEGORY_PIM, which has its specific event data. All event data
is only basic C datatypes, no UtlString or anything like that. The event
data contains event enum, which is currently only PIM_INCOMING_MESSAGE.
There is SIPX_PIM_INFO struct, which contains the message details.
During sipxuninitialize, the OsServerTask of sippimclient is shutdown
and deleted. I have modified SipPimClient a little bit so it also
removes message observer from SipUserAgent in destructor, and limited
the number of iterations in internal loop of sendPagerMessage to 2. It's
not right to have infinite loops in any function.

To send a message you call new function in sipxtapi -
sipxPIMSendPagerMessage. The presentityAor of SipPimClient is set to
szIdentity parameter of sipxInitialize.

I also found a memory leak in sipxtapievents.cpp - in
sipxFireKeepaliveEvent memory after strdup is not freed. It has to be
freed there, the callback function (which is always only 1 -
SipXEventDispatcher) just makes a copy and frees its own copy.

So far I haven't had any crashes when using this sippimclient, but it
doesn&#39;t succeed in delivering message if I use a certain sip proxy. I
get 404 Not found response from sip proxy. If I dial the same sip uri it
works, but sending message to the same uri doesnt. I have tried to send
message to sip:myipaddress and it sent message to myself, I have
received my new event type.

Jaroslav Libak

_______________________________________________
sipxtapi-dev mailing list
sipxtapi-devlist.sipfoundry.org">sipxtapi-devlist.sipfoundry.org
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/

Re: SipPimClient integration into sipxtapi done
user name
2007-03-19 05:59:50
On 3/19/07, jarol1seznam.cz <J.Libaksh.cvut.cz> wrote:
> I had nothing else to do so I've integrated
SipPimClient from
> sipxtacklib into sipxtapi.
I do not see any patch on this. Am I missing something?

-- 
Regards,
Alexander Chemeris.

SIPez LLC.
SIP VoIP, IM and Presence Consulting
http://www.SIPez.com
tel: +1 (617) 273-4000
_______________________________________________
sipxtapi-dev mailing list
sipxtapi-devlist.sipfoundry.org
List Archive: http
://list.sipfoundry.org/archive/sipxtapi-dev/

Re: SipPimClient integration into sipxtapi done
country flaguser name
Czech Republic
2007-03-19 06:15:42
Medhavi Bhatia wrote:
> Hi Jaro,
>
> The handleMessage member gets invoked two times for
each IM sent to 
> the local IP address. Are you getting the same
behavior?
>
> Medhavi.
>
No, here I get only 1 message, I don't know why.

Jaroslav Libak

_______________________________________________
sipxtapi-dev mailing list
sipxtapi-devlist.sipfoundry.org
List Archive: http
://list.sipfoundry.org/archive/sipxtapi-dev/

Re: SipPimClient integration into sipxtapi done
country flaguser name
Czech Republic
2007-03-19 06:45:43
Alexander Chemeris wrote:
> On 3/19/07, jarol1seznam.cz <J.Libaksh.cvut.cz> wrote:
>   
>> I had nothing else to do so I've integrated
SipPimClient from
>> sipxtacklib into sipxtapi.
>>     
> I do not see any patch on this. Am I missing
something?
>
>   
Patches are in attachment. 1st is for sipxtacklib
(pimclient) and 2nd 
for sipxtapi.
They have been edited by hand as I have multiple patches in
the same 
files. So it might say patch is malformed.

Jaroslav Libak


_______________________________________________
sipxtapi-dev mailing list
sipxtapi-devlist.sipfoundry.org
List Archive: http
://list.sipfoundry.org/archive/sipxtapi-dev/
  
Re: SipPimClient integration into sipxtapi done
user name
2007-03-19 06:54:08
On 3/19/07, jarol1seznam.cz <J.Libaksh.cvut.cz> wrote:
> Alexander Chemeris wrote:
> > On 3/19/07, jarol1seznam.cz <J.Libaksh.cvut.cz> wrote:
> Patches are in attachment. 1st is for sipxtacklib
(pimclient) and 2nd
> for sipxtapi.
> They have been edited by hand as I have multiple
patches in the same
> files. So it might say patch is malformed.
Could you post it to tracker, please?

-- 
Regards,
Alexander Chemeris.

SIPez LLC.
SIP VoIP, IM and Presence Consulting
http://www.SIPez.com
tel: +1 (617) 273-4000
_______________________________________________
sipxtapi-dev mailing list
sipxtapi-devlist.sipfoundry.org
List Archive: http
://list.sipfoundry.org/archive/sipxtapi-dev/

Re: SipPimClient integration into sipxtapi done
country flaguser name
United States
2007-03-19 07:28:45
SipPimClient was a quick hack for testing S/MIME encoded
text messages.
 The model used for presence subscriptions in SipPimClient
is not very
useful for maintaining subscriptions for a user's list of
buddies.  I
think SIpPimClient is useful for testing or demonstration
purposes, but
I do not suggest maintaining it for as something useful for
production
purposes.  SIPez uses proprietary solution which works on
top of
sipXtack and sipXtapi for presencse and instant messaging.

Cheers,
Dan

--- "jarol1seznam.cz" <J.Libaksh.cvut.cz> wrote:

> I had nothing else to do so I've integrated
SipPimClient from 
> sipxtacklib into sipxtapi.
> 
> Although I still think this messaging is useless most
of the time,
> its 
> good for experimenting.
> 
> I don't like bad solutions of using internal
functions/classes of 
> libraries so I decided to integrate sippimclient into
sipxtapi. It 
> basically creates an instance in sipxtapi
initialization, starts the 
> OsServerTask, registers a new event handler which is
defined in 
> sipxtapievents.cpp. You dont need to register any new
event handlers,
> it 
> works with the standard sipxtapi event handler. I have
added code for
> 
> printing event, duplicating, freeing event. There is
new event
> category 
> - EVENT_CATEGORY_PIM, which has its specific event
data. All event
> data 
> is only basic C datatypes, no UtlString or anything
like that. The
> event 
> data contains event enum, which is currently only
> PIM_INCOMING_MESSAGE. 
> There is SIPX_PIM_INFO struct, which contains the
message details.
> During sipxuninitialize, the OsServerTask of
sippimclient is shutdown
> 
> and deleted. I have modified SipPimClient a little bit
so it also 
> removes message observer from SipUserAgent in
destructor, and limited
> 
> the number of iterations in internal loop of
sendPagerMessage to 2.
> It's 
> not right to have infinite loops in any function.
> 
> To send a message you call new function in sipxtapi - 
> sipxPIMSendPagerMessage. The presentityAor of
SipPimClient is set to 
> szIdentity parameter of sipxInitialize.
> 
> I also found a memory leak in sipxtapievents.cpp - in 
> sipxFireKeepaliveEvent memory after strdup is not
freed. It has to be
> 
> freed there, the callback function (which is always
only 1 - 
> SipXEventDispatcher) just makes a copy and frees its
own copy.
> 
> So far I haven't had any crashes when using this
sippimclient, but it
> 
> doesn't succeed in delivering message if I use a
certain sip proxy. I
> 
> get 404 Not found response from sip proxy. If I dial
the same sip uri
> it 
> works, but sending message to the same uri doesnt. I
have tried to
> send 
> message to sip:myipaddress and it sent message to
myself, I have 
> received my new event type.
> 
> Jaroslav Libak



SIPez LLC  
SIP VoIP, IM and Presence Consulting  
http://www.sipez.com  
tel: +1 (617) 273-4000
_______________________________________________
sipxtapi-dev mailing list
sipxtapi-devlist.sipfoundry.org
List Archive: http
://list.sipfoundry.org/archive/sipxtapi-dev/

[1-7]

about | contact  Other archives ( Real Estate discussion Medical topics )