[SR-Users] question about kamailio handling of forwarded invite

DING MA ding.ma at motorolasolutions.com
Fri Jan 22 16:15:54 CET 2016

Hi, all

We're trying to build a system that consists of pbx, kamailio and asterisk
in the following configuration.

pbx (sip trunk) --- kamailio --- asterisk

The kamailio and asterisk are integrated with same database. The outgoing
calls to pbx works. But there is a problem with incoming calls from pbx.
If we make a consecutive calls from the same pbx user to the same user
registered with kamailio. The first would go through, but the second call
would be rejected by asterisk. We have insecure=invite set on the
trunk/peer, so asterisk is not supposed to auth the invite from kamailio.
But the pbx user (from in this case) is not in the database.

The asterisk log says:

[Jan 21 23:13:19] VERBOSE[20785] chan_sip.c: --- (16 headers 13 lines) ---
[Jan 21 23:13:19] VERBOSE[20785] chan_sip.c: Sending to (no
[Jan 21 23:13:19] VERBOSE[20785][C-00000001] chan_sip.c: Sending to (no NAT)
[Jan 21 23:13:19] VERBOSE[20785][C-00000001] chan_sip.c: Using INVITE
request as basis request - 4aaa2dce75c60e8546994c3501dae9e7 at
[Jan 21 23:13:20] NOTICE[20785][C-00000001] acl.c: SIP Peer ACL: Rejecting
'' due to a failure to pass ACL '(BASELINE)'
[Jan 21 23:13:20] NOTICE[20785][C-00000001] chan_sip.c: Failed to
authenticate device <sip:95678 at>;tag=as4028dabf
[Jan 21 23:13:20] VERBOSE[20785][C-00000001] chan_sip.c:
<--- Reliably Transmitting (no NAT) to --->
SIP/2.0 403 Forbidden^M
Via: SIP/2.0/TLS
Via: SIP/2.0/TLS
From: <sip:95678 at>;tag=as4028dabf^M
To: <sip:16317 at>;tag=as35f47241^M
Call-ID: 4aaa2dce75c60e8546994c3501dae9e7 at^M
CSeq: 102 INVITE^M
Server: Asterisk PBX 13.6.0^M
Supported: replaces, timer^M
Content-Length: 0^M

Comparing the two invites from kamailio to asterisk, it seems the only
difference is that the second invite has an "i=2" in the Via header while
the first one has "i=1". Not sure what the "i=1" is for. Would appreciate
some insights on how kamailio is adding/handling the "i=#" in Via header.


Ding Ma
SPG, Motorola Solutions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20160122/02fa83db/attachment.html>

More information about the sr-users mailing list