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'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 "fromuser" 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 "fromuser" 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 "192.168.0.11" which is the IP of Server 1.
Server 1 (192.168.0.11) sip.conf [general] disallow = all allow = ulaw port = 5060 context = incoming maxexpirey=3600 defaultexpirey=300 canreinvite=no dtmfmode=auto nat=yes ; Customer A Outbound SIP [customera-out] context=customera type=friend username=customera-out fromuser=customera-out secret=aaaa host=192.168.0.12 canreinvite=no accountcode=customera amaflags=billing dtmfmode=auto ; Customer A SIP Phone Account [customera101] context=customera type=friend username=customera101 secret=1234 host=dynamic canreinvite=no mailbox=...@customera nat=yes qualify=yes callerid="John Smith" <101> accountcode=customera amaflags=billing dtmfmode=rfc2833 ; Customer B Outbound SIP [customerb-out] context=customerb type=friend username=customerb-out fromuser=customerb-out secret=bbbb host=192.168.0.12 canreinvite=no accountcode=customerb amaflags=billing dtmfmode=auto ; Customer B SIP Phone Account [customerb101] context=customerb type=friend username=customerb101 secret=1234 host=dynamic canreinvite=no mailbox=...@customerb nat=yes qualify=yes callerid="Jane Jones" <101> accountcode=customerb amaflags=billing dtmfmode=rfc2833 Server 2 (192.168.0.12) sip.conf: [general] disallow = all allow=ulaw port = 5060 context = incoming canreinvite=no nat=no dtmfmode=auto [customera-out] context=customera type=friend username=customera-out secret=aaaa host=192.168.0.11 accountcode=customera amaflags=billing dtmfmode=auto [customerb-out] context=customerb type=friend username=customerb-out secret=bbbb host=192.168.0.11 accountcode=customerb amaflags=billing dtmfmode=auto On Fri, Mar 6, 2009 at 2:48 PM, Steve Howes <[email protected]> wrote: > > On 6 Mar 2009, at 19:29, tracinet wrote: > > > That stinks... We are migrating to SIP from IAX2 at the moment and > > running into the same exact problem. No way to control the > > destination context unless you use the "fromuser". Of course that > > is rendering Caller ID useless as you pointed out. > > Give me the exact sip.conf you have both ends. Might be able to get it > working. > > _______________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
_______________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
