Discussion:
[Kamailio-Users] Kamailio and SIP <-> XMPP gateway
Even André Fiskvik
2010-02-28 17:43:36 UTC
Permalink
Hi.

I've just started looking at kamailio, and I'm experimenting a bit with configuring a SIP <-> XMPP gateway with it using the pua_xmpp module.
The configuration part hasn't beed straight-forward, but I think I'm starting to get somewhere.
Both kamailio and XMPP/Jabber are new technologies for me serverside, so I don't have a great deal of experience with either.

In short, what I'm trying to accomplish at this stage is:
- Have CounterPath eyeBeam/Bria to register to my kamailio server
- Have Aastra 6755i register to my kamailio server
- Connect an XMPP client to my XMPP server
- The CounterPath eyeBeam/Bria, Aastra and the XMPP client should all be able to see each others presence
- The CounterPath eyeBeam/Bria should be able to IM other eyeBeams/Brias
- The CounterPath eyeBeam/bria should be able to IM the XMPP clients and the other way around

Reading through various earlier discussion though, I've found an issue that I wonder wether has been solved or not.
In some mailing-lists I saw that only text/plain MESSAGEs was supported through the xmpp gateway, is this still true?
If that's the case, is there any way to get CounterPath eyeBeam/Bria to work in the decribed scenario?
As to my knowledge it can only send text/html ?

Could anyone with a good knowledge of Kamailio and the various modules pua_xmpp, xmpp, pua, pua_bla
comment on this kind of setup is at all possible with kamailio and it's current state?

Is there any way I can verify that opensips connects to the XMPP server correctly?
I tried connecting FreeSWITCH to my XMPP server (Openfire) in component mode, and it would
show up connected in Openfire's administration GUI, however I can not see the same when I try
to configure kamailio.
If anyone has experience with this setup and have another XMPP server they have tested it with,
I would also want to try to swap Openfire with that (given they also have some guidance on XMPP server configuration).


Best regards,
Even André Fiskvik
Daniel-Constantin Mierla
2010-03-01 11:23:50 UTC
Permalink
Hello,
Hi.
I've just started looking at kamailio, and I'm experimenting a bit with configuring a SIP<-> XMPP gateway with it using the pua_xmpp module.
The configuration part hasn't beed straight-forward, but I think I'm starting to get somewhere.
Both kamailio and XMPP/Jabber are new technologies for me serverside, so I don't have a great deal of experience with either.
- Have CounterPath eyeBeam/Bria to register to my kamailio server
- Have Aastra 6755i register to my kamailio server
- Connect an XMPP client to my XMPP server
- The CounterPath eyeBeam/Bria, Aastra and the XMPP client should all be able to see each others presence
- The CounterPath eyeBeam/Bria should be able to IM other eyeBeams/Brias
- The CounterPath eyeBeam/bria should be able to IM the XMPP clients and the other way around
Reading through various earlier discussion though, I've found an issue that I wonder wether has been solved or not.
In some mailing-lists I saw that only text/plain MESSAGEs was supported through the xmpp gateway, is this still true?
yes and 'no' :-). Yes because nothing was done in this respect to the
module itself. 'No' because now (kamailio 3.0) you can use
transformations to get content of xml documents and if the body is xhtml.
If that's the case, is there any way to get CounterPath eyeBeam/Bria to work in the decribed scenario?
As to my knowledge it can only send text/html ?
You can build a new message with uac module or update the existing SIP
message (content type, body), do msg_apply_changes():
http://kamailio.org/docs/modules/3.0.x/modules_k/textops.html#id2513318

and they use xmpp functions.

You can use ngrep to sniff the network to see connection between
kamailio (openser) and xmpp server as well as run kamailio in debug mode
in order to get more verbose log messages for each operation.

Note as well the purple module, a different approach, but might suit you:
http://kamailio.org/docs/modules/3.0.x/modules_k/purple.html

The old jabber module I developed is obsoleted, so nobody should rely on it.

Cheers,
Daniel
--
Daniel-Constantin Mierla
Kamailio SIP Router Masterclass, Berlin, March 22-26, 2010
* http://www.asipto.com/index.php/sip-router-masterclass/
Daniel-Constantin Mierla
2010-03-02 13:25:07 UTC
Permalink
Thanks for the answers Daniel.
Post by Daniel-Constantin Mierla
Hello,
Post by Even André Fiskvik
Reading through various earlier discussion though, I've found an issue that I wonder wether has been solved or not.
In some mailing-lists I saw that only text/plain MESSAGEs was supported through the xmpp gateway, is this still true?
yes and 'no' :-). Yes because nothing was done in this respect to the module itself. 'No' because now (kamailio 3.0) you can use transformations to get content of xml documents and if the body is xhtml.
That's good to know.
Post by Daniel-Constantin Mierla
Post by Even André Fiskvik
If that's the case, is there any way to get CounterPath eyeBeam/Bria to work in the decribed scenario?
As to my knowledge it can only send text/html ?
http://kamailio.org/docs/modules/3.0.x/modules_k/textops.html#id2513318
and they use xmpp functions.
I did a "quick" hack to support relying the MESSAGE by just setting the content-type to text/plain for now to do some testing.
The error about unsupported content-type thus went away.
Post by Daniel-Constantin Mierla
You can use ngrep to sniff the network to see connection between kamailio (openser) and xmpp server as well as run kamailio in debug mode in order to get more verbose log messages for each operation.
I've tried sniffing traffic on the server, and it doesn't seem like kamailio tries to connect to the XMPP server at all :/
Any clues what might be causing this?
Did you run in debug mode? Can you post the log messages?
I've attached my kamailio config-file as well if anyone would take
You sent the email only to me. Did you intend it for mailing list? I
recommend to keep sending to mailing list apart of messages with private
data. In this way many can reply and other can learn from discussion.
a look at it (the main config is in xmpp.cfg) and also a diagram showing how the components are realated to each other.
I will try to look over configs when I get some time -- because of a
trip ahead I am pretty constrained today.

