Hello!
I am relatively new to Kamailio and I'm trying to create a new enviroment using it in my company. I am thinking about use Amazon to host the servers and use OpsWorks to automatically escalate then if necessary. To accomplish this, my idea is to separate the servers, using one dedicated server to run as WebSocket, one to run as proxy and one as a Registrar. I'll be using just one database to store informations to all of my servers. With this, if I need more resources later, I can just create new servers with the specific roles (WebSockets, Proxy, Registrar).
By now, the idea is clear, but the point is that I don't know how to separate the WebSockets server from the proxy server. Actually, I can do this, but when I have one agent using a regular softphone and one agent using WebSockets (with JSSIP) they are not able to establish a session if the softphone user starts it. Now, I want to know if is there a way to use two websockets servers, register users using both of then and start sessions between then, with a separated proxy and registrar.
Has anyone done this before? Is possible to use kamailio like this?
Thanks.
*Bruno Emer*
Mobile: +55 11 96540-0044 email: brunoemer@gmail.com https://www.facebook.com/bruno.emer.5 https://www.linkedin.com/profile/view?id=86461237&trk=spm_pic https://twitter.com/brunoemer_ https://www.flickr.com/photos/122070309@N03/ http://google.com/+BrunoEmer http://instagram.com/brunoemer_
On Sep 17, 2014, at 8:13 AM, Bruno Emer brunoemer@gmail.com wrote:
Hello!
I am relatively new to Kamailio and I'm trying to create a new enviroment using it in my company. I am thinking about use Amazon to host the servers and use OpsWorks to automatically escalate then if necessary. To accomplish this, my idea is to separate the servers, using one dedicated server to run as WebSocket, one to run as proxy and one as a Registrar. I'll be using just one database to store informations to all of my servers. With this, if I need more resources later, I can just create new servers with the specific roles (WebSockets, Proxy, Registrar).
By now, the idea is clear, but the point is that I don't know how to separate the WebSockets server from the proxy server. Actually, I can do this, but when I have one agent using a regular softphone and one agent using WebSockets (with JSSIP) they are not able to establish a session if the softphone user starts it. Now, I want to know if is there a way to use two websockets servers, register users using both of then and start sessions between then, with a separated proxy and registrar.
Has anyone done this before? Is possible to use kamailio like this?
Most things are possible. There are a few questions you'll want to ask. How reliable does this need to be? How many endpoints and of which type, sip or webrtc?
You mention that you have something half working, calls can go one direction. You didn't talk about rtp here. How do you want to handle relaying rtp or will that not be needed and why do you think so?
Kamailio is very reliable and can scale vertically before needing to scale horizontally. If you have a small number of clients say less than thousands, I wouldn't bother separating the different functions except for what you need to give you redundancy which isn't happening in the system you describe.
Collocating all functions on two servers is a good way to start. You would use srv records for both sip and webrtc endpoints to load balance and failover. The complexity is quite high for a setup like this so one server may offer you enough availability for a time and that time might even be counted in months or years.
--FC
Ok, Daniel!
I am trying exactly what you said, but for some reason the proxy server can't forward the message back to the WebSocket server. I am getting "487 Unresolvable destination". Appears that my Proxy Server can't get data from usrloc.
When I register an user using WebRTC I can see that the system stores the information in kamailio database and in the field "contact" it puts a string. The Proxy server is looking in database and just find this information. Actually, I'm trying to understand the entire process that envolves passing information from an Edge Server to a Proxy server that sends the Register information to another Registrar server (as I described before). The database is shared between all the servers, and they are in the same network.
I just read the information in another topic, as you said, but I think that my case is a lil bit different from it. I you agree, I can post my configuration files here. Maybe this can help another users with the same problem!
Thanks again!!!
*Bruno Emer*
Mobile: +55 11 96540-0044 email: brunoemer@gmail.com https://www.facebook.com/bruno.emer.5 https://www.linkedin.com/profile/view?id=86461237&trk=spm_pic https://twitter.com/brunoemer_ https://www.flickr.com/photos/122070309@N03/ http://google.com/+BrunoEmer http://instagram.com/brunoemer_
2014-09-17 9:13 GMT-03:00 Bruno Emer brunoemer@gmail.com:
Hello!
I am relatively new to Kamailio and I'm trying to create a new enviroment using it in my company. I am thinking about use Amazon to host the servers and use OpsWorks to automatically escalate then if necessary. To accomplish this, my idea is to separate the servers, using one dedicated server to run as WebSocket, one to run as proxy and one as a Registrar. I'll be using just one database to store informations to all of my servers. With this, if I need more resources later, I can just create new servers with the specific roles (WebSockets, Proxy, Registrar).
By now, the idea is clear, but the point is that I don't know how to separate the WebSockets server from the proxy server. Actually, I can do this, but when I have one agent using a regular softphone and one agent using WebSockets (with JSSIP) they are not able to establish a session if the softphone user starts it. Now, I want to know if is there a way to use two websockets servers, register users using both of then and start sessions between then, with a separated proxy and registrar.
Has anyone done this before? Is possible to use kamailio like this?
Thanks.
*Bruno Emer*
Mobile: +55 11 96540-0044 email: brunoemer@gmail.com https://www.facebook.com/bruno.emer.5 https://www.linkedin.com/profile/view?id=86461237&trk=spm_pic https://twitter.com/brunoemer_ https://www.flickr.com/photos/122070309@N03/ http://google.com/+BrunoEmer http://instagram.com/brunoemer_
You need to add path with received on the websocket server between browser and register. Also, on the websocket server you need to do processing as for nat traversal.
Cheers, Daniel
On 18/09/14 23:04, Bruno Emer wrote:
Ok, Daniel!
I am trying exactly what you said, but for some reason the proxy server can't forward the message back to the WebSocket server. I am getting "487 Unresolvable destination". Appears that my Proxy Server can't get data from usrloc.
When I register an user using WebRTC I can see that the system stores the information in kamailio database and in the field "contact" it puts a string. The Proxy server is looking in database and just find this information. Actually, I'm trying to understand the entire process that envolves passing information from an Edge Server to a Proxy server that sends the Register information to another Registrar server (as I described before). The database is shared between all the servers, and they are in the same network.
I just read the information in another topic, as you said, but I think that my case is a lil bit different from it. I you agree, I can post my configuration files here. Maybe this can help another users with the same problem!
Thanks again!!!
*_ _* *_ _* *_Bruno Emer_*
Mobile: +55 11 96540-0044 email: brunoemer@gmail.com mailto:brunoemer@gmail.com https://www.facebook.com/bruno.emer.5https://www.linkedin.com/profile/view?id=86461237&trk=spm_pichttps://twitter.com/brunoemer_https://www.flickr.com/photos/122070309@N03/http://google.com/+BrunoEmerhttp://instagram.com/brunoemer_
2014-09-17 9:13 GMT-03:00 Bruno Emer <brunoemer@gmail.com mailto:brunoemer@gmail.com>:
Hello! I am relatively new to Kamailio and I'm trying to create a new enviroment using it in my company. I am thinking about use Amazon to host the servers and use OpsWorks to automatically escalate then if necessary. To accomplish this, my idea is to separate the servers, using one dedicated server to run as WebSocket, one to run as proxy and one as a Registrar. I'll be using just one database to store informations to all of my servers. With this, if I need more resources later, I can just create new servers with the specific roles (WebSockets, Proxy, Registrar). By now, the idea is clear, but the point is that I don't know how to separate the WebSockets server from the proxy server. Actually, I can do this, but when I have one agent using a regular softphone and one agent using WebSockets (with JSSIP) they are not able to establish a session if the softphone user starts it. Now, I want to know if is there a way to use two websockets servers, register users using both of then and start sessions between then, with a separated proxy and registrar. Has anyone done this before? Is possible to use kamailio like this? Thanks. *_ _* *_ _* *_Bruno Emer_* Mobile: +55 11 96540-0044 <tel:%2B55%2011%2096540-0044> email: brunoemer@gmail.com <mailto:brunoemer@gmail.com> <https://www.facebook.com/bruno.emer.5><https://www.linkedin.com/profile/view?id=86461237&trk=spm_pic><https://twitter.com/brunoemer_><https://www.flickr.com/photos/122070309@N03/><http://google.com/+BrunoEmer><http://instagram.com/brunoemer_>
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
Hi, Daniel and Frank!
Thanks for your support! Now, I changed my scenario just a lil bit to make it easy to understand and deploy. I'm doing the following:
1. Created a server using the "Outbound" module configuration example, but add WebSocket support in it. (IP Address 192.168.1.16) 2. Created a server running as Proxy and Registrar with WebSockets support. (IP Address 192.168.1.15) 3. Registered two users (bob and alice@enterprise.com) using WebRTC. These users sent they Register requests to the Oubount server (192.168.1.16). 4. I'm also using an external postgres database to store the user informations. In my proxy/registrar server, I've configurated "modparam("usrloc", "db_mode", 3)", so it will not store data in memory.
After register the users in my scenario, I can see the following information stored in my database (output of kamctl db show location):
id | ruid | username | domain | contact | received | path | expires | q | callid | cseq | last_modified | flags | cflags | user_agent | socket | methods | instance | reg_id -----+----------------------+----------+----------------+------------------------------------------------+-----------------------+------+---------------------+----+------------------------+------+---------------------+-------+--------+-------------------+---------------------+---------+-------------------------------------------------+-------- 277 | uloc-54203f71-10bd-2 | alice | enterprise.com | sip:v4s0prah@o35ctmdnnruv.invalid;transport=ws | sip:192.168.1.16:5060 | | 2014-09-22 15:31:21 | -1 | udb4shpe4dnm1jsl6016s5 | 82 | 2014-09-22 15:26:21 | 0 | 0 | JsSIP 0.4.0-devel | udp:192.168.1.15:80 | 783 | urn:uuid:75c837d1-740a-4c62-baa0-56a06149699e | 1 278 | uloc-54203f71-10bc-2 | bob | enterprise.com | sip:lr78s270@0mkf6fgtprlh.invalid;transport=ws | sip:192.168.1.16:5060 | | 2014-09-22 15:34:02 | -1 | 5mpl9q4bkuqsnpk8r316j5 | 82 | 2014-09-22 15:29:02 | 0 | 0 | JsSIP 0.4.0-devel | udp:192.168.1.15:80 | 783 | urn:uuid:e92ef911-1ae4-45b1-bfc9-b5752b0f2fe1 | 1
So, I can assume that both users are registered and ready to start sessions.
Now, when I try to start a new session between then (let's say bob calling alice) what I get in the endpoint is the following message:
SIP/2.0 500 I'm terribly sorry, server error occurred (1/SL) Via: SIP/2.0/WS 0mkf6fgtprlh.invalid;rport=33154;received=192.168.1.11;branch=z9hG4bK7711221 To: sip:alice@enterprise.com;tag=94c1b96a0e6eb467885b5057e1e49f9e.1970 From: sip:bob@enterprise.com;tag=on056iipql Call-ID: 5e1pmj2fppbgg13doi4k CSeq: 3989 INVITE Server: kamailio (4.1.5 (x86_64/linux)) Content-Length: 0
What I understood about this problem is that the Proxy server is trying to forward the INVITE to the Outbound server and this server does not know that to do with this message - like forward it to alice.
I'm stucked in this step.
Here you can find the configuration files that I'm using:
Outbound Server: https://mega.co.nz/#!Wlw2RL7S!G2YOP-1QbSCeNQddaAe3kyQMqz8yteZlZsAUpjZX4v4
Proxy Server: https://mega.co.nz/#!qxAXTbbb!4zBjRtmADdl3rPCN2Yidd3xnZEjFahW3GSMb00w41xc
Thanks again!
Bruno Emer
*Bruno Emer*
Mobile: +55 11 96540-0044 email: brunoemer@gmail.com https://www.facebook.com/bruno.emer.5 https://www.linkedin.com/profile/view?id=86461237&trk=spm_pic https://twitter.com/brunoemer_ https://www.flickr.com/photos/122070309@N03/ http://google.com/+BrunoEmer http://instagram.com/brunoemer_
2014-09-18 18:04 GMT-03:00 Bruno Emer brunoemer@gmail.com:
Ok, Daniel!
I am trying exactly what you said, but for some reason the proxy server can't forward the message back to the WebSocket server. I am getting "487 Unresolvable destination". Appears that my Proxy Server can't get data from usrloc.
When I register an user using WebRTC I can see that the system stores the information in kamailio database and in the field "contact" it puts a string. The Proxy server is looking in database and just find this information. Actually, I'm trying to understand the entire process that envolves passing information from an Edge Server to a Proxy server that sends the Register information to another Registrar server (as I described before). The database is shared between all the servers, and they are in the same network.
I just read the information in another topic, as you said, but I think that my case is a lil bit different from it. I you agree, I can post my configuration files here. Maybe this can help another users with the same problem!
Thanks again!!!
*Bruno Emer*
Mobile: +55 11 96540-0044 email: brunoemer@gmail.com https://www.facebook.com/bruno.emer.5 https://www.linkedin.com/profile/view?id=86461237&trk=spm_pic https://twitter.com/brunoemer_ https://www.flickr.com/photos/122070309@N03/ http://google.com/+BrunoEmer http://instagram.com/brunoemer_
2014-09-17 9:13 GMT-03:00 Bruno Emer brunoemer@gmail.com:
Hello!
I am relatively new to Kamailio and I'm trying to create a new enviroment using it in my company. I am thinking about use Amazon to host the servers and use OpsWorks to automatically escalate then if necessary. To accomplish this, my idea is to separate the servers, using one dedicated server to run as WebSocket, one to run as proxy and one as a Registrar. I'll be using just one database to store informations to all of my servers. With this, if I need more resources later, I can just create new servers with the specific roles (WebSockets, Proxy, Registrar).
By now, the idea is clear, but the point is that I don't know how to separate the WebSockets server from the proxy server. Actually, I can do this, but when I have one agent using a regular softphone and one agent using WebSockets (with JSSIP) they are not able to establish a session if the softphone user starts it. Now, I want to know if is there a way to use two websockets servers, register users using both of then and start sessions between then, with a separated proxy and registrar.
Has anyone done this before? Is possible to use kamailio like this?
Thanks.
*Bruno Emer*
Mobile: +55 11 96540-0044 email: brunoemer@gmail.com https://www.facebook.com/bruno.emer.5 https://www.linkedin.com/profile/view?id=86461237&trk=spm_pic https://twitter.com/brunoemer_ https://www.flickr.com/photos/122070309@N03/ http://google.com/+BrunoEmer http://instagram.com/brunoemer_