On 14/09/14 20:00, sr-users-request(a)lists.sip-router.org wrote:
> In your script snippets it seems
> that upon receiving the 302, in the failure route you set the $du and then
> you pass the message to a RELAY route, which I suppose sends the 407 reply.
This seems to be the case, yes. The 407 comes from kamailio on the
already authenticated call. I presume this is done to trigger the caller
to send another INVITE.
> If you don't need for special reasons that the user performs a proxy
> authentication, in the failure route you could just relay the INVITE to the
> target FreeSWITCH after setting $du to the value of your custom header.
This is exactly what I'm hoping to do, but I'm not sure of the correct
configuration to achieve this.
It was my intention to relay the INVITE to the target server by setting
the $du and then trigger the RELAY route. I have also tried setting $du
and then calling t_relay() directly, but I suspect I'm missing something
minor but important.
Cheers,
-nick
I have a rtpproxy configuration that spawns several rtpproxy instances, using bridge mode. An example is shown below:
/usr/bin/rtpproxy -p /var/run/rtpproxy.pid-7723 -u rtpproxy -s udp:127.0.0.1 7723 192.168.2.18/127.0.0.1 -m 10000 -M 20000
Here, rtpproxy bridges between 192.168.2.18 and 127.0.0.1 .
Now I want to migrate to rtpengine with the rtpproxy-ng module in kamailio. However, I do not find an equivalent to bridge mode in the rtpengine command-line parameters. I see the --ip=IP parameter, but the source code expects a single IP address, and
cannot be specified more than once. The closest I see is the --advertised-ip=IP parameter, but I am not sure that it will do what I need.
hello, does kamailio start/run the perl script defined by
modparam("app_perl", "filename", "/usr/local/test/bin/sips.pl") at startup
and constantly run in background?
I want a persistent database connection rather than having to constantly
re-connect to database on each transaction.
Is this possible?
I'm connecting to postgres with
use DBI;
my $dsn = "DBI:Pg:database=$database;host=$host;port=$port";
my $dbh = DBI->connect($dsn, $user, $pass) || die "Could not connect to
database: $DBI::errstr";
Dear list members,
Currently I'm using the dispatcher module to distribute traffic towards
media servers (being Asterisk, in my case). I'd like to forward REGISTER
requests to all (active) dispatcher members, e.g. using a short and
simple while loop.
Could someone please give me some pointers towards the right direction?
Is it for example possible to use the MI di_list functionality for
iterating over all the members?
Thanks in advance!
Best regards,
Kees
Hello sr-users,
We're using 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] {
...
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
Hi All,
Can anybody help me by telling how to read INVITE packet SDP c line IP
address in Kamailio.cfg. For example a INVITE packet comes and its SDP
contains the line
v=0
o=- 3619547086 3619547086 IN IP4 1.223.65.215
s=pjmedia
c=IN IP4 1.223.65.215
t=0 0
a=X-nat:0
Now I want to read this SDP packet c line IP address and want to put the IP
1.223.65.215 in a variable.
Can anybody please help me out in this.
Regards
Varun
Hello,
I am totally new/blank at kamailio and would like learn more but do not
know where to start........
I would like to build a voicemail platform with kamailio and Asterisk. (
if i CAN use kamailio for this purpose)
Someone creates a mailbox in Asterisk realtime for example through a
website. I want to manage the voicemail boxes from one place
(kamailio?) and route
sip traffic to the voicemail boxes?
Can i do that with kamailio ?
How? can someone give me some advice on how and where to start?
Any help appreciated!
Poekel
Hello,
opening this for discussion to get more eyes on the IETF specs to be
sure I haven't missed any requirements.
We are no adding received parameter to Via header as required by RFC 3261:
18.2.1 Receiving Requests
When the server transport receives a request over any transport, it
MUST examine the value of the "sent-by" parameter in the top Via
header field value. If the host portion of the "sent-by" parameter
contains a domain name, or if it contains an IP address that differs
from the packet source address, the server MUST add a "received"
parameter to that Via header field value. This parameter MUST
contain the source address from which the packet was received. This
is to assist the server transport layer in sending the response,
since it must be sent to the source IP address from which the request
came.
But then RFC3581 says:
4. Server Behavior
The server behavior specified here affects the transport processing
defined in Section 18.2 of SIP [1].
When a server compliant to this specification (which can be a proxy
or UAS) receives a request, it examines the topmost Via header field
value. If this Via header field value contains an "rport" parameter
with no value, it MUST set the value of the parameter to the source
port of the request. This is analogous to the way in which a server
will insert the "received" parameter into the topmost Via header
field value. In fact, the server MUST insert a "received" parameter
containing the source IP address that the request came from, even if
it is identical to the value of the "sent-by" component. Note that
this processing takes place independent of the transport protocol.
I understand that if rport parameter is present in incoming Via,
received has to be added always, even when matching the IP address in
via. RFC3261 required to be added only when it source IP was different
than the address in Via.
On the other hand, the RFC3261 says received is needed for helping the
server to route back the reply, so received shouldn't make much sense
for upstream. However, apparently, some clients use it (or at least
check it and don't work properly if not present after a rport -- one
specific example is that some phone is not making calls after sending
REGISTER with rport and not receiving received).
RFC3581 says that server behavior affect what was specified in 3261, so
my plan is to send received always if rport is present, but I wanted to
see if anyone sees issues with that or there is another more recent rfc
amending further the behaviour related to rport.
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
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] {
...
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