Hi,
I have used asterisk before, but now am looking at kamailio for scaling up. I've read 'Building Telephony Systems with OpenSER', but I still have lots of questions.... so, here it goes:
- I could not find a way to reboot a phone remotely, can it send SIP NOTIFY to all phones?
- does it have something like the Asterisk Manager Interface, so I can connect/create an operator panel for it? Does that already exist somewhere? Something like FOP where operators can transfer calls, and check availability?
- according to the docs it is not a BTBUA. What does this mean? I know that asterisk is a BTBUA, but what can a BTBUA do that a SIP proxy cannot? Is it only the moh and conferences?
- lastly, is there a good tutorial on load-balancing somewhere?
Thanks, Antonio.
On 12/28/2009 10:54 AM, Antonio Goméz Soto wrote:
- I could not find a way to reboot a phone remotely, can it send
SIP NOTIFY to all phones?
Yes. See the cisco_restart() function in the 'kamctl' script. It uses the MI interface to generate a request:
http://www.kamailio.org/docs/modules/1.5.x/tm.html#id2531975
Please note that although Kamailio does provide this, this goes beyond the realm of what a proxy is supposed to be able to do. Officially, a proxy is an event-driven state machine; it only forwards requests and replies it receives that are generated by other endpoints.
- does it have something like the Asterisk Manager Interface,
so I can connect/create an operator panel for it? Does that already exist somewhere? Something like FOP where operators can transfer calls, and check availability?
It does have a management interface, but it cannot do all that you're asking. Keep in mind that Kamailio/OpenSER is not really a logical endpoint for calls, except in the case of some exceptions where SIP UAS functionality is provided, as in the registrar and the presence user agent, for example. It is not a user agent, so it cannot actually "transfer" anything[1].
- according to the docs it is not a BTBUA. What does this mean?
I know that asterisk is a BTBUA, but what can a BTBUA do that a SIP proxy cannot? Is it only the moh and conferences?
A B2BUA is a client user agent (UAC) on one side and a server user agent (UAS) on the other side. It can generate new logical call legs, connect call legs, and, usually asynchronously initiate requests. A proxy, in contrast, receives logical call leg A in and sends the same logical call leg B to the next destination; the attributes of the call leg that it is allowed to change in either requests or replies are quite limited, compared to a B2BUA, which, by virtue of generating a new leg and cross-connecting the two, can put whatever it wants in the second one, reinterpret / mangle feedback more extensively, etc.
More generally, outside the realm of protocol mechanics, I think it is important that you understand that Kamailio doesn't really provide "application-level" functionality. To do that, it would have to be able to answer calls itself, which it cannot do. It is not appropriate to compare it to Asterisk; it is not a PBX or anything like that. There is no analogy between them. So, all discussion of MOH and conferences is irrelevant; the absence of support for them is not simply the result of feature set limitations, but rather conceptual incompatibility with the sort of thing that Kamailio is.
- lastly, is there a good tutorial on load-balancing somewhere?
Google the list archives for references to the "dispatcher" module.
-- Alex
[1] Though the dialog module does, as of 1.5.x, provide an interesting hack:
http://www.kamailio.org/docs/modules/1.5.x/dialog.html#id2532224
Alex,
thank you for your thorough answers.
Op 28-12-09 17:07, Alex Balashov schreef:
On 12/28/2009 10:54 AM, Antonio Goméz Soto wrote:
- I could not find a way to reboot a phone remotely, can it send
SIP NOTIFY to all phones?
Yes. See the cisco_restart() function in the 'kamctl' script. It uses the MI interface to generate a request:
http://www.kamailio.org/docs/modules/1.5.x/tm.html#id2531975
Please note that although Kamailio does provide this, this goes beyond the realm of what a proxy is supposed to be able to do. Officially, a proxy is an event-driven state machine; it only forwards requests and replies it receives that are generated by other endpoints.
I have noticed that some phones only accept SIP NOTIFY from the registrar server, and some request authentication, and accept them from the same port that the register replies came from, or use SIP transaction numbers.
This would make it mandatory for the register server to send them.
- does it have something like the Asterisk Manager Interface,
so I can connect/create an operator panel for it? Does that already exist somewhere? Something like FOP where operators can transfer calls, and check availability?
It does have a management interface, but it cannot do all that you're asking. Keep in mind that Kamailio/OpenSER is not really a logical endpoint for calls, except in the case of some exceptions where SIP UAS functionality is provided, as in the registrar and the presence user agent, for example. It is not a user agent, so it cannot actually "transfer" anything[1].
Okay, that is clear.
- according to the docs it is not a BTBUA. What does this mean?
I know that asterisk is a BTBUA, but what can a BTBUA do that a SIP proxy cannot? Is it only the moh and conferences?
A B2BUA is a client user agent (UAC) on one side and a server user agent (UAS) on the other side. It can generate new logical call legs, connect call legs, and, usually asynchronously initiate requests. A proxy, in contrast, receives logical call leg A in and sends the same logical call leg B to the next destination; the attributes of the call leg that it is allowed to change in either requests or replies are quite limited, compared to a B2BUA, which, by virtue of generating a new leg and cross-connecting the two, can put whatever it wants in the second one, reinterpret / mangle feedback more extensively, etc.
More generally, outside the realm of protocol mechanics, I think it is important that you understand that Kamailio doesn't really provide "application-level" functionality. To do that, it would have to be able to answer calls itself, which it cannot do. It is not appropriate to compare it to Asterisk; it is not a PBX or anything like that. There is no analogy between them. So, all discussion of MOH and conferences is irrelevant; the absence of support for them is not simply the result of feature set limitations, but rather conceptual incompatibility with the sort of thing that Kamailio is.
I am not at all trying to compare asterisk to kamailio, just trying to find out what each is intended to do, in words and concepts that are familiar to me.
So this means, that if I put kamailio as a frontend to my current asterisk setup, and most calls run outside asterisk, that the operator will not be able to for example break into an already existing conversation? Or pull two established channels away from each other and forcibly redirect them to a conference box?
Will the asterisk queue app be able to work with phones that are registered to kamailio?
I am sorry, I am so full of questions.
Antonio.
- lastly, is there a good tutorial on load-balancing somewhere?
Google the list archives for references to the "dispatcher" module.
-- Alex
[1] Though the dialog module does, as of 1.5.x, provide an interesting hack:
http://www.kamailio.org/docs/modules/1.5.x/dialog.html#id2532224
Antonio Goméz Soto writes:
I have noticed that some phones only accept SIP NOTIFY from the registrar server, and some request authentication, and accept them from the same port that the register replies came from, or use SIP transaction numbers.
This would make it mandatory for the register server to send them.
you can make registrar to send the notifies via mi commands.
-- juha
On 12/28/2009 11:57 AM, Antonio Goméz Soto wrote:
thank you for your thorough answers.
You're welcome!
I have noticed that some phones only accept SIP NOTIFY from the registrar server, and some request authentication, and accept them from the same port that the register replies came from, or use SIP transaction numbers.
This would make it mandatory for the register server to send them.
In principle, yes.
I am not at all trying to compare asterisk to kamailio, just trying to find out what each is intended to do, in words and concepts that are familiar to me.
In that case, I invite you to think of Kamailio as a "call router."
So this means, that if I put kamailio as a frontend to my current asterisk setup, and most calls run outside asterisk, that the operator will not be able to for example break into an already existing conversation?
If they run outside of Asterisk in both the signaling and media respects, that is correct.
Or pull two established channels away from each other and forcibly redirect them to a conference box?
Correct.
Will the asterisk queue app be able to work with phones that are registered to kamailio?
Yes. You can use Kamailio as a location server to contact all phones from Asterisk. Instead of addressing them as local peers (e.g. Dial(SIP/antonio)), you'd just plumb the network/transport-layer reachability information resolution through the registrar (e.g. Dial(SIP/antonio@kamailio_server)).
-- Alex
Op 28-12-09 18:18, Alex Balashov schreef:
I am not at all trying to compare asterisk to kamailio, just trying to find out what each is intended to do, in words and concepts that are familiar to me.
In that case, I invite you to think of Kamailio as a "call router."
So this means, that if I put kamailio as a frontend to my current asterisk setup, and most calls run outside asterisk, that the operator will not be able to for example break into an already existing conversation?
If they run outside of Asterisk in both the signaling and media respects, that is correct.
Or pull two established channels away from each other and forcibly redirect them to a conference box?
Correct.
Hm, now I am getting a bit worried. Scaling up my asterisk setup using OpenSER will definitely not be as easy as I thought...
So what parts can be done by openser itself? Can it do:
- Attended transfer? - Call Pickup? Directed? - Barge In (no, you already said so) - Call recording (mid call) - Listening-in (Training)
Also, asterisk has long had serious problems with showing callerid/connected party after attended transfer, blind forward or call pickup. Does OpenSER have those problems too? Does it support P-Asserted-Id or Connected Party?
If a lot of calls need one of the above features, then using kamailio does not scale up my asterisk-based PBX too much, does it?
Thanks for your answers.
Antonio
On 12/28/2009 01:50 PM, Antonio Goméz Soto wrote:
Hm, now I am getting a bit worried. Scaling up my asterisk setup using OpenSER will definitely not be as easy as I thought...
So what parts can be done by openser itself? Can it do:
- Attended transfer?
No. It is not an endpoint.
- Call Pickup? Directed?
No. It is not an endpoint.
- Call recording (mid call)
No, it is not an endpoint, although it can trigger external media proxy processes via APIs / control sockets (mediaproxy, rtpproxy) that can perform this functionality.
- Listening-in (Training)
No.
Also, asterisk has long had serious problems with showing callerid/connected party after attended transfer, blind forward or call pickup. Does OpenSER have those problems too? Does it support P-Asserted-Id or Connected Party?
OpenSER does not inherently support or not support a header; it has nothing to do with them except to pass them along in a request. It can attach them, and it can read their values if they are present and act on them in some user-defined way; this is true of any such header.
If a lot of calls need one of the above features, then using kamailio does not scale up my asterisk-based PBX too much, does it?
OpenSER cannot augment, extend or implement any of the PBX-like features you're looking for; that is simply not what it does. SIP messages enter OpenSER and they leave it, the effect of which is to intervene in and direct the establishment of calls to various destinations.
It is fundamentally a network element inside a VoIP service delivery platform, not an application server, PBX, feature server, or other type of call endpoint. It's a rather low-level piece of infrastructure.
I think you may have misunderstood what it is people mean when they say that they use OpenSER to help horizontally scale their use of Asterisk out. The role is a complementary one, not a substitute. For example, a typical design for application or service delivery using Asterisk + OpenSER involves multiple Asterisk servers that behave identically when they receive an inbound call, regardless of which server the call came into. This is typically done using some sort of database that keeps shared state, and most likely a central point of logic deployment, such as a FastAGI controller. In this type of situation, as an example, an OpenSER-based load balancer in front of this farm of servers to round-robin among them or do other intelligent call distribution can be used to great effect.
But Asterisk (or whatever backend) must still provide the fundamental functionality.
Think of Kamailio the same way you would think of a Layer 3 IP router. What you are proposing is analogous to saying that a router can be used to scale an HTTP web server / web site operation. A router cannot inherently do that, but it can assist in doing so as an element of a web server and network topology that makes that possible.
-- Alex
Op 28-12-09 20:17, Alex Balashov schreef:
On 12/28/2009 01:50 PM, Antonio Goméz Soto wrote:
Hm, now I am getting a bit worried. Scaling up my asterisk setup using OpenSER will definitely not be as easy as I thought...
I think you may have misunderstood what it is people mean when they say that they use OpenSER to help horizontally scale their use of Asterisk out.
Alex,
Indeed I had the impression that you could build a highly scalable professional PBX using openSER and some bits of asterisk for some media processing, but as you state it, their roles are quite different.
I already think of asterisk as a kind of httpd for voice applications, on which you should build a PBX (like you build a website on apache). And apparently this analogy can be extended to include openSER as a proxy, just like Squid can be for HTTP.
So my next steps will be to decide where to register my phones, how to keep multiple asterisk servers synced together, and how to properly load-balance them using kamailio.
Thank you very much.
Regards, Antonio
On Mon, December 28, 2009 5:57 pm, Antonio Goméz Soto wrote:
- does it have something like the Asterisk Manager Interface,
so I can connect/create an operator panel for it? Does that already exist somewhere? Something like FOP where operators can transfer calls, and check availability?
It does have a management interface, but it cannot do all that you're asking. [..]
Hey Antonio,
just to give you an example about such an application, take a look to 'siremis', which is a administrative interface for kamailio.
Regards,
Henning
On 12/28/2009 12:19 PM, Henning Westerholt wrote:
On Mon, December 28, 2009 5:57 pm, Antonio Goméz Soto wrote:
- does it have something like the Asterisk Manager Interface,
so I can connect/create an operator panel for it? Does that already exist somewhere? Something like FOP where operators can transfer calls, and check availability?
It does have a management interface, but it cannot do all that you're asking. [..]
Hey Antonio,
just to give you an example about such an application, take a look to 'siremis', which is a administrative interface for kamailio.
Indeed. However, SIREMIS is not analogous to the Asterisk Flash Operator Panel (FOP) in that its focus is on database provisioning rather than real-time event management or real-time call control, to the extent that's even possible with Kamailio.
On Mon, December 28, 2009 6:23 pm, Alex Balashov wrote:
just to give you an example about such an application, take a look to 'siremis', which is a administrative interface for kamailio.
Indeed. However, SIREMIS is not analogous to the Asterisk Flash Operator Panel (FOP) in that its focus is on database provisioning rather than real-time event management or real-time call control, to the extent that's even possible with Kamailio.
Hey Alex,
good that you clarified that. Thanks for the pointer to the FOP, i did not know about this, looks neat.
Henning
Antonio Goméz Soto writes:
I have used asterisk before, but now am looking at kamailio for scaling up. I've read 'Building Telephony Systems with OpenSER', but I still have lots of questions.... so, here it goes:
- I could not find a way to reboot a phone remotely, can it send SIP NOTIFY to all phones?
kamailio is a sip proxy, not a sip ua. you can easily write a sip ua script that does what ask in above.
- does it have something like the Asterisk Manager Interface, so I can connect/create an operator panel for it? Does that already exist somewhere? Something like FOP where operators can transfer calls, and check availability?
no, here you are looking for a pbx what kamailio is not.
- according to the docs it is not a BTBUA. What does this mean? I know that asterisk is a BTBUA, but what can a BTBUA do that a SIP proxy cannot? Is it only the moh and conferences?
for example, bua can terminate a call and create a new one. kamailio is not a full blown bua. use sems instead.
- lastly, is there a good tutorial on load-balancing somewhere?
that i don't know an answer. there is a couple is load balancing related modules in kamailio, which you can use. check their READMEs.
-- juha