<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div>I would highly highly highly recommend you *DO NOT* use Asterisk if you'll have any sort of volume of registrations (for the record, I am an Asterisk advocate).</div><div><br></div><div>I speak from experience and can say first hand that this is a **bad idea**.</div><div><br></div><div>Asterisk's sip stack and configuration setup really just don't allow for a high concentration of SIP registrations without a very significant penalty on the Asterisk host. I had a couple hundred registrations on a single Asterisk server that started to visibly effect the performance of the host server. When I hit 500 registrations, the Asterisk server was unusable. I have consistently been able to reproduce this effect to varying degrees on several Linux distros and on four different hardware vendor platforms.</div><div><br></div><div>Offloading the registrations to OpenSIPS is the smart way to do it. If you're wanting to send the call simultaneously to Asterisk and the end-point you can make a creative OpenSIPS config file using the LCR module or dbalias or something.</div><div><br></div><div>If you're wanting to do processing on the Asterisk server before the end-point is called, you could use the opensips config to route all the calls to the Asterisk server(s) and then have the Asterisk servers do their processing bit and send the call back to OpenSIPS which could detect the call as coming from your pool of Asterisk server(s) and do a location lookup at that point.</div><div><br></div><div>In any case, be creative, it's quite possible to do almost anything with the call flows you'd like having OpenSIPS at the front of your network. </div><div><br></div><div>Good Luck!</div><div><br></div><div><br></div><div>_____________________________</div><div><br></div><div>Darren Sessions</div><div><a href="mailto:dmsessions@gmail.com">dmsessions@gmail.com</a></div><div><a href="http://www.darrensessions.com">http://www.darrensessions.com</a></div><div><font class="Apple-style-span" face="Arial"><span class="Apple-style-span" style="line-height: 14px; white-space: pre-wrap; ">_____________________________</span></font></div><div><br></div></span></div></span></div></span></div></span></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"> </div><br><div><div>On Sep 4, 2008, at 8:58 AM, Simon Shaw wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>I was hoping to solve this issue in a more generic manner.<br>Any idea how I change the IP address in the contact header?<br><br>-----Original Message-----<br>From: users-bounces@lists.opensips.org [<a href="mailto:users-bounces@lists.opensips.org">mailto:users-bounces@lists.opensips.org</a>] On Behalf Of I?aki Baz Castillo<br>Sent: Thursday, September 04, 2008 11:33 AM<br>To: <a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a><br>Subject: Re: [OpenSIPS-Users] Forwarding REGISTER messages to Asterisk<br><br>El Wednesday 03 September 2008 19:44:42 Simon Shaw escribió:<br><blockquote type="cite">I would like to use OpenSIPS as a pure router between some of my SIP UAs<br></blockquote><blockquote type="cite">and Asterisk such that when one of these UAs registers with OpenSIPS the<br></blockquote><blockquote type="cite">REGISTER message will be redirected to Asterisk where it will be<br></blockquote><blockquote type="cite">handled. When a UA that is connected directly to the Asterisk box<br></blockquote><blockquote type="cite">dials one of the OpenSIPS UAs I would like the SIP INVITE to be sent<br></blockquote><blockquote type="cite">from the Asterisk box via OpenSIPS.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I have managed to forward the REGISTER messages to Asterisk using<br></blockquote><blockquote type="cite">rewritehost(<IPofAsterisk>), however when a UA that is registered<br></blockquote><blockquote type="cite">directly with the Asterisk dials a UA that registered via OpenSIPS the<br></blockquote><blockquote type="cite">INVITE message is sent directly from Asterisk to the UA.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I guess this is happening because Contact header in the REGISTER message<br></blockquote><blockquote type="cite">has the IP of the UA and not that of OpenSIPS.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">If this assumption is correct what is the correct method to change the<br></blockquote><blockquote type="cite">IP in the contact header? Could the NATHelper be useful here?<br></blockquote><br>It's easy: if you forward the REGISTER from OpenSIPS to Asterisk then when <br>Asterisk calls that user it will do it directly, since of course "Contact" in <br>REGISTER has the UA IP as it's logical.<br><br>This would be possible with "Path" feature (see "path" module and related <br>RFC), but of course, be sure that Asterisk doesn't implement it.<br><br><br><br><br><br>-- <br>Iñaki Baz Castillo<br><a href="mailto:ibc@in.ilimit.es">ibc@in.ilimit.es</a><br><br>_______________________________________________<br>Users mailing list<br>Users@lists.opensips.org<br>http://lists.opensips.org/cgi-bin/mailman/listinfo/users<br>_______________________________________________<br>Users mailing list<br>Users@lists.opensips.org<br>http://lists.opensips.org/cgi-bin/mailman/listinfo/users<br></div></blockquote></div><br></body></html>