It appears that the bottom line of my TCP transport not working is that Kamailio is randomly assigning large port numbers to send the TCP traffic out on.
I am not able to randomly open high ports for this purpose. Is there a way to tell Kamailio to only use specific ports for this. I have tried using
force_send_socket() with Kamailio' s IP, and the port I want to send out on, but this did not work either. Does this sound like I am on the right track?
Thank you,
-
Hi All,
I was attempting to switch from UDP to TCP for relaying. I used t_relay_to_tcp() instead of t_relay() =>
if (!t_relay_to_tcp()) {
sl_reply_error();
}
The problem is that I am still seeing the SIP messages as UDP on the Server that the messages are relayed to. Any Ideas?
Thank you,
Steve
So I finally got to the docs on hunting under the TM Modules and there was an awesome write up and it is making a lot more sense now.
Basic logic is to append_branch with your extensions and and manage serial and/or parallel forking by setting the q values.
The script is static. Is there a module that automatically loads registered contacts from a grouped list of extensions or is the best way to dip into the db and DIY? I would like to know how some of you have implemented hunting,
Also is there a way to set the fr_inv_timer of each branch.
Thanks in advance.
KD
Dear community,
I'd like to inform you about Alcatel-Lucent Enterprise (ALE) acquiring a majority stake in Sipwise. Over the last 10 years, we at Sipwise were committed to contributing significant efforts to the open source telecom environment, resulting amongst others in the free and open source Sipwise CE soft-switch appliance, the rtpengine media relay, as well as major contributions to the Kamailio SIP proxy. Under the ALE roof, Sipwise is continuing to operate as its own brand, and our commitment to open source and our community components will be as strong as ever.
Please find the official announcement here: https://www.sipwise.com/ale-sipwise/
Best regards,
Andreas
Hi Younas,
when you have a call if you make a trace in your sip server with sngrep or
tshark can you see the RTP packet ?
you says "I have kamailio server behind nat with rptproxy.", so is it
possible that the router in front your SIP server blocks the traffic? could
you have a trace there?
I mean the packets exit the rtpproxy but don't arrive to callee or just
don't come out of the rtpproxy?
Giovanni Tommasini |
*evosip* <http://evosip.cloud>
2018-05-18 1:36 GMT+02:00 Aqs Younas <aqsyounas(a)gmail.com>:
> Thanks for replying. Callee is actually a sip provider. I see no firewall
> or iptables rules on server to prevent rtp following towards callee.
>
> Is there anything i can do to see which thing is blocking rtps.
>
> Best
>
> On Fri, 18 May 2018 at 3:59 AM, Mack Hendricks <ap(a)goflyball.com> wrote:
>
>> Is there something blocking RTP traffic from reaching the callee? Is the
>> callee a carrier or the actually endpoint endpoint (aka SIP Phone)?
>>
>> *Mack Hendricks / Head of Support / dOpenSource*
>> web: http://dopensource.com
>> support: +888-907-2085
>> dSIPRouter <http://dsiprouter.org> - GUI focused on implementing
>> Kamailio to provide SIP Trunking and PBX Hosting Services
>>
>> On May 18, 2018, at 12:50 AM, Aqs Younas <aqsyounas(a)gmail.com> wrote:
>>
>> Greetings list,
>>
>>
>> I have kamailio server behind nat with rptproxy. But i am getting no
>> voice on the call. After taking trace i could see that rtpproxy was getting
>> rtp packets but not packets was being forwarded towards callee side.
>>
>> Though i see in rtpproxy logs, packets being relayed from caller side.
>>
>> Does rtpproxy wait to receive a single rtp frame from callee before
>> fowarding that to callee?
>>
>> Since, i am getting no rtp from callee. So, might be rptrpoxy is waiting
>> to learn source address of callee side rtp, that is why it is not
>> forwarding rtp packets from caller towards callee.
>>
>>
>> Any pointer/suggestion is much appreciated.
>>
>> Best Regards,
>>
>> Aqs Younas
>>
>> _______________________________________________
>> Kamailio (SER) - Users Mailing List
>> sr-users(a)lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>> _______________________________________________
>> Kamailio (SER) - Users Mailing List
>> sr-users(a)lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users(a)lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
I'm trying to debug an issue I've encountered where a variable that I've set using kamcmd cfg.set has an unexpected value when used in kamailio. The variable should be 0 or 1, but it looks like its getting set accidently somehow.
2018-05-11T22:02:58.344260+00:00 ip-172-31-129-45 kamailio[5253]: DEBUG: <core> [select.c:263]: resolve_select(): 'with_dynamodb_user_data'
2018-05-11T22:02:58.344264+00:00 ip-172-31-129-45 kamailio[5253]: DEBUG: <core> [cfg/cfg_select.c:174]: select_cfg_var(): DEBUG: select_cfg_var(): select fixup is postponed: features.with_dynamodb_user_data
2018-05-11T22:05:03.467110+00:00 ip-172-31-129-45 kamailio[5551]: INFO: <core> [cfg/cfg_ctx.c:608]: cfg_set_now(): INFO: cfg_set_now(): features.with_dynamodb_user_data has been changed to 1
2018-05-11T22:15:51.695118+00:00 ip-172-31-129-45 kamailio[5574]: [2c03c333-1705-41b1-aa26-6f10492a5a6f] DEBUG: with_dynamodb_user_data is 1157627905
I've tried to debug using gdb using breaks and set a watch on the memory address of the var, but it looks like it keeps using different memory locations. The value in the address pointed at by group.handle seems to change for each invocation of set_cfg_now, so when I try and put a watch on the address of *group.handle + var.offset it never gets hit.
(gdb) print *group
$36 = {num = 25, mapping = 0x7f56ee4474f0, vars = 0x0, add_var = 0x0, size = 164, meta_offset = 968, var_offset = 984, handle = 0x7f56edf92fd0, orig_handle = 0x0,
dynamic = 1 '\001', next = 0x0, name_len = 8, name = "f"}
(gdb) print *var
$62 = {def = 0x7f56ee471668, name_len = 23, pos = 24, offset = 164, flag = 0}
Any ideas?
Malcolm
Hi All,
I am testing a scenario where we have 3 proxies and I'm trying to ensure
that if a messages comes in to 1 proxy, which challenges the ua, is able
to be auth'd successfully on one of the remaining 2 proxies if, for some
reason the ua decides to send the response to one of the remaining two
proxies.
I am testing this using a seperate kamailio proxy which loadbalances
messages across the 3 proxies that I am testing with. I have 1 ua
(zoiper) which I tell to subscribe for mwi, the initial subscribe is
sent to proxy 1, which sends a 407 back, the new subscribe with auth,
from the ua, is sent to proxy 2, which deems the nonce as expired and
rechallenges, this continues in a loop across the 3 proxies and never
authenticates.
I think I'm missing something in my settings that I just cannot put my
finger on, and/or, I'm mis-understanding the documentation and how these
settings interact with each other.
My auth module settings are as follows:
#
# ----- auth params -----
#
modparam("auth", "qop", "auth")
modparam("auth", "nonce_count", 1)
modparam("auth", "one_time_nonce", 1)
modparam("auth", "nid_pool_no", 4)
modparam("auth", "nc_array_size", 4194304)
modparam("auth", "otn_in_flight_no", 8388608)
modparam("auth", "auth_checks_no_dlg", 9)
modparam("auth", "auth_checks_in_dlg", 15)
modparam("auth", "auth_checks_register", 11)
modparam("auth", "secret", "secret_32_char_str")
I tried with one_time_nonce enabled and disabled but the result is the
same, continous rechallenge.
The documentation mentions that if nonce_count and one_time_nonce are
enable, and a ua sends a response with nonce and qop in the auth header
then one_time_nonce will not be used, one_time nonce will be used as a
fallback in the case the ua does not support qop.
My auth block in the routing logic looks like so:
route[AUTH_CHECK]{
xlog("L_DBG", "route[AUTH_CHECK] : $rm : Performing authentication
checks for '$var(creds_key)'");
$var(challenge_flags) = 1;
if ( ! pv_auth_check("$fd",
"$sht(creds=>$var(creds_key)::Password)", "20", "1") ) {
switch($retcode) {
case -1:
xlog("L_DBG", "route[AUTH_CHECK] : $rm : Generic error
occurred, no reply sent out.");
break;
case -2:
xlog("L_DBG", "route[AUTH_CHECK] : $rm : Invalid
password supplied, re-challenging client and removing from hash table.");
sht_rm_name_re("creds=>$var(creds_key)");
break;
case -4:
xlog("L_DBG", "route[AUTH_CHECK] : $rm : Nonce has
expired, re-challenging client.");
$var(challenge_flags) = $var(challenge_flags) + 16;
break;
case -5:
xlog("L_DBG", "route[AUTH_CHECK] : $rm : No credentials
supplied, challenging client.");
break;
case -6:
xlog("L_DBG", "route[AUTH_CHECK] : $rm : Nonce has
already been used to auth a previous request, challenging client.");
break;
case -8:
xlog("L_DBG", "route[AUTH_CHECK] : $rm : Auth user is
different to From/To user, challenging client.");
break;
}
xlog("L_INFO", "route[AUTH_CHECK] : $rm : auth_challenge will
be called with '$fd' and '$var(challenge_flags)'");
auth_challenge("$fd", "$var(challenge_flags)");
exit;
}
consume_credentials();
}
When I look at the logs I always see the proxies seeing the nonce as
expired:
oUBGp0n6HRWu_mvPPxJQqg..: INFO: <script>: route[AUTH_CHECK] : SUBSCRIBE
: auth_challenge will be called with 'example.com' and '17'
oUBGp0n6HRWu_mvPPxJQqg..: INFO: <script>: route[AUTH_CHECK] : SUBSCRIBE
: auth_challenge will be called with 'example.com' and '17'
oUBGp0n6HRWu_mvPPxJQqg..: INFO: <script>: route[AUTH_CHECK] : SUBSCRIBE
: auth_challenge will be called with 'example.com' and '17'
oUBGp0n6HRWu_mvPPxJQqg..: INFO: <script>: route[AUTH_CHECK] : SUBSCRIBE
: auth_challenge will be called with 'example.com' and '17'
oUBGp0n6HRWu_mvPPxJQqg..: INFO: <script>: route[AUTH_CHECK] : SUBSCRIBE
: auth_challenge will be called with 'example.com' and '17'
oUBGp0n6HRWu_mvPPxJQqg..: INFO: <script>: route[AUTH_CHECK] : SUBSCRIBE
: auth_challenge will be called with 'example.com' and '17'
I have checked:
[1] that the proxies are all syncing time, and they are not out of sync,
[2] The source address of the client doesnt change (in case
auth_checks_no_dlg is failing),
[3] The r-uri of the subscription dialog is the same (in case
auth_checks_no_dlg is failing)
I am using kamailio version 5.0.6:
kamailio -V
version: kamailio 5.0.6 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS,
DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC,
Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, 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 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled on 15:57:47 Mar 5 2018 with gcc 4.8.5
Any thoughts on what I can look at or if I'm missing something
fundamental here?
All suggestions/criticisms are appreciated.
Thanks for reading.
Greetings list,
I have kamailio server behind nat with rptproxy. But i am getting no voice
on the call. After taking trace i could see that rtpproxy was getting rtp
packets but not packets was being forwarded towards callee side.
Though i see in rtpproxy logs, packets being relayed from caller side.
Does rtpproxy wait to receive a single rtp frame from callee before
fowarding that to callee?
Since, i am getting no rtp from callee. So, might be rptrpoxy is waiting to
learn source address of callee side rtp, that is why it is not forwarding
rtp packets from caller towards callee.
Any pointer/suggestion is much appreciated.
Best Regards,
Aqs Younas
Hello,
I am still struggling with getting TCP relay to work. Kamailio is now trying to send TCP but it is using the incorrect port. Kamailio is relaying to Asterisk on xx.xx.xx.xx:some-large-port but Asterisk is listening on xx.xx.xx.xx:5060. I'm not sure why this is happening. I would appreciate any help.
Thank you,