I'm converting my OpenSIPS routers to Kamailio & have run into a small
complication. The proxy pushes all INVITEs to a least-cost router. This LCR
responds with a list of routes as contact instances in a 302 Redirect. Calls
are routing a serially forking normally. Connected & failed calls account
normally.
However, if the caller cancels the call, the acc module includes the 302 in
the transaction record as the final response as opposed to the actual final
response - the 487 Request Canceled.
Is there something I could be missing that would cause this?
Thanks,
Ryan
Hi,
found the problem. The device does sometimes use User-Agent and sometimes Server.
Is it better to use $hdr() or the Search() function?
I use this to check for the User-Agent and then to do a "fix_nated_sdp()" (in route[] and onreply[]) because I am not really sure, if the fix_nated_sdp() could break something. Or should kamailio break nothing here? Sometimes the User-Agent/Server is missing in Session-Progress 183. Therefore a "global" fix_nated_sdp() would be nice to have.
Best regards,
Bernhard
----- Original Message -----
From: Daniel-Constantin Mierla [mailto:miconda@gmail.com]
To: Bernhard Suttner [mailto:bernhard.suttner@winet.ch]
Cc: sr-users(a)lists.sip-router.org
Sent: Mon, 24 Jan 2011 17:09:12 +0100
Subject: Re: [SR-Users] $ua in on_reply route not set?
> Hello,
>
> On 1/24/11 5:03 PM, Bernhard Suttner wrote:
> > Hi,
> >
> > could it be, that the $ua pseudo variable is not set within in a onreply
> route? (Version 3.1).
> no, should be set, there was no change in this regard for quite long
> time. Can you sent the sip reply plus log with debug=3?
> >
> > What is the best alternative for that? Search()?
>
> The alternative is $hdr(User-Agent) which is practically returning the
> same value as $ua, using generic header search mechanism.
>
> Cheers,
> Daniel
>
> --
> Daniel-Constantin Mierla
> http://www.asipto.com
>
>
On Monday 24 January 2011, Thomas Baumann wrote:
> the downtime is not a problem, I already have 2 deamons running.
> I want to reduce the time , how changes become active.
>
> 1. update xxx entry
> 2. export table to *.csv (5s)
> 3. generate *.mmap file (25 seconds)
>
> So changes will take at lease 30 seconds to become active. Only 20% of my
> numbers are updated very often, I want to export them and the generation
> of the *.mmap file takes only 5 seconds.
>
> But in this case I need to specify the daemons per request and not in the
> general parameters. Because later on it might be necessary to ask the
> daemons hosting the rest of my numbers. Or maybe 30 seconds are ok ?
Hi Thomas,
i understand. You could of course change/ extend the interface of the pdb, but
at the moment this functionality is not available. During module startup the
sockets and server data structures are initialized, so the structure needs
probably a bit changed.
But let me ask, what kind of changes are done to your routing? Is the routing
data then completely invalid, or just a more expensive route is taken for this
particular target? In the latter case a update period of 30 seconds sounds not
like a big deal to me, after all you probably have also some manual steps
involved before you do an update.
Cheers,
Henning
Hello!
I went through your letters and start as following:
-------------------------------------------------------
root@ubuntu:/home/yeti/rtpproxy# /etc/init.d/kamailio restart
Restarting kamailio: kamailioloading modules under /usr/local/lib/kamailio/modules_k/:/usr/local/lib/kamailio/modules/
Listening on
udp: 192.168.124.158:5060
udp: FEC0:0:0:0:0:0:0:2:5060
tcp: 192.168.124.158:5060
tcp: FEC0:0:0:0:0:0:0:2:5060
Aliases:
tcp: ubuntu:5060
udp: ubuntu:5060
root@ubuntu:/home/yeti/rtpproxy# kamctl restart
INFO: Stopping Kamailio :
INFO: stopped
INFO: Starting Kamailio :
INFO: started (pid: 7597)
root@ubuntu:/home/yeti/rtpproxy# rtpproxy restart
-------------------------------------------------------
So I guess everything is starting fine.
The users can register and call each other. Their data are in the mysql database`s location table.
I put this into the kamailio.cfg file:
--------------------------------------------------------
# RTPProxy control
route[RTPPROXY] {
#!ifdef WITH_NAT
if (is_method("BYE")) {
unforce_rtp_proxy();
} else if (is_method("INVITE"))
{
if (af == inet) {
if ( $(rU{s.substr,0,1}) == "6") {
force_rtp_proxy("ie");
} else {
force_rtp_proxy("ee");
}
} else {
if ( $(rU{s.substr,0,1}) == "4") {
force_rtp_proxy("ei");
} else {
force_rtp_proxy("ii");
}
}
} else if (is_method("200OK"))
{
if (af == inet) {
if ( $(rU{s.substr,0,1}) == "6") {
force_rtp_proxy("ei");
} else {
force_rtp_proxy("ee");
}
} else {
if ( $(rU{s.substr,0,1}) == "4") {
force_rtp_proxy("ie");
} else {
force_rtp_proxy("ii");
}
}
}
if (!has_totag()) add_rr_param(";nat=yes");
#!endif
return;
}
----------------------------------------------------------
But, unfortunately there is no RTP traffic yet. :(
What do you thing guys, what can be the problem?
Regards,
Peter
Am 02.12.2010 13:06, schrieb Komáromi Péter:
> Hi!
>
> So if you say it is possible to solve the problem with the only
> location table, the location_inet4 and location_inet6 is not
> certainly necessary... do I _have to_ use the 4to6.cfg file from the
> source of kamailio, or not?
When you call force_rtp_proxy() then you have to provide the i/e flags
to tell rtpproxy how it should bridge the call. Therefore you need to
know for every call:
- is the caller IPv4 or IPv6?
- is the callee IPv4 or IPv6?
Finding out the protocol version of the caller is rather easy:
if (af == inet) {
# caller ipv4
...
} else {
# caller ipv6
...
}
But finding out if the callee is v4 or v6 is difficult. Actually it may
even be that the callee is registered with 2 clients at the same time -
one using v4 and v6. As far as I know this multi-registration scenario
can not be handled currently - only single-registrations or
multi-registrations which use the same protocol version are supported.
Anyway - there are several approaches how to detect the IP version of
the callee.
- fixed mapping: for example if you know that all usernames starting
with 1 are IPv4 clients, and all usernames starting with 2 are IPv6
clients, then you can detect the callee's protocol version manually, e.g:
if ( $(rU{s.substr,0,1}) == "1") {
# callee ipv4
...
} else {
# callee ipv6
...
}
- check destination URI if it contains a IPv4 or IPv6 address, e.g. use
http://www.kamailio.org/dokuwiki/doku.php/transformations:devel#resubst_exp…
to test if $dd contains '.' which would indicate a ipv4 address.
- use dedicated location tables
> (Because it uses them, for instance here: if (method == "REGISTER")
> { if (af == inet) { save("location-inet4"); } else if (af == inet6)
> { save("location-inet6");...)
>
> If I do not have to use it, I do not need to merge it with my
> kamailio.cfg file, the steps I have to do are: install rtpproxy,
> start it with the appropriate parameters and set the forcing in the
> kamailio.cfg file?!
The more I think about it I prefer the approach with separated location
tables. It should be rather easy to integrate the 2 location tables into
your existing config.
regards
Klaus
Hi,
Kamailio 3.0.3.
A few days ago we got a problem when "kamctl cr reload" was executed.
Jan 24 08:50:27 sip-core-2 /usr/local/sbin/kamailio[1639]: ERROR:
db_mysql [km_dbase.c:346]: no memory left
Jan 24 08:50:27 sip-core-2 /usr/local/sbin/kamailio[1639]: ERROR:
carrierroute [cr_db.c:331]: Fetching rows failed
Jan 24 08:50:27 sip-core-2 /usr/local/sbin/kamailio[1639]: ERROR:
carrierroute [cr_data.c:181]: could not load routing data
I tried to increase the shared memory from 32M to 64M but that did not
seem to help. It failed again after a few hours.
The last thing I tried was to insert
modparam("carrierroute", "fetch_rows", 2000) into kamailio.cfg and is
waiting to see if that helped.
The carrierroute table is about 16K rows.
Is it private og shared memory that is missing? Any other ideas how to fix this?
--
Morten Isaksen
Hello,
I am using these commands to build and install kamailio:
git clone http://git.sip-router.org/sip-router kamailio
cd kamailio
git checkout -b 3.1 origin/3.1
make FLAVOUR=kamailio cfg
make group_include="mysql" all
make group_include="mysql" install
Now, If I want to build a specific commit like
a0d376d85aae2f6e46e381a01fb85c5830250d4d, what should I do?
regards,
takeshi
Hi,
could it be, that the $ua pseudo variable is not set within in a onreply route? (Version 3.1).
What is the best alternative for that? Search()?
Thanks in advance!
Best regards,
Bernhard
Dear Sir / Madam
I registered for your services today and the main purpose was to register my other voip/sip providers with your services so that I can have more options in making out bound calls with my sip phone, however could you please explain to me that if for instance, I have three accounts with three different voip providers (i.e JustVoip, Smartvoip,and Voipcheap) ,then how do i register them with my account that you have opened for me today.
could you also tell me how is it possible to make specific calls from one of the voip providers above .
Thank you
Regards
Aram
Hello,
I tested the pdb module and the pdb_server. It is a fast solution even with a huge amount of numbers.
But how I can update the pdb_server in a fast and effective way ? I tried it in the following way:
- number;carrier are stored in a mysql table (20 million entries)
- 2 pdb_servers are running
- the table is exported into a csv file (time: 5 seconds)
- pdbt will create a new mmappable file (time: 25 seconds)
- the pdb_servers will be restarted to activate the changes
The time of 30 seconds is good but not fast enought.
Some of my numbers are updated very often, to export them and create a new mmappable file will take only 3 seconds.
I had the idea to split my numbers in a more or less static area and a dynamic area.
What I want to do later is to have the pdb_server not static configured, I want to define the server within the request:
1. query in dynamic range:
pdb_query("$rU", "$avp(i:1000)", "localhost:10001,localhost:10002");
if not found look into the static area:
pdb_query("$rU", "$avp(i:1000)", "localhost:10003,localhost:10004");
Does it make sence, or has somebody a better idea how changes activated within 10s or less ?
regards,
Thomas
___________________________________________________________
Neu: WEB.DE De-Mail - Einfach wie E-Mail, sicher wie ein Brief!
Jetzt De-Mail-Adresse reservieren: https://produkte.web.de/go/demail02