[SR-Users] Kamailio not recognizing SIP requests

Sergio Charrua sergio.charrua at lojavoip.com
Tue Mar 5 17:22:12 CET 2019

Hi all!

got a Kamailio doing load balancing to multiple Asterisk boxes. Kamailio is
connected to a carrier's SIP trunk, and distributes calls to Asterisk.

Receiving calls from carrier's SIP trunk works perfectly: kamailio will use
dispatcher module to distribute calls between Asterisk boxes. No problems!

Kamailio is also connected to the WWW, receiving calls from any authorized
IP (whitelisted in Firewall).
The problem is that if I get a call from the WWW and a from whitelisted IP,
kamailio does not detect any INVITE (note that the IP address is not

here is the SIP Request (IPs are obfuscated)

INVITE sip:+351234567890 at SIP/2.0
Record-Route: <sip:

Record-Route: <sip:
From: <sip:+351999999999 at somewhere.com
To: <sip:+351234567890 at>
Max-Forwards: 65
P-Asserted-Identity: "+351999999999" <sip:+351999999999 at sip.somewhere.com>
Date: Tue, 05 Mar 2019 15:55:24 GMT
Min-SE: 120
Call-ID: 799ee9a8cd02e066e2811d8052759715 at
Via: SIP/2.0/UDP;branch=z9hG4bK6b36.f67ca7e4.0
Via: SIP/2.0/UDP
Contact: "+351999999999" <sip:+351999999999 at;transport=udp>
User-Agent: SomeSIPGateway
Content-Type: application/sdp
X-SIPGW-CallSid: CA6a5691a75bb7b915c09c7931e253f542
Content-Length: 262

o=root 1219665045 1219665045 IN IP4
c=IN IP4
t=0 0
m=audio 14326 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16

SIP Messages using SNGrep:

         ----------+---------          ----------+---------
 15:55:25.980727   |        INVITE (SDP)         |
       +0.596007       | --------------------------> |
 15:55:26.576734   |        INVITE (SDP)         |
       +1.003393       | ------------------------>>> |
 15:55:27.580127   |        INVITE (SDP)         |
       +1.978513       | ------------------------>>> |
 15:55:29.558640   |        INVITE (SDP)         |
                               | ------------------------>>> |

I've checked that Kamailio is listennig to all interfaces (OK) and to port
5060 (OK).
As we can see above, SNGrep shows the incoming message to Kamailio
( but it gets stuck there as there are no other messages.
Kamailio.log doesn't show anything too, just like if the request (INVITE)
is not recognizes a a SIP message.

all other use cases work fine :
- from SIP Carrier's trunk OK
- from registered SIP user OK
- from registered SIP Trunk ok

only from a not registered SIP trunk I get this behaviour....

Any clue?

Thanks in advance,

*Sérgio *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20190305/523903a5/attachment.html>

More information about the sr-users mailing list