Hello,
looking at the log messages, Kamailio is receiving only the REGISTER
request, not the reply to it. If you see it on the network, then some
system filtering (firewall, conntrack, selinux, ...) is dropping it and
is not passed to the application layer.
Can you check if you have any of those tools enabled and having rules to
drop packages?
Also, maybe you can send the pcap with such sip traffic so we can check
if something is wrong at the ip layer (udp checksum, etc...).
Regarding the conditions, doing "!= true" is not better at all. I
understand that you are used to and prefer some specific style, just
that kamailio config interpreter is not like the common scripting
languages interpreters. It doesn't really have support for "bool" as a
type, only evaluation of the code returned by functions is evaluate to
true/false for IF conditions, however that is done in a very particular
way that negative return codes are considered to be a "false" expression
evaluation in IF and positive value is considered to be a "positive"
expression evaluation in IF. Comparing with the token 'false' (which is
value 0) or token 'true' (which is value 1) is not going to give the
results you expect in most of the cases.
Better to stick to if(!function()) or if(!function()), otherwise try to
play with <0 or >0 conditions, but careful on how you build the
expressions and use surrounding parenthesis.
Look also at KEMI interpreters, there you can use Lua, Python, JS, ...
to build the kamailio config routing logic and there you can use a style
specific for those languages, see:
*
http://kamailio.org/docs/tutorials/devel/kamailio-kemi-framework/
Cheers,
Daniel
On 06.04.20 12:32, fuxfwgc4a2i1gr wrote:
Hello. Thanks for your reply .
I understand about nat . Am i right that even without nat traversal
logic i have to see on proxy itself attempts to connect to private ip
addresses ?
But i not see them.
Ok i changed "== false", to "!= true". I prefer to use long
condition
forms to have better config file readability.
But i am not sure that even my "==false" which in block
onreply_route[REPLYROUTE] can influence on something because xlog
operator stay before condition and i have to see a least message that
packet reached onreply_route .
To make capture i using "ngrep -d any -qt -W byline port 7060" it
listen on all interfaces and result exactly same as bug report on github.
I attached debug log from kamailio on system where issue persist. Well
i replaced some private information inside it to avoid voip frauders
to collect information. But privately i can send original ones if needed.
Affected host does not have firewall configured.
It have two ip addresses(two physical interfaces) . One of them
assigned public address, another private (10.34.79.254/20). REGISTRAR
in same LAN segment with proxy private ip address.
On 2020-04-05 09:03, Daniel-Constantin Mierla wrote:
> Hello,
>
> if the device is behind nat router, you have to do the nat traversal
> logic, because the Via header will be a private IP address, which cannot
> be used for routing by Kamailio.
>
> To troubleshoot further, set debug=3 in kamailio.cfg and test again.
> Grab all log messages printed by kamailio in syslog (there should be a
> lot with DEBUG:...) and send them here. Also, get the pcap file with sip
> traffic for such case. It helps seeing what addresses are in the SIP
> headers.
>
> Moreover, remove all those " == false ", as I said in the github issue,
> that can be something not giving what you would expect.
>
> Cheers,
> Daniel
>
> On 05.04.20 07:15, fuxfwgc4a2i1gr wrote:
>> Hi, Thanks for your solution.
>>
>> I tried to use it from early beginning and this is was a reason why i
>> created bug report on github.
>>
>> When i start tcpdump on proxy. I see 404 reply from REGISTRAR to
>> Proxy. But not see reply from Proxy to UA.
>>
>> Look like that Kamailio don`t think that 404 reply is a part of
>> transaction.
>>
>>
>> _______________________________________________
>> Kamailio (SER) - Users Mailing List
>> sr-users(a)lists.kamailio.org
>>
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla --
www.asipto.com
www.twitter.com/miconda --
www.linkedin.com/in/miconda