Hey all,
I'm looking to put Kamailio behind a TCP load balancer that is SIP-unaware.
My application is deployed in AWS and I'm tying to place Kamailio behind an
ELB.
For the most part, everything is fine. For my specific implementation I'm
disabling UDP as a signaling transport and using only TLS. This enables me
to not have to worry about a SIP-aware LB at the edge because replies to an
incoming request will be sent over the existing established TCP socket
(avoiding any crazy routing requirements).
However - this poses an issue with source addresses. Does Kamailio support
anything like the proxy protocol (
http://www.haproxy.org/download/1.5/doc/proxy-protocol.txt) for getting TCP
stream information from a load balancer? Do I need to go back to exposing
it directly to the world so that I can get source addresses?
Thanks,
Colin
Scenario:
endpoint (bob) <-> kamailio proxy (5.1.3) <-> kamailio backend (5.1.2)
Both kamailio instances are running the topos module (mysql backend).
Call setup is fine, but forwarding BYEs fail.
With a call from endpoint to kamailio, topos on the proxy scrambles
Contact to kamailio backend. But in responses from backend contact
remains untouched. In the ACK to the 200, topos on the proxy does
nothing. If the caller hangsup, the BYE will loop internally till max
hops is exceeded (483 which will be send to caller eventually).
When the backend initiates the call to the endpoint, topos appears to
work, but the BYE from the endpoint on hangup get a 404 Not here from
the proxy (route[WITHINDLG]).
Disabling topos on the proxy will result in a functioning proxy (config
attached).
Is there something wrong with my config? Or is this an unforseen
scenario that just doesn't work with topos?
* Endpoint to backend scenario
endpoint:5060 -> proxy:5060
INVITE sip:callee@sip.pocos.nl;transport=tcp SIP/2.0
Via: SIP/2.0/UDP endpoint:5060;rport;branch=...
Max-Forwards: 70
Route: <sip:proxy:5060;lr>
Contact: <sip:bob@endpoint:5060;ob>
proxy:5060 -> backend:5060
INVITE sip:callee@sip.itco.nl;transport=tcp SIP/2.0
Via: SIP/2.0/UDP proxy;branch=...
CSeq: 29848 INVITE
Route: <sip:proxy:5060;lr>
Contact: <sip:btpsh-5af5972d-bf5e-2@proxy>
backend:5060 -> proxy:5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP proxy;branch=...
Contact: <sip:atpsh-5af19bf0-9f94-7@backend>
proxy:5060 -> endpoint:5060
SIP/2.0 200 OK
Contact: <sip:atpsh-5af19bf0-9f94-7@backend>
Via: SIP/2.0/UDP endpoint:5060;received=endpoint;rport=5060;branch=...
Record-Route: <sip:proxy;lr>
endpoint:5060 -> proxy:5060
ACK sip:atpsh-5af19bf0-9f94-7@backend SIP/2.0
Via: SIP/2.0/UDP endpoint:5060;rport;branch=...
Route: <sip:proxy;lr>
proxy:5060 -> backend:5060
ACK sip:atpsh-5af19bf0-9f94-7@backend SIP/2.0
Via: SIP/2.0/UDP proxy;branch=...
Via: SIP/2.0/UDP endpoint:5060;received=endpoint;rport=5060;branch=...
endpoint:5060 -> proxy:5060
BYE sip:atpsh-5af19bf0-9f94-7@backend SIP/2.0
Via: SIP/2.0/UDP endpoint:5060;rport;branch=...
Max-Forwards: 70
Route: <sip:proxy;lr>
proxy:5060 -> proxy:5060
BYE sip:atpsh-5af19bf0-9f94-7@backend SIP/2.0
Via: SIP/2.0/UDP proxy;branch=...
Via: SIP/2.0/UDP endpoint:5060;received=endpoint;rport=5060;branch=...
Max-Forwards: 69
Route: <sip:proxy;lr>
proxy:5060 -> proxy:5060
BYE sip:atpsh-5af19bf0-9f94-7@backend SIP/2.0
Via: SIP/2.0/UDP proxy;branch=...
Via: SIP/2.0/UDP proxy;rport=5060;branch=...
Via: SIP/2.0/UDP endpoint:5060;received=endpoint;rport=5060;branch=...
Max-Forwards: 68
Route: <sip:proxy;lr>
[not going to mention the 50+ BYEs adding Vias and decrementing
Max-Forwards.
* Backend to endpoint scenario
backend:5060 -> proxy:5060
INVITE sip:bob@endpoint:5060;ob SIP/2.0
Via: SIP/2.0/UDP backend;branch=...
Route: <sip:loadbalancer@proxy;lr;received=sip:endpoint:5060>
Contact: <sip:btpsh-5af07a27-72b-502c1@backend>
proxy:5060 -> endpoint:5060
INVITE sip:bob@endpoint:5060;ob SIP/2.0
Via: SIP/2.0/UDP proxy;branch=...
Contact: <sip:btpsh-5af5972d-bf5d-5@proxy>
endpoint:5060 -> proxy:5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP proxy;received=proxy;branch=...
Contact: <sip:bob@endpoint:5060;ob>
proxy:5060 -> backend:5060
SIP/2.0 200 OK
Contact: <sip:bob@endpoint:5060;ob;alias=endpoint~5060~1>
Via: SIP/2.0/UDP backend;rport=5060;branch=...
Record-Route: <sip:proxy;lr>
endpoint:5060 -> proxy:5060
BYE sip:btpsh-5af5972d-bf5d-5@proxy SIP/2.0
Via: SIP/2.0/UDP endpoint:5060;rport;branch=...
proxy:5060 -> endpoint:5060
SIP/2.0 404 Not here
Via: SIP/2.0/UDP endpoint:5060;rport=5060;branch=...
Is it possible to enable accounting module with PostgreSQL?
All I found is documentation and examples that showing accounting module is
used with MySQL module.
--
Javokhir M.M.
________________________________________________
Disclaimer: The information in this e-mail is confidential. If you are not
addressed recipient then please return and delete this e-mail from your
system. Unauthorised use of or disclose the contents of this e-mail may be
unlawful.
Let me preface this with the statement that as best I can tell from docs and code, this function is supposed to be 100% atomic and this shouldn't be able to happen. I also have not found anything in the module's github commit logs that would indicate this behavior has changed from previous versions.
That being said, I appear to have run into an oddity where intermittently I'm getting 2 slots being put in the same entry, which results in trying to parse the output for graphing and reporting not working quite right. The mechanism I'm using is a very simple counter mechanism to record statistics about calls. As an example, I am using the following mechanism:
$var(z) = $shtinc(callstats=>$avp(realm),cps_exceeded);
or
$var(z) = $shtinc(callstats=>$avp(realm),sessions_exceeded);
This typically results in something like this:
{
entry: 4335
size: 1
slot: {
{
name: realm1,total_requests
value: 2365034
type: int
}
}
}
{
entry: 4532
size: 1
slot: {
{
name: realm2,cps_exceeded
value: 30
type: int
}
}
}
And so on... However, one or more of them sometimes end up like this:
{
entry: 4646
size: 2
slot: {
{
name: realm1,total_requests
value: 15958026
type: int
}
{
name: realm2,cps_exceeded
value: 6432103
type: int
}
}
}
Thanks in advance for your help and/or suggestions!
Brooks Bridges | Engineering Manager
O1 Communications
4359 Town Center Boulevard, Suite 217
El Dorado Hills, California 95762
office: 916.235.2097 | main: 888.444.1111, Option 2
email: bbridges(a)o1.com<mailto:bbridges@o1.com> | web: www.o1.com<http://www.o1.com/>
Hello List,
I have a working setup with a kamailio + freeswitch where i can register
extension and make succesfull calls between them.
I added now a "external" path for outbound call to which i can
successfully route using the dialplan + dispatcher combo.
My problem is that my outbound path requires authentication and i'm
struggling to find a way to successfully authenticate with the remote end.
I configured the UAC module to register against the remote end with a
set of credentials but in the SIP trace i can see that the kamailio
simply uses the local user credentials instead of the external ones.
I believe that this is because the 401 Unauthorized from the carrier
gets proxied to the extension which responds with its own credentials.
Can anybody suggest how can i stop forwarding them in this case to
extension and instead use the UAC to reply with different set of
credentials?
Regards,
Krzysztof
The config:
request_route {
...
if($rU=~"[0-9]{5,}"){
xlog("L_INFO","Looking up route for $rU\n");
dp_match("1", "$rU");
$var(dsid) = $(var(attrs){s.int});
if(!ds_select_dst("$var(dsid)", "4")) {
send_reply("404", "No destination");
exit;
}
if(!ds_select_domain("$var(dsid)", "4")) {
send_reply("404", "No destination");
exit;
}
xlog("L_INFO", "Looking up $fn in database\n");
$avp(s:auth_realm_avp) = "realm.com";
$avp(s:auth_username_avp) = "username";
$avp(s:auth_password_avp) = "password";
if(uac_reg_request_to("$fn", 1)) {
xlog("L_INFO", "Found remote user [$rU] on [$rd] via [$du]");
t_on_failure("REMOTE_AUTH");
xlog("L_INFO", "going to <$ru> via <$du>\n");
route(RELAY);
}
exit;
}
failure_route[REMOTE_AUTH] {
if ($T_reply_code == 401 or $T_reply_code == 407) {
xlog("L_INFO", "Remote asked for authentication");
uac_auth();
}
}
--
PGP: 9E5D E635 5A03 485C 2E00 4530 EB83 920A 9E21 FBA8
Hi,
I upgraded kamailio 4.4.2 to kamailio5.1.3 and i am getting this error
*"Unable to load certificate file '/etc/kamailio/kamailio-selfsigned.pem",*
kamilio 4.4.2 does not need the ssl file, but kamailio 5.1.3 need ssl file,
what changes required in kamailio 5.1.3 to run with tls.
Please help me in resolving this issue.
Thank you
vinod.M.N
--
To download the app, click: iOS <http://goo.gl/ZJx3y1> | Android
<http://goo.gl/G1ehjZ>
--
***This transmission contains information that is confidential and
proprietary of Kirusa Inc.,its affiliates and/or its partners and
customers. This information is intended to be shared only with the
recipient of this e-mail who is bound by confidentiality. If you received
this e-mail in error, please delete the e-mail and notify the sender by
return e-mail.***
Hi,
I am adding a kamailio module that references an external C library that
maintains a hashtable in global scope. I am wondering what practice I
should follow so that:
- This hashtable (which I don't control directly) is shared by all child
processes
- The hashtable is changed by one child process at a time
Thanks in advance