Juraj Bednar
2005-Jul-04 10:01 UTC
[Asterisk-Users] [Asterisk-Dev] presence and IM again, want to develop a working "hack"
Hello, I was again asked to try to add support for presence (SUBSCRIBE/NOTIFY) and IM using SIMPLE. I have few questions: a.) are there any, at least partial projects, patches, anything, that at least partly implements presence and/or IM to chan_sip? I don't care about presence on other channels, I have one SIP client per user. I've read this list's archive several times and found lots of wonderful proposals, which try to convince asking users, what needs to be done to support this well (multichannel, multiple phones per user, ...), mainly saying, that without very difficult reworking of internals, it would not be supported. What I really need is to hack it into chan_sip.c. I need the support of other channels and applications (f.e. MeetMe), but where I really care about presence and IM is SIP. So, any project, hack, patch, anything, that would allow me to go further with this would be greatly appreciated. I found this page in Russian: http://www.asterisk-support.ru/forums/development/53843189454 that somehow deals with the problem. I tried babelfish translation, (http://babelfish.altavista.com/babelfish/trurl_pagecontent?lp=ru_en&trurl=http%3a%2f%2fwww.asterisk-support.ru%2fforums%2fdevelopment%2f53843189454) but I was not able to find out, if it really at least partially solves this problem, but as far as I understand it, Windows Messanger makes use of Subscribe/Notify, so this should be it. b.) Anyone has a partial solution using SER (which supports presence and IM) as a frontend, but routing all calls through Asterisk? Can this be done? I need the calls to go via Asterisk (I don't mean only sip notifications, but also the data, so I have canreinvite=no). So basically, SER would be a registrar "proxy" to Asterisk, which would do the authentication. The only thing, that SER would do would be to handle presence and IM and pass everything else on to Asterisk (as far as I know, SER can't pass traffic through it. I need the data to pass through the SIP server, since machines in my network topology don't see each other, it's a star with Asterisk in centre -- quite poetic indeed:). Any ideas, pointers to similiar configurations, ... are welcome. c.) If there is no solution to start with, is it possible to implement it only to chan_sip? I'm not familiar with Asterisk source code at all. Where are the places to look (in chan_sip.c) which are best to hook this code. Again, any code, hints, etc. about the structure of the source code are really welcome. Doing this in a clean way (although it's a hack) so it can be reused by community as much as possible is my intent. If anyone wants to help with the project by donating coder's time, mail me off the list. I hope I'll be able to support presence for hardphones and Xten's eyeBeam softphone in a few days with your help. Best wishes and thanks for any replies, Juraj. _______________________________________________ Asterisk-Dev mailing list Asterisk-Dev@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-dev To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
Michiel van Baak
2005-Jul-04 13:50 UTC
[Asterisk-Users] presence and IM again, want to develop a working "hack"
Juraj Bednar wrote:> Hello, > > I was again asked to try to add support for presence > (SUBSCRIBE/NOTIFY) and IM using SIMPLE. I have few questions: > > a.) are there any, at least partial projects, patches, anything, > that at least partly implements presence and/or IM to chan_sip? I > don't care about presence on other channels, I have one SIP client per > user. I've read this list's archive several times and found lots of > wonderful proposals, which try to convince asking users, what needs to > be done to support this well (multichannel, multiple phones per user, > ...), mainly saying, that without very difficult reworking of > internals, it would not be supported. What I really need is to hack it > into chan_sip.c. I need the support of other channels and applications > (f.e. MeetMe), but where I really care about presence and IM is SIP. > > So, any project, hack, patch, anything, that would allow me to go > further with this would be greatly appreciated. I found this page in > Russian: http://www.asterisk-support.ru/forums/development/53843189454 > that somehow deals with the problem. I tried babelfish translation, > (http://babelfish.altavista.com/babelfish/trurl_pagecontent?lp=ru_en&trurl=http%3a%2f%2fwww.asterisk-support.ru%2fforums%2fdevelopment%2f53843189454) > but I was not able to find out, if it really at least partially solves > this problem, but as far as I understand it, Windows Messanger makes > use of Subscribe/Notify, so this should be it. > > b.) Anyone has a partial solution using SER (which supports presence > and IM) as a frontend, but routing all calls through Asterisk? Can > this be done? I need the calls to go via Asterisk (I don't mean only > sip notifications, but also the data, so I have canreinvite=no). So > basically, SER would be a registrar "proxy" to Asterisk, which would > do the authentication. The only thing, that SER would do would be to > handle presence and IM and pass everything else on to Asterisk (as far > as I know, SER can't pass traffic through it. I need the data to pass > through the SIP server, since machines in my network topology don't > see each other, it's a star with Asterisk in centre -- quite poetic > indeed:). Any ideas, pointers to similiar configurations, ... are > welcome. > > c.) If there is no solution to start with, is it possible to > implement it only to chan_sip? I'm not familiar with Asterisk source > code at all. Where are the places to look (in chan_sip.c) which are > best to hook this code. Again, any code, hints, etc. about the > structure of the source code are really welcome. Doing this in a clean > way (although it's a hack) so it can be reused by community as much as > possible is my intent. If anyone wants to help with the project by > donating coder's time, mail me off the list. > > I hope I'll be able to support presence for hardphones and Xten's > eyeBeam softphone in a few days with your help. > > > Best wishes and thanks for any replies, > > Juraj.Hi, Why not use the manager interface to poll if the sip device is logged in? You can make a script that puts your jabber client on/offline based on the manager output. I personally don't think it's a good idea to implement it in chan_sip. One reason for this is that user1 wants msn, user2 wants jabber, user3 wants icq, user4 wants gadugadu etc etc. Are you gonna implement all this ? That is, if you mean Instant Messaging in SIP ;) Forgive me if I'm wrong... Michiel