<div dir="ltr"><div>Hi, all</div><div><br></div><div>We're trying to build a system that consists of pbx, kamailio and asterisk in the following configuration.</div><div><br></div><div>pbx (sip trunk) --- kamailio --- asterisk</div><div><br></div><div>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.</div><div>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.</div><div><br></div><div>The asterisk log says:</div><div><br></div><div><div>[Jan 21 23:13:19] VERBOSE[20785] chan_sip.c: --- (16 headers 13 lines) ---</div><div>[Jan 21 23:13:19] VERBOSE[20785] chan_sip.c: Sending to <a href="http://10.0.1.30:5061">10.0.1.30:5061</a> (no NAT)</div><div>[Jan 21 23:13:19] VERBOSE[20785][C-00000001] chan_sip.c: Sending to <a href="http://10.0.1.30:5061">10.0.1.30:5061</a> (no NAT)</div><div>[Jan 21 23:13:19] VERBOSE[20785][C-00000001] chan_sip.c: Using INVITE request as basis request - <a href="http://4aaa2dce75c60e8546994c3501dae9e7@10.0.1.35:5061">4aaa2dce75c60e8546994c3501dae9e7@10.0.1.35:5061</a></div><div>[Jan 21 23:13:20] NOTICE[20785][C-00000001] acl.c: SIP Peer ACL: Rejecting '10.0.1.30' due to a failure to pass ACL '(BASELINE)'</div><div>[Jan 21 23:13:20] NOTICE[20785][C-00000001] chan_sip.c: Failed to authenticate device <<a href="mailto:sip%3A95678@10.0.1.35">sip:95678@10.0.1.35</a>>;tag=as4028dabf</div><div>[Jan 21 23:13:20] VERBOSE[20785][C-00000001] chan_sip.c:</div><div><--- Reliably Transmitting (no NAT) to <a href="http://10.0.1.30:5061">10.0.1.30:5061</a> ---></div><div>SIP/2.0 403 Forbidden^M</div><div>Via: SIP/2.0/TLS 10.0.1.30:5061;branch=z9hG4bK9c8e.5cd2c05f6a572312c7793abf5fe1183c.0;i=2;received=10.0.1.30^M</div><div>Via: SIP/2.0/TLS 10.0.1.35:5061;received=10.0.1.35;branch=z9hG4bK249855c1;rport=59929^M</div><div>From: <<a href="mailto:sip%3A95678@10.0.1.35">sip:95678@10.0.1.35</a>>;tag=as4028dabf^M</div><div>To: <<a href="mailto:sip%3A16317@10.0.1.30">sip:16317@10.0.1.30</a>>;tag=as35f47241^M</div><div>Call-ID: <a href="http://4aaa2dce75c60e8546994c3501dae9e7@10.0.1.35:5061">4aaa2dce75c60e8546994c3501dae9e7@10.0.1.35:5061</a>^M</div><div>CSeq: 102 INVITE^M</div><div>Server: Asterisk PBX 13.6.0^M</div><div>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE^M</div><div>Supported: replaces, timer^M</div><div>Content-Length: 0^M</div></div><div><br></div><div>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.</div><div><br></div>Thanks.<div><br clear="all"><div><div class="gmail_signature"><div dir="ltr">Ding Ma<div>SPG, Motorola Solutions</div></div></div></div>
</div></div>