<p>The Setup:</p>
<p>I have two asterisk servers, AsterA and AsterB, and one ser server acting as a proxy. Both AsterA and AsterB are connected to Ser as sip clients. On the asterisk servers I have defined a SIP trunk.</p>
<p>The idea is that users/extensions on AsterA should be able to reach users/extensions on AsterB via Ser.</p>
<p>The Problem:</p>
<p>My extension numbers on AsterA range from 201 to 220. On AsterB I also have the same range of extensions, 201 to 220. When user 205 on AsterA places a call to user 201 on AsterB, he gets a network congestion message. Looking at the sip packets in Asterisk CLI, I get a &quot;Forbidden&quot; message from AsterB.
</p>
<p>Here's the interesting bit:<br>When I create a user/extension on AsterA that does not exist on AsterB, like 401, I do not get this problem and the call goes through just fine. Apparently, the problem has to do with the fact that I am using the same list of extensions on both asterisk servers.
</p>
<p>Detailed Configuration:</p>
<p>All three servers are on the same network.</p>
<p>IP Address of AsterA: <a href="http://192.168.0.9">192.168.0.9</a><br>IP Address of AsterB: <a href="http://192.168.0.14">192.168.0.14</a><br>IP Address of SER: <a href="http://192.168.0.15">192.168.0.15</a></p>
<p>To dial out from either asterisk server using the SIP trunk: 91 must be entered before the number</p>
<p>SER must know which server the call is meant for, so the following codes are used by SER to distinguish between calls for AsterA and AsterB:</p>
<p>AsterA: 51<br>AsterB: 52</p>
<p>Example 1: If 205 on AsterA wants to call 201 on AsterB, he must dial 9152201<br>Example 2: If 201 on AsterB wants to call 205 on AsterA, he must dial 9151205</p>
<p>I have insecrure=invite in both sip.conf files, for AsterA and AsterB</p>
<p>Below are the sip packets I picked up at AsterA (<a href="http://192.168.0.9">192.168.0.9</a>) when 9152201 was dialed by extension 205 at AsterB (<a href="http://192.168.0.14">192.168.0.14</a>)</p>
<p>&lt;-- SIP read from <a href="http://192.168.0.15:5060">192.168.0.15:5060</a>:<br>INVITE <a href="mailto:sip:201@192.168.0.9">sip:201@192.168.0.9</a> SIP/2.0<br>Record-Route: &lt;sip:<a href="http://192.168.0.15">192.168.0.15
</a>;lr=on;ftag=as0ebc5aac&gt;<br>Via: SIP/2.0/UDP <a href="http://192.168.0.15">192.168.0.15</a>;branch=z9hG4bKbb71.5d6dc223.0<br>Via: SIP/2.0/UDP <a href="http://192.168.0.14:5060">192.168.0.14:5060</a>;branch=z9hG4bK3170503d;rport=5060
<br>From: &quot;205&quot; &lt;<a href="mailto:sip:205@192.168.0.14">sip:205@192.168.0.14</a>&gt;;tag=as0ebc5aac<br>To: &lt;<a href="mailto:sip:52201@192.168.0.15">sip:52201@192.168.0.15</a>&gt;<br>Contact: &lt;<a href="mailto:sip:205@192.168.0.14">
sip:205@192.168.0.14</a>&gt;<br>Call-ID: <a href="mailto:3f282c4a48f8ec96669305565da7980a@192.168.0.14">3f282c4a48f8ec96669305565da7980a@192.168.0.14</a><br>CSeq: 102 INVITE<br>User-Agent: Asterisk PBX<br>Max-Forwards: 69
<br>Date: Thu, 30 Nov 2006 11:25:31 GMT<br>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY<br>Content-Type: application/sdp<br>Content-Length: 238</p>
<p>v=0<br>o=root 9000 9000 IN IP4 <a href="http://192.168.0.14">192.168.0.14</a><br>s=session<br>c=IN IP4 <a href="http://192.168.0.14">192.168.0.14</a><br>t=0 0<br>m=audio 19704 RTP/AVP 0 8 101<br>a=rtpmap:0 PCMU/8000<br>
a=rtpmap:8 PCMA/8000<br>a=rtpmap:101 telephone-event/8000<br>a=fmtp:101 0-16<br>a=silenceSupp:off - - - -</p>
<p>--- (15 headers 11 lines) ---<br>Using INVITE request as basis request - <a href="mailto:3f282c4a48f8ec96669305565da7980a@192.168.0.14">3f282c4a48f8ec96669305565da7980a@192.168.0.14</a><br>Sending to <a href="http://192.168.0.15">
192.168.0.15</a> : 5060 (non-NAT)<br>Reliably Transmitting (no NAT) to <a href="http://192.168.0.15:5060">192.168.0.15:5060</a>:<br>SIP/2.0 407 Proxy Authentication Required<br>Via: SIP/2.0/UDP <a href="http://192.168.0.15">
192.168.0.15</a>;branch=z9hG4bKbb71.5d6dc223.0;received=<a href="http://192.168.0.15">192.168.0.15</a><br>Via: SIP/2.0/UDP <a href="http://192.168.0.14:5060">192.168.0.14:5060</a>;branch=z9hG4bK3170503d;rport=5060<br>From: &quot;205&quot; &lt;
<a href="mailto:sip:205@192.168.0.14">sip:205@192.168.0.14</a>&gt;;tag=as0ebc5aac<br>To: &lt;<a href="mailto:sip:52201@192.168.0.15">sip:52201@192.168.0.15</a>&gt;;tag=as2a7b6cfc<br>Call-ID: <a href="mailto:3f282c4a48f8ec96669305565da7980a@192.168.0.14">
3f282c4a48f8ec96669305565da7980a@192.168.0.14</a><br>CSeq: 102 INVITE<br>User-Agent: Asterisk PBX<br>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY<br>Proxy-Authenticate: Digest algorithm=MD5, realm=&quot;asterisk&quot;, nonce=&quot;1371cb5b&quot;
<br>Content-Length: 0</p>
<p><br>---<br>Scheduling destruction of call <a href="mailto:'3f282c4a48f8ec96669305565da7980a@192.168.0.14'">'3f282c4a48f8ec96669305565da7980a@192.168.0.14'</a> in 15000 ms<br>Found user '205'<br>&lt;-- SIP read from <a href="http://192.168.0.15:5060">
192.168.0.15:5060</a>:<br>ACK <a href="mailto:sip:201@192.168.0.9">sip:201@192.168.0.9</a> SIP/2.0<br>Via: SIP/2.0/UDP <a href="http://192.168.0.15">192.168.0.15</a>;branch=z9hG4bKbb71.5d6dc223.0<br>From: &quot;205&quot; &lt;
<a href="mailto:sip:205@192.168.0.14">sip:205@192.168.0.14</a>&gt;;tag=as0ebc5aac<br>Call-ID: <a href="mailto:3f282c4a48f8ec96669305565da7980a@192.168.0.14">3f282c4a48f8ec96669305565da7980a@192.168.0.14</a><br>To: &lt;<a href="mailto:sip:52201@192.168.0.15">
sip:52201@192.168.0.15</a>&gt;;tag=as2a7b6cfc<br>CSeq: 102 ACK<br>User-Agent: OpenSer (1.1.0-notls (i386/linux))<br>Content-Length: 0</p>
<p><br>--- (8 headers 0 lines) ---</p>
<p>&lt;-- SIP read from <a href="http://192.168.0.15:5060">192.168.0.15:5060</a>:<br>INVITE <a href="mailto:sip:201@192.168.0.9">sip:201@192.168.0.9</a> SIP/2.0<br>Record-Route: &lt;sip:<a href="http://192.168.0.15">192.168.0.15
</a>;lr=on;ftag=as0ebc5aac&gt;<br>Via: SIP/2.0/UDP <a href="http://192.168.0.15">192.168.0.15</a>;branch=z9hG4bKcb71.18308a81.0<br>Via: SIP/2.0/UDP <a href="http://192.168.0.14:5060">192.168.0.14:5060</a>;branch=z9hG4bK73fc192a;rport=5060
<br>From: &quot;205&quot; &lt;<a href="mailto:sip:205@192.168.0.14">sip:205@192.168.0.14</a>&gt;;tag=as0ebc5aac<br>To: &lt;<a href="mailto:sip:52201@192.168.0.15">sip:52201@192.168.0.15</a>&gt;<br>Contact: &lt;<a href="mailto:sip:205@192.168.0.14">
sip:205@192.168.0.14</a>&gt;<br>Call-ID: <a href="mailto:3f282c4a48f8ec96669305565da7980a@192.168.0.14">3f282c4a48f8ec96669305565da7980a@192.168.0.14</a><br>CSeq: 103 INVITE<br>User-Agent: Asterisk PBX<br>Max-Forwards: 69
<br>Proxy-Authorization: Digest username=&quot;bf51&quot;, realm=&quot;asterisk&quot;, algorithm=MD5, uri=&quot;<a href="mailto:sip:52201@192.168.0.15">sip:52201@192.168.0.15</a>&quot;, nonce=&quot;1371cb5b&quot;, response=&quot;8ecd1a24c31a02fc938308a0f5c48924&quot;, opaque=&quot;&quot;
<br>Date: Thu, 30 Nov 2006 11:25:31 GMT<br>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY<br>Content-Type: application/sdp<br>Content-Length: 238</p>
<p>v=0<br>o=root 9000 9001 IN IP4 <a href="http://192.168.0.14">192.168.0.14</a><br>s=session<br>c=IN IP4 <a href="http://192.168.0.14">192.168.0.14</a><br>t=0 0<br>m=audio 19704 RTP/AVP 0 8 101<br>a=rtpmap:0 PCMU/8000<br>
a=rtpmap:8 PCMA/8000<br>a=rtpmap:101 telephone-event/8000<br>a=fmtp:101 0-16<br>a=silenceSupp:off - - - -</p>
<p>--- (16 headers 11 lines) ---<br>Using INVITE request as basis request - <a href="mailto:3f282c4a48f8ec96669305565da7980a@192.168.0.14">3f282c4a48f8ec96669305565da7980a@192.168.0.14</a><br>Sending to <a href="http://192.168.0.15">
192.168.0.15</a> : 5060 (non-NAT)<br>Found user '205'<br>Reliably Transmitting (no NAT) to <a href="http://192.168.0.15:5060">192.168.0.15:5060</a>:<br>SIP/2.0 403 Forbidden<br>Via: SIP/2.0/UDP <a href="http://192.168.0.15">
192.168.0.15</a>;branch=z9hG4bKcb71.18308a81.0;received=<a href="http://192.168.0.15">192.168.0.15</a><br>Via: SIP/2.0/UDP <a href="http://192.168.0.14:5060">192.168.0.14:5060</a>;branch=z9hG4bK73fc192a;rport=5060<br>From: &quot;205&quot; &lt;
<a href="mailto:sip:205@192.168.0.14">sip:205@192.168.0.14</a>&gt;;tag=as0ebc5aac<br>To: &lt;<a href="mailto:sip:52201@192.168.0.15">sip:52201@192.168.0.15</a>&gt;;tag=as2a7b6cfc<br>Call-ID: <a href="mailto:3f282c4a48f8ec96669305565da7980a@192.168.0.14">
3f282c4a48f8ec96669305565da7980a@192.168.0.14</a><br>CSeq: 103 INVITE<br>User-Agent: Asterisk PBX<br>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY<br>Content-Length: 0</p>
<p><br>---</p>
<p>&lt;-- SIP read from <a href="http://192.168.0.15:5060">192.168.0.15:5060</a>:<br>ACK <a href="mailto:sip:201@192.168.0.9">sip:201@192.168.0.9</a> SIP/2.0<br>Via: SIP/2.0/UDP <a href="http://192.168.0.15">192.168.0.15
</a>;branch=z9hG4bKcb71.18308a81.0<br>From: &quot;205&quot; &lt;<a href="mailto:sip:205@192.168.0.14">sip:205@192.168.0.14</a>&gt;;tag=as0ebc5aac<br>Call-ID: <a href="mailto:3f282c4a48f8ec96669305565da7980a@192.168.0.14">
3f282c4a48f8ec96669305565da7980a@192.168.0.14</a><br>To: &lt;<a href="mailto:sip:52201@192.168.0.15">sip:52201@192.168.0.15</a>&gt;;tag=as2a7b6cfc<br>CSeq: 103 ACK<br>User-Agent: OpenSer (1.1.0-notls (i386/linux))<br>Content-Length: 0
</p>
<p><br>--- (8 headers 0 lines) ---<br>Destroying call <a href="mailto:'3f282c4a48f8ec96669305565da7980a@192.168.0.14'">'3f282c4a48f8ec96669305565da7980a@192.168.0.14'</a></p>