[asterisk-users] Call history problems from B2BUA

John A. Sullivan III jsullivan at opensourcedevel.com
Tue Jul 28 06:06:34 CDT 2009


Hello, all.  Alas, another convoluted question.  All the simple things
are, well, simple so I suppose we only need to trouble the list with
squirrely problems!

We've noticed a call history problem when using Asterisk where the call
history on the Snom phones (with which we are very pleased) reflects the
number of the PBX extension used by the B2BUA to dial the end point.  I
assume the same would be true of any B2BUA.

There are two flavors of this problem.  In one version, addresses
outside of the PBX work fine but calls from different contexts within
the same multi-tenant PBX cannot be returned from call history.  In the
other, all call history is broken.

I know that sounds confusing so let me illustrate.  Here is the first
scenario.  Imagine a multi-tenant PBX with two tenants - mycompany.com
and yourcompany.com.  Each allows direct inbound SIP dialing to
addresses such as user1 at mycompany.com.  The tenants live in separate
contexts within the PBX and cannot see each other's contexts for both
security and because they have some overlapping extensions.

Internally, user1 at mycompany.com uses extension 312 and thus is accessed
at 312 at pbx.mycompany.com.  His Snom phone is user1 at 10.2.2.20.
user2 at yourcompany.com uses extension 15 and is this accessed at
15 at pbx.yourcompany.com while his Snom phone is at 10.1.1.10.
pbx.mycompany.com and pbx.yourcompany.com map to the same IP address -
the multi-tenant PBX.

user1 at mycompany.com makes a direct SIP call to user2 at yourcompany.com.
user1 at mycompany.com connects to Asterisk as its outbound proxy and is
associated with 312 at pbx.mycompany.com.  312 at pbx.mycompany.com then calls
user2 at 10.1.1.10 (IP address of the Snom phone) and we have a successful
B2BUA call.

user2 at yourcompany.com wants to call back user1 at mycompany.com so they go
to their call history.  The call shows up as from user1
<312 at pbx.mycompany.com> (actually, it seems to use the resolved IP
address).  user2 highlights the call in the history, presses check and
the call fails because there is no 312 in any accessible context.  How
would we get the call history to show user1 at mycompany.com instead of
312 at x.x.x.x?

This leads to the second scenario which is actually our preferred
configuration.  We set fromuser and fromdomain in sip.conf.  This is
preferable to use because we use different IDs internally and externally
so we never expose internal IDs to the world.  Thus, user1's sip ID
might be 1user but his public sip address is user1 at mycompany.com.  Thus,
we would like to overwrite his outbound identity to be
user1 at mycompany.com.  That's why we originally set fromuser and
fromdomain but this backfired.  Now user2 sees user1's call as coming
from user1 <user2 at yourcompany.com> because user2's sip configuration
says to set fromuser=user2 and fromdomain=yourdomain.com.  It seems when
the B2BUA sets up the leg to user2, it thinks it is coming from user2's
extension.  In fact, this even breaks outside numbers.  If I dial in
from the PSTN, e.g., 207-111-2222 in the US, the call history shows:
2071112222 <sip:user2 at yourcompany.com>
If user2 attempts to dial from their call history, they will dial
themselves!

How do we get this to work properly? Thanks - John
-- 
John A. Sullivan III
Open Source Development Corporation
+1 207-985-7880
jsullivan at opensourcedevel.com

http://www.spiritualoutreach.com
Making Christianity intelligible to secular society




More information about the asterisk-users mailing list