[OpenSIPS-Users] Forwarding REGISTER messages to Asterisk

Simon Shaw sshaw at interwise.com
Fri Sep 5 10:36:24 CEST 2008


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? 

-----Original Message-----
From: Alex Balashov [mailto:abalashov at evaristesys.com] 
Sent: Friday, September 05, 2008 9:21 AM
To: Simon Shaw
Cc: Users at lists.opensips.org
Subject: Re: [OpenSIPS-Users] Forwarding REGISTER messages to Asterisk

Simon Shaw wrote:
> I would like to use OpenSIPS as a pure router between some of my SIP
UAs 
> and Asterisk such that when one of these UAs registers with OpenSIPS
the 
> REGISTER message will be redirected to Asterisk where it will be 
> handled.   When a UA that is connected directly to the Asterisk box 
> dials one of the OpenSIPS UAs I would like the SIP INVITE to be sent 
> from the Asterisk box via OpenSIPS.
> 
> I have managed to forward the REGISTER messages to Asterisk using 
> rewritehost(<IPofAsterisk>), however when a UA that is registered 
> directly with the Asterisk dials a UA that registered via OpenSIPS the

> INVITE message is sent directly from Asterisk to the UA.
> 
> I guess this is happening because Contact header in the REGISTER
message 
> has the IP of the UA and not that of OpenSIPS.
> 
> If this assumption is correct what is the correct method to change the

> IP in the contact header?  Could the NATHelper be useful here?

The easiest thing might be to use the externip= setting if Asterisk is 
always the calling UA.  Otherwise, you will have to mangle the Contact, 
indeed.

The nathelper module won't help because the Contact URI needs to be 
rewritten to the address of your proxy, not the external network IP 
detected from the UA.

-- 
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