Hello sr-users,
We're evaluating Kamailio to proxy to a number of FreeSWITCH backend
servers with the dispatcher module.
In some specific scenarios it matters to which node the request is sent.
In these cases we've configured FS to respond to the invite with 302 and
provide a custom header which contains the uri of the needed backend
server (Intending to emulate the behaviour of 305 Use Proxy).
To attempt to handle this I've tried the following in kamailio:
onreply_route[MANAGE_REPLY] {
…
[View More]...
if (t_check_status("302") and is_present_hf("X-imx-redirect"))
{
$avp(imx-redirect) = $hdr(X-imx-redirect);
xlog("SCRIPT: REDIRECT, Store avp for redirect:
$avp(imx-redirect)\n");
}
}
Then in the dispatch failure route:
if ($avp(imx-redirect) != $null)
{
$du = $avp(imx-redirect);
xlog("SCRIPT: REDIRECT: going to <$ru> via <$du>\n");
route(RELAY);
exit;
}
Which results in the following sip event sequence:
// Normal invite sequence
FS1 -> Kamailio SIP/2.0 302 Moved Temporarily (X-imx-redirect = sip:FS2...)
Kamailio -> FS1 ACK
Kamailio -> Caller SIP/2.0 407 Proxy Authentication Required
Then the caller generates a new INVITE however I'm unsure how to route
this INVITE to the specific node. The avp appears (intentionally) tied
to the transaction so doesn't seem to be able to be used to correlate in
this scenario.
Advice on how to redirect from a backend server to another specific
backend server behind Kamailio would be greatly appreciated.
Cheers,
-nick
[View Less]
Is there a way to call the send_reply method of the route from either Java or csharp? As I have been having issues with the app_java, I have been looking at app_mono and it seems to have better access to the variables, etc. However, the SR.core.ModF only seems to take methods that do not take parameters.
Or for that matter, is there a way to return something back to the route in the config file which it can use to call send_reply? I have a strange requirement to return 202 rather than 200 …
[View More]from subscription requests and a 603 if it fails.
Tom Johnson<mailto:tjohnson@microautomation.com> | Senior Software Engineer
O: 703-543-2118 | F: 703-543-2099
5870 Trinity Parkway, Suite 600, Centreville, VA 20120
[cid:image001.png@01CE18AF.8F231EB0]<http://www.microautomation.com/>
[View Less]
Hello
I have a question in regards monitoring websocket connections on a
production box.
We ususally trust whatever is indicated through the
$ kamctl fifo get statistics
We've seen that this is what the community contributed munin plugins use.
However when trying to monitor web socket connections and using this output
we've seen completely different results from the output of
$ kamctl fifo get_statistics
websocket:ws_current_connections
Which seem to indicate current websocket …
[View More]connections and the output of
$ kamctl fifo ws.dump
Which seems to indicate current OPEN connections.
Can anybody shed some light as to what are the differences between both if
any, and advice which one is the proper one to monitor for possible file
handle exhaustion.
TIA
[View Less]
According to this article I mentioned in the beginning:
http://nil.uniza.sk/sip/kamailio/configuring-kamailio-4x-websocket
In http:request they do straight away the set_reply_close();
I don't know exactly if this kamailio.cfg implementation may be useful for
working with WSS:
event_route[xhttp:request] {
set_reply_close();
set_reply_no_connect();
if ($Rp != MY_WS_PORT
#!ifdef WITH_TLS
&& $Rp != MY_WSS_PORT
#!endif
) {
xlog("L_WARN", "HTTP request received on $Rp\n");
…
[View More]xhttp_reply("403", "Forbidden", "", "");
exit;
}
xlog("L_DBG", "HTTP Request Received\n");
if ($hdr(Upgrade)=~"websocket"
&& $hdr(Connection)=~"Upgrade"
&& $rm=~"GET") {
# Validate Host - make sure the client is using the correct
# alias for WebSockets
if ($hdr(Host) == $null || !is_myself("sip:" + $hdr(Host))) {
xlog("L_WARN", "Bad host $hdr(Host)\n");
xhttp_reply("403", "Forbidden", "", "");
exit;
}
# Optional... validate Origin - make sure the client is from an
# authorised website. For example,
#
# if ($hdr(Origin) != "http://communicator.MY_DOMAIN"
# && $hdr(Origin) != "https://communicator.MY_DOMAIN") {
# xlog("L_WARN", "Unauthorised client $hdr(Origin)\n");
# xhttp_reply("403", "Forbidden", "", "");
# exit;
# }
# Optional... perform HTTP authentication
# ws_handle_handshake() exits (no further configuration file
# processing of the request) when complete.
if (ws_handle_handshake())
{
# Optional... cache some information about the
# successful connection
exit;
}
}
HTTP authentication is not being properly set up. Any indications on how to
perform this sucessfully?
Kind regards
Manuel
>Hello,
>
>from the logs you sent now, it appears that you have set_reply_close()
>in config, therefore the connection is closed after sending the reply.
>
>Cheers,
>Daniel
[View Less]
Hi,
I am using Kamailio 4.1.1 and dlg_manage() function for processing SIP
requests with dialog module. After call is established Kamailio is being
used for generating in-dialog INFO request toward caller (using t_uac_dlg
function via xmlrpc). INFO messages are correctly generated but dialog
calee_cseq value is not being incremented with every message. That
represents a problem since other SIP requests generated by callee side
(like OPTIONS) are not in order, and there is no correct …
[View More]information about
calee_cseq value in dialog memory records.
The question is how can I increment dialog calee_cseq value when local INFO
request toward caller is being generated using t_uac_dlg via xmlrpc?
Thx,
Drazen
[View Less]
Hello. I tried to use UAC module at my system for registration multiple
providers, and call through it.
When I implementing this at my cfg file I had some troubles:
-- with Authentification at INVITE (using UAC_AUTH). IT does not send
second INVITE packet with www_auth header for some trunks (not for all,
only for some providers)
-- with BYE recieving from PROVIDER ("No BYE from Called party" task at
USers Mailing lists)
After many days of tests and debugging I ask question from myself - …
[View More]does
module correctly works?
As I know this module breaks some philosophy about SIP proxy and
development of this module is not question of first priority.
After that all I need advice - what I must use for registtration my SIP
trunks - 3d party registrant or this module, that works fine and I doing
something wrong?
Thanks for advice.
[View Less]
Hello,
development (master) branch of Kamailio enters now in pre-release phase
for version 4.2.0. Therefore, no new feature should be pushed to master
until we create a dedicated branch for 4.2 (expected to be in about 4
weeks or so).
If in doubt to push or not a commit to master, push it first on a
personal branch (or attach to an email) and discuss it on sr-dev. The
new modules can be a bit more dynamic if there is need to get them to
the right shape (e.g., like decision to rename …
[View More]functions, parameters or
adjust database structure).
We hope to get many people involved in testing, to rich a stable state
before releasing 4.2.0. If you want to get involved and need assistance,
don't hesitate to write to mailing lists.
Help with updating the wiki page for migration from 4.1 to 4.2 as well
as what is new in 4.2 is very appreciated. I will post updates about the
very soon.
Many thanks to everyone involved in development of 4.2 and the early
testers that played with master branch.
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Next Kamailio Advanced Trainings 2014 - http://www.asipto.com
Sep 22-25, Berlin, Germany
[View Less]
I heard somewhere LCR can do routing based on call rate and call price, does it true? I haven't seen any config or doc which does call rate using LCR. It only does routing base on prefix scan.
Am I missing something here?
Sent from my iPhone