[OpenSIPS-Users] Forwarding REGISTER messages to Asterisk

Alex Balashov abalashov at evaristesys.com
Fri Sep 5 10:56:37 CEST 2008


Simon Shaw wrote:

> Just as a matter of academic interest, if I change the contact header
> field do I stop being a proxy and become an SBC or is there no such
> distinction? 

The dichotomy posed between a proxy and an SBC is incorrect, or least 
orthogonal;  an SBC is a particular kind of VoIP infrastructure 
equipment.  Perhaps you were referring to a UAC?  An SBC generally has a 
back-to-back user agent, and therefore constitutes a UAC, but the 
reference to an SBC as such is specious.  PBXs, phones, etc. are also UACs.

Either way, it is not contrary to proxy behaviour to change the Contact: 
header, as long as the translation is statefully conserved on both sides 
of the relay.

The formal distinction between a proxy and a user agent is that:

1) The proxy only relays, and as such, its behaviour is transactionally 
event-driven;  it does not create any call legs, nor originate any 
transactional events.  It just passes what it receives between 
endpoints, when it receives it.

2) A proxy's role within a dialog participates in one logical call leg. 
  The properties that distinguish a call leg are its CSeq counters, GUID 
(Call-ID), and dialog tags on to/from.  Back-to-back user agents such as 
PBXs create new call legs and bridge them in VoIP-to-VoIP calls, while 
proxies are in the path of one leg.

There are other practical implications to being a proxy and not a UA; 
they mainly revolve around not being able to do various things that an 
endpoint can do, such as modify certain parameters of the session, or 
handle media.  Another implication concerns wrapping calls around to the 
sending UA:

   UA1 --> Proxy --> Back to UA1

This is a common attempted use of proxies for LCR and translation 
functionality;  i.e. a softswitch sends a call to a proxy, a proxy does 
some intelligent database stuff, stamps a prefix onto the Request URI, 
and sends the call back to the same originating signaling agent.  This 
won't work because a SIP UAC will detect the wrapped-around call as 
being the same logical call leg that it originated and declare it a 
"looped" call.

With the exception of the UAC module and some other pieces of 
functionality (i.e. auxiliary NAT traversal via media proxies) that can 
be hacked onto it, Kamailio won't let you do things that aren't properly 
within the domain of a proxy to do.  However, mangling SIP headers and 
message parameters (well, certain ones, including the one you're asking 
about) is a very common and acceptable use of proxies.

-- Alex



-- 
Alex Balashov
Evariste Systems
Web    : http://www.evaristesys.com/
Tel    : (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (706) 338-8599



More information about the Users mailing list