Hi everyone,
I am curious if there is a way to make SIP session between two kamailio server instances eg. if there is way to use kamailio as an SIP client and SIP server at the same time.
I am thinking about the following configuration:
kamailio main server ----- kamailio server B ----- SIP client B1 | | | kamailio server A ----- SIP client A2 | | | SIP client A1
I want to be able to make SIP session between: SIP client A1 : SIP client A2 kamailio server A : kamailio server B SIP client A1 : SIP client B1 (this would be great)
If there is currently no way to do this do you think that it would be possible to create the module which will support this kind of functionality?
Thanks in advance for the replies
Thanks for the quick response.
So there is no way to configure the kamailio out of the box for the scenario which I am trying to achieve. But do you think, that it is possible to program some simple kamailo module which will implement some really simple SIP client? (kamailio can create/modify SIP messages, it is able to receive and send them so I think that it is possible I am just not sure)
What I am trying to achieve is to encapsulate SIP communication between "SIP client A1" and "SIP client B1" eg. communication between these two endpoints will go through data link between "kamailio server A" and "kamailio server B".
I know that I will need to keep the database of registered users on "kamailio server A" as well as on "kamailio server B" and these "databases" will be synchronized by "kamailio main server" since both servers have this endpoint in common. I am thinking about using Subscribe/Notify for the purposes of updating servers' internal databases. That's why I want to create SIP session between "kamailio server A" and "kamailio server B" - probably for each call between two endpoints (eg. A1:B1, A2:B1) there will be SIP session between these two servers.
I've programmed simple kamailio module for receiving/sending SIP messages eg. I can parse the SIP messages before the kamailio will send them to UA. I am also able to send RTP packet from one instance to UA and I think that there won't be problem to send it to another instance of kamailio server.
What do you think?
On Sun, Feb 14, 2016 at 1:57 AM, Alex Balashov abalashov@evaristesys.com wrote:
No, because Kamailio is a SIP proxy, not a SIP user agent (UA). Only UAs can originate and receive calls -- that is, to serve as the endpoints of a call. Kamailio plays an entirely different role, which is to relay/route messages _between_ endpoints.
-- Alex Balashov | Principal | Evariste Systems LLC 303 Perimeter Center North, Suite 300 Atlanta, GA 30346 United States
Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
Sent from my BlackBerry. *From: *Cockhootec Yahrabee *Sent: *Saturday, February 13, 2016 19:16 *To: *Kamailio (SER) - Users Mailing List *Reply To: *Kamailio (SER) - Users Mailing List *Subject: *[SR-Users] Make SIP session between two kamailio servers
Hi everyone,
I am curious if there is a way to make SIP session between two kamailio server instances eg. if there is way to use kamailio as an SIP client and SIP server at the same time.
I am thinking about the following configuration:
kamailio main server ----- kamailio server B ----- SIP client B1 | | | kamailio server A ----- SIP client A2 | | | SIP client A1
I want to be able to make SIP session between: SIP client A1 : SIP client A2 kamailio server A : kamailio server B SIP client A1 : SIP client B1 (this would be great)
If there is currently no way to do this do you think that it would be possible to create the module which will support this kind of functionality?
Thanks in advance for the replies
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hello,
On 02/14/2016 10:59 AM, Cockhootec Yahrabee wrote:
But do you think, that it is possible to program some simple kamailo module which will implement some really simple SIP client? (kamailio can create/modify SIP messages, it is able to receive and send them so I think that it is possible I am just not sure)
Kamailio has a UAC module which can be used to synthesise and send SIP messages:
http://kamailio.org/docs/modules/4.3.x/modules/uac.html
However, the capacity to send them does not in any way imply a UA layer functional to the necessary degree to receive them, nor does the capacity to send messages imply the ability to initiate and maintain a call leg, or any other complex stateful superset of "message". This is because the UAC module is intended to accomplish a rather narrow range of purposes for which it is necessary to endogenously originate messages in some way.
In general, Kamailio has plenty of technical capabilities that reach beyond the formal limitations of a proxy. However, they often need to be filed under the heading of: "Just because you can doesn't mean you should."
What I am trying to achieve is to encapsulate SIP communication between "SIP client A1" and "SIP client B1" eg. communication between these two endpoints will go through data link between "kamailio server A" and "kamailio server B".
Well, that in and of itself doesn't seem problematic; if I understand this topology right, why would this pose a problem?
UA A1 <--> Proxy P1 <--> Proxy P2 <--> UA B1
In other words, perhaps there is some semantic confusion here arising from the use of the "SIP server" terminology?
That's why I want to create SIP session between "kamailio server A" and "kamailio server B" - probably for each call between two endpoints (eg. A1:B1, A2:B1) there will be SIP session between these two servers.
You can't do that. The session can only be constructed between the endpoints. But there's on reason why one or more Kamailio servers cannot remain inline to the signalling path for the duration of the session(s) and provide some useful functionality.
So, in short, you need to clarify just what it is you're trying to accomplish. It may very well be that your choice of terminology is confusing the issue, and that Kamailio is capable of doing what you're asking. On the other hand, if you're genuinely trying to turn it into a UA/endpoint, it's the wrong tool for the job; it's simply not an endpoint.
-- Alex
i am sorry my approach was probably unclear.
Nevertheless I realized that my thought was too overcomplicated. I realized that for my purposes it will be sufficient to route SIP messages between two instances of Kamailio eg.
UA1 <----> K1 <--------> K2 <-----> UA2
So yes this is exactly what did you suggest.
Is this common scenario? Is there any documentation on how to configure Kamailio this way?
Thanks in advance
On Sun, Feb 14, 2016 at 5:30 PM, Alex Balashov abalashov@evaristesys.com wrote:
Hello,
On 02/14/2016 10:59 AM, Cockhootec Yahrabee wrote:
But do you think, that it is possible to program some simple kamailo
module which will implement some really simple SIP client? (kamailio can create/modify SIP messages, it is able to receive and send them so I think that it is possible I am just not sure)
Kamailio has a UAC module which can be used to synthesise and send SIP messages:
http://kamailio.org/docs/modules/4.3.x/modules/uac.html
However, the capacity to send them does not in any way imply a UA layer functional to the necessary degree to receive them, nor does the capacity to send messages imply the ability to initiate and maintain a call leg, or any other complex stateful superset of "message". This is because the UAC module is intended to accomplish a rather narrow range of purposes for which it is necessary to endogenously originate messages in some way.
In general, Kamailio has plenty of technical capabilities that reach beyond the formal limitations of a proxy. However, they often need to be filed under the heading of: "Just because you can doesn't mean you should."
What I am trying to achieve is to encapsulate SIP communication
between "SIP client A1" and "SIP client B1" eg. communication between these two endpoints will go through data link between "kamailio server A" and "kamailio server B".
Well, that in and of itself doesn't seem problematic; if I understand this topology right, why would this pose a problem?
UA A1 <--> Proxy P1 <--> Proxy P2 <--> UA B1
In other words, perhaps there is some semantic confusion here arising from the use of the "SIP server" terminology?
That's why I want to create SIP session between "kamailio server A"
and "kamailio server B" - probably for each call between two endpoints (eg. A1:B1, A2:B1) there will be SIP session between these two servers.
You can't do that. The session can only be constructed between the endpoints. But there's on reason why one or more Kamailio servers cannot remain inline to the signalling path for the duration of the session(s) and provide some useful functionality.
So, in short, you need to clarify just what it is you're trying to accomplish. It may very well be that your choice of terminology is confusing the issue, and that Kamailio is capable of doing what you're asking. On the other hand, if you're genuinely trying to turn it into a UA/endpoint, it's the wrong tool for the job; it's simply not an endpoint.
-- Alex
-- Alex Balashov | Principal | Evariste Systems LLC 303 Perimeter Center North, Suite 300 Atlanta, GA 30346 United States
Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users