Cheers,
Daniel
--
Daniel-Constantin Mierla
Kamailio SIP Router Masterclass, Berlin, March 22-26, 2010
* http://www.asipto.com/index.php/sip-router-masterclass/
Even André Fiskvik
2010-03-02 13:42:13 UTC
Permalink
Post by Daniel-Constantin Mierla
Post by Daniel-Constantin Mierla
You can use ngrep to sniff the network to see connection between kamailio (openser) and xmpp server as well as run kamailio in debug mode in order to get more verbose log messages for each operation.
I've tried sniffing traffic on the server, and it doesn't seem like kamailio tries to connect to the XMPP server at all :/
Any clues what might be causing this?
Did you run in debug mode? Can you post the log messages?
By debug-mode I guess you mean "debug=4" and without forking? Is this sufficient?
I din't include any log messages as it didn't seem to be anything related to calling xmpp functions there at all :/
Post by Daniel-Constantin Mierla
I've attached my kamailio config-file as well if anyone would take
You sent the email only to me. Did you intend it for mailing list? I recommend to keep sending to mailing list apart of messages with private data. In this way many can reply and other can learn from discussion.
I'm truly sorry, the message was of course ment to go to the list.
I'm used to messages going to the list default when using the "reply" button.
Post by Daniel-Constantin Mierla
a look at it (the main config is in xmpp.cfg) and also a diagram showing how the components are realated to each other.
I will try to look over configs when I get some time -- because of a trip ahead I am pretty constrained today.
Thanks, that sounds great.
However I must mention that I tried downgrading to kamailio 1.5.4, and when I use the same config there
I can see from the log that it tries to connect to the XMPP server.
Might something be broken either in my 3.0.0 install or in 3.0.0 in general?


Best regards,
Even André
Daniel-Constantin Mierla
2010-03-02 15:57:06 UTC
Permalink
Post by Even André Fiskvik
Post by Daniel-Constantin Mierla
Post by Daniel-Constantin Mierla
You can use ngrep to sniff the network to see connection between kamailio (openser) and xmpp server as well as run kamailio in debug mode in order to get more verbose log messages for each operation.
I've tried sniffing traffic on the server, and it doesn't seem like kamailio tries to connect to the XMPP server at all :/
Any clues what might be causing this?
Did you run in debug mode? Can you post the log messages?
By debug-mode I guess you mean "debug=4" and without forking? Is this sufficient?
You should let forking on. In case you want messages to standard error
instead of syslog, set log_stderror=yes
Post by Even André Fiskvik
I din't include any log messages as it didn't seem to be anything related to calling xmpp functions there at all :/
Did you put a xlog message just before it to be sure the cfg execution
reaches that point?
Post by Even André Fiskvik
Post by Daniel-Constantin Mierla
I've attached my kamailio config-file as well if anyone would take
You sent the email only to me. Did you intend it for mailing list? I recommend to keep sending to mailing list apart of messages with private data. In this way many can reply and other can learn from discussion.
I'm truly sorry, the message was of course ment to go to the list.
I'm used to messages going to the list default when using the "reply" button.
np, this ML requiers"reply all" :-).
Post by Even André Fiskvik
Post by Daniel-Constantin Mierla
a look at it (the main config is in xmpp.cfg) and also a diagram showing how the components are realated to each other.
I will try to look over configs when I get some time -- because of a trip ahead I am pretty constrained today.
Thanks, that sounds great.
However I must mention that I tried downgrading to kamailio 1.5.4, and when I use the same config there
I can see from the log that it tries to connect to the XMPP server.
Might something be broken either in my 3.0.0 install or in 3.0.0 in general?
not much was changed. Can you list the processes with kamctl ps for both
versions?

Cheers,
Daniel
--
Daniel-Constantin Mierla
Kamailio SIP Router Masterclass, Berlin, March 22-26, 2010
* http://www.asipto.com/index.php/sip-router-masterclass/
Henning Westerholt
2010-03-03 13:27:00 UTC
Permalink
Post by Even André Fiskvik
I'm truly sorry, the message was of course ment to go to the list.
I'm used to messages going to the list default when using the "reply" button.
Hi Daniel,

what about configuring the mailman in a way that mails goes by default to the
list instead of the sender?

Cheers,

Henning

Loading...