Basically, Server 1 is the main customer PBX where we have multiple customers running (each on their own virtual PBX separated by their contexts).  Each customer has their own accountcode that we use to track calls for billing purposes, etc.  The customer uses a SIP phone to register to Server 1 and sends calls to it.  Server 1 in turn, passes the calls to Server 2 which is connected to various SIP providers and T-1&#39;s, etc. for termination to the PSTN.   In the following sip configuration, calls work perfectly, except that the caller ID gets passed as the value from &quot;fromuser&quot; instead of the numeric value we set via the Set(CALLERID(num)=5555555555) command.  In other words, the fromuser overrides the caller ID value.  If we remove the &quot;fromuser&quot; in the sip configuration, calls work great and caller ID is passed, BUT all calls land in the customerb context on Server 2 since that is the last SIP entry in sip.conf that has a host entry set to &quot;192.168.0.11&quot; which is the IP of Server 1.<br>
<br>Server 1 (192.168.0.11)<br><br>sip.conf<br><br>[general]<br>disallow = all<br>allow = ulaw<br>port = 5060<br>context = incoming <br>maxexpirey=3600<br>defaultexpirey=300<br>canreinvite=no<br>dtmfmode=auto<br>nat=yes<br>
<br>; Customer A Outbound SIP <br>[customera-out]<br>context=customera<br>type=friend<br>username=customera-out<br>fromuser=customera-out<br>secret=aaaa<br>host=192.168.0.12<br>canreinvite=no<br>accountcode=customera<br>amaflags=billing<br>
dtmfmode=auto<br><br>; Customer A SIP Phone Account<br>[customera101]<br>context=customera<br>type=friend<br>username=customera101<br>secret=1234<br>host=dynamic<br>canreinvite=no<br>mailbox=101@customera<br>nat=yes<br>qualify=yes<br>
callerid=&quot;John Smith&quot; &lt;101&gt;<br>accountcode=customera<br>amaflags=billing<br>dtmfmode=rfc2833<br><br>; Customer B Outbound SIP <br>[customerb-out]<br>context=customerb<br>type=friend<br>username=customerb-out<br>
fromuser=customerb-out<br>secret=bbbb<br>host=192.168.0.12<br>canreinvite=no<br>accountcode=customerb<br>amaflags=billing<br>dtmfmode=auto<br><br>; Customer B SIP Phone Account<br>[customerb101]<br>context=customerb<br>type=friend<br>
username=customerb101<br>secret=1234<br>host=dynamic<br>canreinvite=no<br>mailbox=101@customerb<br>nat=yes<br>qualify=yes<br>callerid=&quot;Jane Jones&quot; &lt;101&gt;<br>accountcode=customerb<br>amaflags=billing<br>dtmfmode=rfc2833<br>
<br><br><br><br>Server 2 (192.168.0.12)<br><br>sip.conf:<br><br>[general]<br>disallow = all<br>allow=ulaw<br>port = 5060<br>context = incoming<br>canreinvite=no<br>nat=no<br>dtmfmode=auto<br><br>[customera-out]<br>context=customera<br>
type=friend<br>username=customera-out<br>secret=aaaa<br>host=192.168.0.11<br>accountcode=customera<br>amaflags=billing<br>dtmfmode=auto<br><br>[customerb-out]<br>context=customerb<br>type=friend<br>username=customerb-out<br>
secret=bbbb<br>host=192.168.0.11  <br>accountcode=customerb<br>amaflags=billing<br>dtmfmode=auto   <br><br><br><br><br><br><br><br><br><div class="gmail_quote">On Fri, Mar 6, 2009 at 2:48 PM, Steve Howes <span dir="ltr">&lt;<a href="mailto:steve@geekinter.net">steve@geekinter.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im"><br>
On 6 Mar 2009, at 19:29, tracinet wrote:<br>
<br>
&gt; That stinks... We are migrating to SIP from IAX2 at the moment and<br>
&gt; running into the same exact problem.  No way to control the<br>
&gt; destination context unless you use the &quot;fromuser&quot;.  Of course that<br>
&gt; is rendering Caller ID useless as you pointed out.<br>
<br>
</div>Give me the exact sip.conf you have both ends. Might be able to get it<br>
working.<br>
<div><div></div><div class="h5"><br>
_______________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</div></div></blockquote></div><br>