Hi All!
We did litttle research:
- both behind the NAT = all OK = straeming over the rtpproxy
- caller behind NAT (other public) = all BAD = no change in SDP
(Connection Address) - rtp stream sending on private addres
- calle behind NAT (other public) = all BAD = SDP has changed but only
private IP address... public IP unchanged = so rtpproxy do not ralay
one way stream
Can somebody (especialy IMS) please help us
Thanks
Best regards,
Lubo
> Hi Daniel,
>
> thank you for answer. I think that parts of kamailio default config
> will not working with pcscf. (e.g. there is on pcscf no database -
> it has hss)
>
> It partialy works with pcscf config -> it rewrites Connecition
> Infromation IP in SDP:
> - sometimes with IP of rtpproxy (more often when both clietnts are
> behind NAT)
> - sometimes with public IP of NATed client (we are not sure why)
> - or unchanged (when one client is behind NAT and other is public)
>
> but this works only with Monster client, with Boghe IP is unchanged
> (shouldn't it be client independent ?).
>
> Maybe someone from IMS help us.
>
> Thanks all for any advice.
>
> Best regards,
>
> Lubo
>
> Daniel-Constantin Mierla <miconda(a)gmail.com>:
>
>> Hello,
>>
>> On 1/23/12 10:43 AM, trojak(a)st.fri.uniza.sk wrote:
>>>
>>> Hi,
>>>
>>> I am trying to make kamailio PCSCF working with rtpproxy (for NAT
>>> traversal).
>>> I would like to ask, if there is any tutorial for this, or if you
>>> can give me any advice.
>> Maybe IMS guys can give other hints, what is on public so far was
>> summarized at:
>> * http://www.kamailio.org/w/2011/01/ims-extensions-available-for-testing/
>>
>>> I also have installed rtpproxy package; #!define WITH_NAT, and
>>> defined rtpproxy port in config file...
>>> But this is not working. I noticed, that in default config file of
>>> pcscf is nothing in routing logic with rtpproxy (or it is
>>> unnecessary ?), so I try to copy route[RELAY] route[NAT]
>>> route[RTPPROXY] modules from kamailio (no pcscf) config file...
>>> but also with no success.
>>>
>>> Can you help me please ? What I am doing wrong ? Do you have any
>>> configuration working with rtpproxy ?
>> Be sure you can the nat handling routes for INVITES behind nat. You
>> can follow the logic in the default config file and adapt it for
>> you pcscf config. In summary should be like:
>> - invite comes in, test if it is from caller behind nat
>> - lookup location returns a branch flag if the calee is behind nat
>> (you have to set that branch flag for register request coming from
>> users)
>> - if caller or callee are behind nat, engage rtpproxy for that call
>> and set a onreply route to update sdp for 18x/200 replies
>> - default config adds a Route header parameter for nated calls to
>> detect easily the natted situation for re-invites or bye
>>
>> Cheers,
>> Daniel
>>
>> --
>> Daniel-Constantin Mierla -- http://www.asipto.com
>> http://linkedin.com/in/miconda -- http://twitter.com/miconda
Hi,
we use the dialog-module to keep track of concurrent calls, and then set
a treshold for simultanious calls. After we upgraded from 1.5 to 3.2, we've
been having a lot of dialogs which are stuck in both the database and
memory.
kamailio -V
version: kamailio 3.2.1 (i386/linux) 918035-dirty
flags: STATS: Off, USE_IPV6, USE_TCP, USE_TLS, TLS_HOOKS, USE_RAW_SOCKS,
DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC,
DBG_QM_MALLOC, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE,
USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 4MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 918035 -dirty
compiled on 10:00:10 Dec 20 2011 with gcc 4.1.2
Our configuration:
modparam("dialog", "dlg_flag", 3)
modparam("dialog", "default_timeout", 21600)
modparam("dialog", "dlg_match_mode", 1)
modparam("dialog", "db_url", VOIP_DATA4)
modparam("dialog", "db_mode", 1)
#!ifdef VOIP1
modparam("dialog", "table_name", "dialog1")
modparam("dialog", "vars_table_name", "dialog_vars1")
#!endif
#!ifdef VOIP2
modparam("dialog", "table_name", "dialog2")
modparam("dialog", "vars_table_name", "dialog_vars2")
#!endif
modparam("dialog", "profiles_with_value", "busy")
To Kamailio instances, voip1 and voip2, share the same config, but define VOIP1
and VOIP2, respectively.
Then in the main route:
if !allow_trusted() {
route(AUTH);
}
if (is_method("INVITE")) {
setflag(3);
dlg_manage();
if ($avp(s:f_uid) != $null) {
set_dlg_profile("busy","$avp(s:f_uid)");
get_profile_size("busy", "$avp(s:f_uid)", "$var(dlg_busy)");
xlog("L_INFO", "BUSY: f_uid: $avp(s:f_uid), dlg_busy: $var(dlg_busy)\n");
}
}
$avp(s:f_uid) is set in route(AUTH), so it will catch calls originating from one of
our users.
Then later in the callforward route:
# Testing dialog
$var(dlg_busy) = 0;
$var(dlg_busy1) = 0;
$var(dlg_busy2) = 0;
#!ifdef VOIP1
get_profile_size("busy", "$rU", "$var(dlg_busy1)");
sql_query("data4","select id from dialog2 where caller_contact like 'sip:$rU@%' or callee_contact like 'sip:$rU@%'", "dialog");
$var(dlg_busy2) = $dbr(dialog=>rows);
#!endif
#!ifdef VOIP2
get_profile_size("busy", "$rU", "$var(dlg_busy2)");
sql_query("data4","select id from dialog1 where caller_contact like 'sip:$rU@%' or callee_contact like 'sip:$rU@%'", "dialog");
$var(dlg_busy1) = $dbr(dialog=>rows);
#!endif
sql_result_free("dialog");
$var(dlg_busy) = $var(dlg_busy1) + $var(dlg_busy2);
And then check if $var(dlg_busy) is above a users treshold.
Finally when routing to a local user we mark it as busy:
set_dlg_profile("busy","$rU");
As of writing I have 5 entries in the dialog1-table, all valid, but:
# kamctl fifo dlg_list | grep -c "^dialog"
18
# kamctl fifo dlg_list | grep state | sort | uniq -c
13 state:: 1
5 state:: 4
on the other hand in the busy profile, which is the one we use:
# kamctl fifo profile_list_dlgs busy | grep -c "^dialog"
11
# kamctl fifo profile_list_dlgs busy | grep state | sort | uniq -c
6 state:: 1
5 state:: 4
It seems as this happens when, for some reason, kamailio is trying to parse duplicate INVITEs.
From the logs:
# grep "^Jan 17" /var/log/messages | grep BUSY | grep -v "dlg_busy: 1" | cut -d\ -f8- |sort | uniq -c
1 BUSY: f_uid: 2367449, dlg_busy: 2
3 BUSY: f_uid: 2367453, dlg_busy: 2
1 BUSY: f_uid: 2367453, dlg_busy: 3
1 BUSY: f_uid: 2367453, dlg_busy: 4
1 BUSY: f_uid: 2574912, dlg_busy: 2
1 BUSY: f_uid: 2582270, dlg_busy: 2
1 BUSY: f_uid: ahmedma, dlg_busy: 2
1 BUSY: f_uid: josephim, dlg_busy: 2
1 BUSY: f_uid: perla, dlg_busy: 2
1 BUSY: f_uid: rosalinm, dlg_busy: 2
1 BUSY: f_uid: suresha, dlg_busy: 2
1 BUSY: f_uid: sveinb, dlg_busy: 2
I've full debugging logs available, if needed.
--
Øyvind Kolbu
Hi,
the maxfwd will not help me prevent the loop on the first round, it would
only stop it a little sooner the X times. no?
the dlg_var is interesting, but i didn't understand how to use it exactly.
how do i match two dialogs? is the spiral detection on dialog module helps?
thanks,
Uri
>Hi Uri,
>for that you can easily count the forwards by using the maxfwd module
>(mf_process_maxfwd_deader <your max>) or you can store all your spiraled
>calls into a dialog-variable like
>$dlg_var(forward-chain)=<B>;<C>|<C>;<B> and check whether the next
>number is already stored or not.
Bye Sven
Am 20.02.2012 13:20, schrieb Uri Shacked:
>*
*>* Hi,
*>*
*>* The service i built in kamailio is simple - a caller dials an Access
*>* number, my gateway send it to kamailio.
*>*
*>* kamailio finds the shadow number for this Access number and send an
*>* invite to the same gateway with the shadow number as destination
*>* (state full proxy).
*>*
*>* In kamailio i change only the RURI and the “To” and “From” stays
*>* untouched.
*>*
*>* Now, when a client performs “diversion”, I can see that I can find
*>* myself in an unwanted long loop….
*>*
*>* Example :
*>*
*>* A calls B
*>*
*>* B diverted the call unconditionally to C.
*>*
*>* C is an Access Number that its shadow number is D.
*>*
*>* D diverted the call to B…….
*>*
*>* Well, that is a bad loop to have!
*>*
*>* It can be longer or shorter, but the idea I understood (I think).
*>*
*>* I thought about diversion check, counters, dialog “To” and “From”
*>* check, etc….
*>*
*>* Anyone here dealt with it?
*>*
*>* What will be the best way to check and see if the situation accrues?
*>*
*>* Thanks,
*>*
*>* Uri
*>*
*
Hi
I'm new to be working with SIP.
We have a SIP server and it handles SIP well but it does not handle
far-end-nat. Can the Kamailio server be used as a SBC (Session Border
Controller) to handle far-end-nat?
Just forward all SIP packages to a SIP server and fix the far-end-nat problem?
Cheers!
Martin
Hi,
The service i built in kamailio is simple - a caller dials an Access
number, my gateway send it to kamailio.
kamailio finds the shadow number for this Access number and send an invite
to the same gateway with the shadow number as destination (state full
proxy).
In kamailio i change only the RURI and the “To” and “From” stays untouched.
Now, when a client performs “diversion”, I can see that I can find myself
in an unwanted long loop….
Example :
A calls B
B diverted the call unconditionally to C.
C is an Access Number that its shadow number is D.
D diverted the call to B…….
Well, that is a bad loop to have!
It can be longer or shorter, but the idea I understood (I think).
I thought about diversion check, counters, dialog “To” and “From” check,
etc….
Anyone here dealt with it?
What will be the best way to check and see if the situation accrues?
Thanks,
Uri
Hi,
I started reading a little on SEMS.
Tried to look for the way Kamailio works has the frontend sip server and
SEMS will be the media server (IVR, announcments etc).
I didn't understand which kamailio module should i work with in order to
open sockets with SEMS.
Or do i get it all wrong?
Uri
Hi,
I am using the $time(name) pv.
On my lab machine (centos 5.7) i get the right value (2012).
But, on my other machine (centos 6.2) i get 1900.
what am i missing here?
>
> Hi,
>
> untill today i used the mtree module to get some data from a remote DB and
> load it into memory.
> the table in the data base has 5 million rows. prefix is a number and
> value is some string.
>
> i moved to htable because i need the prefix exact match and not longest....
>
> now, after 5-10 sec, i get the following error (that i never got in mtree)
> - "lost connection to mysql during query" and kamailio does not start.
>
> any ideas how to solve it?
>
> cheers,
>
> Uri
>
Hello,
I'm currently working on a HA setup with geographically separated proxies.
Each proxy is in a different data center with an MPLS link between them.
The proxies access a locally connected PostgreSQL database that is
replicated from a master in the primary data center. Note that the
replicated dbs are read only. Everything works great for read only queries
but registrations seem to pose a problem as they must use the primary db
directly to deal with the writes. If I set userloc to db mode 2 the
secondary proxies wipe out the entries in the database. If I use db mode 3
everything works great but all of the secondary proxies must use the primary
database directly and a network link failure will cause a service
disruption. Is there any way I can use separate read and write databases
without p_userloc? Is there a better way to replicate registrations
maintaining availability and scalability? And advice is appreciated.
Thanks,
Spencer
Connected by DROID on Verizon Wireless