Hi
I do have 3 kamailio servers sharing the same db, calls go to Asterisk and
that works great, I did purchase a DID and point it to one of the kamailio
servers, it works fine so far for that kamailio server as the call is
forwarded to the softphone ..but ONLY if the user is registered on the
kamailio server the DID is forwarded to..if the kamailio user is on another
kamailio server it does not work..although the database and location tables
are shared.
Simple diagram
DID Provider <=== DID Kamailio ===> Kamailio Servers A, B, C
If a softphone registers on DID Kamailio and I call the DID it works, if a
softphone registers on Kamailio A or B or C, I never get the call, looking
at ngrep the call just stays on DID Kamailio and it does not try to send it
to any other server, how can I make the Kamailio DID lookup the destination
from the location table and send the call there ?
Regards
Hello,
We are considering upgrading our VoIP platform and I'm wondering what kind of hardware we need for our requirements.
The architecture will consist of a SIP Proxy Server (Kamailio) in front and a cluster of Media/Application Servers behind it.
The requirements are based on a single server.
SIP Proxy Server:
- Up to 100 - 300 calls per second.
- Up to 5000 - 10000 concurrent calls.
- RTP Proxy
- Record-Route
Media/Application Server:
- Up to 100 - 300 calls per second.
- Up to 5000 - 10000 concurrent calls.
What do we need in terms of CPU, Memory, HDD when looking at the following specific requirements:
- 100 CPS
- 200 CPS
- 300 CPS
Which hardware components are critical for handling this many calls, is it CPU, Memory, Disk IO bound?
Also which open source media/application server software is suitable for these requirements? We are currently using Asterisk, which works great, but perhaps there are others available which are more suitable for these requirements.
Thanks in advance!
Regards,
Grant Bagdasarian
I'm trying to get the MWI indicator on endpoints to work by redirecting the
SUBSCRIBE to the voicemail server (asterisk) using usc_replace_(to|from).
This works fine for the initial request but the next subscribe will fail since
the to/from don't get rewritten, which is indicated by the error:
ERROR: uac [replace.c:250]: decline FROM replacing in sequential request in
auto mode (has TO tag)
This occurs when the modparam "uac","restore_mode" is manual or auto. When set
to none the redirect will be correct but all responses have to be rewritten
manually (I'm a beginner and I don't want to do this just yet). And since uac
has knowledge about this having being rewritten, sending the original from/to
looks like like a bug to me (more probable a misconfiguration/omission of
something crucial withing dialog responses :)
Changes to the (default debian package) config, in route
route[PRESENCE] in if(is_method("SUBSCRIBE"))
if( is_method("SUBSCRIBE"))
{
if(search_hf("Event", "message-summary", "a"))
{
if (!www_authenticate("$fd", "subscriber")) {
www_challenge("$fd", "1");
exit;
}
if(avp_db_query("SELECT value FROM usr_preferences WHERE username='$au'
and attribute='voicemail' ORDER BY value limit 1"))
{
$avp(voicemail)=$avp(i:1);
$avp(subscrfrom)=$fu;
avp_subst("$avp(subscrfrom)", "/sip:.*@/sip:$avp(voicemail)@/");
uac_replace_from("$avp(subscrfrom)");
uac_replace_to("","sip:$avp(voicemail)@$sel(cfg_get.voicemail.srv_ip):
$sel(cfg_get.voicemail.srv_port)");
remove_hf("Authorization");
$ru = "sip:" + $avp(voicemail) + "@" + $sel(cfg_get.voicemail.srv_ip) +
":" + $sel(cfg_get.voicemail.srv_port);
route(RELAY);
}
}
else
{
handle_subscribe();
t_release();
}
}
exit;
192.168.34.226 is the sip device, 192.168.32.40 kamailio, 192.168.32.41 the
voicemailserver.
Initial request:
U 192.168.34.226:5852 -> 192.168.32.40:5060
SUBSCRIBE sip:grandstream@sip.local SIP/2.0.
From: "Daniel" <sip:grandstream@sip.local>;tag=67d8f67065827fe2.
To: <sip:grandstream@sip.local>.
Gets rewritten to:
U 192.168.32.40:5060 -> 192.168.32.41:5060
SUBSCRIBE sip:0880100782@192.168.32.41:5060 SIP/2.0.
From: "Daniel" <sip:0880100782@sip.local>;tag=67d8f67065827fe2.
To: <sip:0880100782@192.168.32.41:5060>.
The response gets relayed to the endpoint and MWI will light up since there is
a message.
But next subscribe update from the endpoint triggers the "decline FROM
replacing in sequential request" error and thus the subscribe send to
voicemail is the original to/from:
U 192.168.32.40:5060 -> 192.168.32.41:5060
SUBSCRIBE sip:0880100782@192.168.32.41:5060 SIP/2.0.
From: "Daniel" <sip:grandstream@sip.local>;tag=67d8f67065827fe2.
To: <sip:grandstream@sip.local>;tag=as324de8f3.
Resulting in a 404 since the to/from are not the real peername on the
voicemail server. How do I force Kamailio to rewrite the from/to without doing
this manually for a requests/responses (restore_mode none)? The easy way out
of this problem would be to have a 1 to 1 relation for the Kamailio
subscribers and voicemail peers. But uac_replace should work (somehow).
Attached is a full capture of the subscribe/notify. Running 3.3.2+squeeze from
http://deb.kamailio.org/kamailio/. Machine is also running topoh module
(192.168.0.1).
--
POCOS B.V. - Croy 9c - 5653 LC Eindhoven
Telefoon: 040 293 8661 - Fax: 040 293 8658
http://www.pocos.nl/ - http://www.sipo.nl/
K.v.K. Eindhoven 17097024
Hi everyone,
I have 1 Load Balancer and 2 SIP Servers, all of them are Kamailio. Does
anyone suggest how to add NAT for them?
Best Regard,
Nguyen Anh Tuan
Hi,
we have 2 separate instances of kamailio running as a SIP proxy and
presence server. The proxy uses the nathelper module to correctly change
the Contact headers of client requests. However it also does the same for
notify requests from the presence server, which results in incorrect RURI
from subsequent client subscribes. The NATDETECT route is shown below, I
plan to leave the existing nat_uac_test but also explicitly skip the
fix_nated...() calls for requests from the presence server. Does this seem
reasonable?
# Caller NAT detection route
route[NATDETECT] {
#!ifdef WITH_NAT
force_rport();
if (nat_uac_test("19")) {
if (is_method("REGISTER")) {
fix_nated_register();
} else {
fix_nated_contact();
}
setflag(FLT_NATS);
}
#!endif
return;
}
Thanks,
Owen Lynch
Hello,
We have a cluster of three Asterisk machines. Each machine answers an incoming call and transfers it to unique remote destination.
So, Asterisk01 transfers to Destination01, Asterisk02 to Destination02, Asterisk03 to Destination03.
The Asterisk machines are allowed to receive and answer only 50 calls each.
I have a Kamailio in front of these three machine. It is currently used to dispatch calls to the three machines using round-robin.
But I need some way to equally dispatch a maximum of 50 calls to each device in the Asterisk dispatcher set.
I was thinking of using the dispatcher module and using the 10 algorithm, to load balance based on call load. But I'm not sure if that will guarantee a maximum of 50 calls being dispatched to each Asterisk.
Theoretically, if I set the ds_hash_size to 7, which is 128 slots, at some point two of them should have 43 calls and one 42 calls.
Also the value of ds_hash_size should be the power of two. Are decimal values allowed, like 7,229 which equals to almost 150?
Perhaps I should use the ratelimit module for this?
I'd appreciate it if someone could give me some advice on this.
Regards,
Grant
Hi,
I'm playing around with xavp, but there are some things I can't wrap my
head around.
What basically works is this:
$xavp(a=>foo) = 'foo';
$xavp(a[0]=>bar) = 'bar';
Getting the value like this:
xlog("L_INFO", "a-foo='$xavp(a=>foo)' and a-bar='$xavp(a=>bar)'");
as well as
xlog("L_INFO", "a-foo='$xavp(a[0]=>foo)' and a-bar='$xavp(a[0]=>bar)'");
... works, because when omitting the index, it assumes [0]. I really
like to avoid such implicit assumptions though, to make the config
really clear, so I prefer the second approach.
What doesn't work for me then is explicit assignment of the very first
value, like this:
$xavp(a[0]=>foo) = 'foo';
$xavp(a[0]=>bar) = 'bar';
If I do this, the "a" xavp is never created. Wouldn't it be good
practice to create the xavp on first assignment? That way, I don't have
to take care in the config file whether the xavp is used for the first
time, where I have to omit the index.
What I'm also wondering is whether it's possible to directly access
nested xavps, like this:
$xavp(a=>foo) = 'afoo';
$xavp(b=>foo) = 'bfoo';
$xavp(c=>a) = $xavp(a);
$xavp(c=>b) = $xavp(b);
xlog("L_INFO", "a-foo='$xavp(c=>a[0]=>foo)'");
or
xlog("L_INFO", "a-foo='$xavp(c=>a=>foo)'");
Both ways give me "a-foo='<<xavp:0x7f0d387fe178>>'". Is this even
intended? Would be really cool if that's possible!
Thanks,
Andreas
Hi,
Hope to get some guidance here over the usage of "sips" and "sip plus
transport=tls" when following RFC3263.
The RFC3263 says that a NATPR record could return something like this
for a query like "host -t NAPTR example.com":
; order pref flags service regexp replacement
IN NAPTR 50 50 "s" "SIPS+D2T" "" _sips._tcp.example.com.
IN NAPTR 90 50 "s" "SIP+D2T" "" _sip._tcp.example.com
IN NAPTR 100 50 "s" "SIP+D2U" "" _sip._udp.example.com.
This means that the client should use sips if possible when contacting
example.com.
Concluding from that, I suppose it should perform an SRV lookup "host -t
SRV _sips._tcp.example.com", and the result would be:
;; Priority Weight Port Target
IN SRV 0 1 5061 server1.example.com
IN SRV 0 2 5061 server2.example.com
What I'm curious about is how requests towards one of these servers
should look like, and how they are being handled by kamailio.
A lot of clients and servers are sending
"sip:user@example.com;transport=tls" in request URIs and Contact headers
and Record-Route headers, and you can check with
uri_param("transport","tls") which transport socket to use. This is
pretty useful as you can determine hop-by-hop whether or not to use TLS.
This approach has been obsoleted by RFC3261 though, and there doesn't
seem to be a mechanism in RFC3263 to indicate "use schema sip, but use
transport=tls".
On encounter of a NAPTR record like the one above, how does kamailio
act? Does it set a "sips" schema for the next hop?
And what's the general take on this "sips" schema? As far as I
understand RFC3261, it means that if a client sends a request to a
sips-URI, the request is sent to the domain via TLS, and from there "the
request is sent securely to the callee, but with security mechanisms
that depend on the policy of the domain of the callee." (RFC3261,
Chapter 4). What does this really mean in practice? Are you allowed to
rewrite the schema to "sip" and pass it on for example via UDP to the
callee if the callee didn't indicate transport=tls (deprecated anyways)
or "sips:" in the Contact of the registration? Or should you keep "sips"
as schema, but still send it via UDP, because you know based on local
policy or based on client registration that the next hop is not
supporting TLS? How would widespread clients react when getting a call
to a "sips" URI, especially if they receive it via UDP?
Looking forward hearing your input on that,
Andreas
I'm trying to create MySql database using the following /usr/local/sbin/kamdbctl create
I followed the instructions on http://kb.asipto.com/kamailio:install:3.3.x-from-git-centos5x
but I receive the following error message: "ERROR: database engine not specified, please setup one in the config script"
Can someone help me please ?
Dear all,
We are using Kamailio SIP Server in our application.
We want to know 1 thing:
We are using Kamailio SIP server as registrar and proxy server.
For registration database, we are using dbtext module.
We maintain record of SIP Extensions who have registered in
Our proprietary file too. Now when we boot the Kamailio SIP server,
At that time our file should be empty i.e. previously registered
Extension entries should be deleted or it must be kept as it is.
But if during power off, any extension had sent REGISTER request to
Unregister then it was not executed as kamailio SIP server was not ON.
But at boot time, as its entry was present, Kamailio SIP server will
Consider it a registered extension.
Please guide us for this situation.
Thank you,
Amit Shah.