[OpenSIPS-Users] Forwarding REGISTER messages to Asterisk

Iñaki Baz Castillo ibc at in.ilimit.es
Thu Sep 4 10:33:02 CEST 2008

El Wednesday 03 September 2008 19:44:42 Simon Shaw escribió:
> 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?

It's easy: if you forward the REGISTER from OpenSIPS to Asterisk then when 
Asterisk calls that user it will do it directly, since of course "Contact" in 
REGISTER has the UA IP as it's logical.

This would be possible with "Path" feature (see "path" module and related 
RFC), but of course, be sure that Asterisk doesn't implement it.

Iñaki Baz Castillo
ibc at in.ilimit.es

More information about the Users mailing list