<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:10pt"><div><span>HI Michael,</span></div><div><br><span></span></div><div><span>I would say you can get each sip messages (REGISTER,INVITE,ACK,BYE) routed to your asterisk server using rewritehostport("<your_ip>:5060");</span></div><div><br></div><div>you can configure proxy as your opensips in sip clients with port 5260.</div><div><br></div><div><br><span></span></div><div><span>if(is_method("REGISTER")){<br> </span><span>rewritehostport("<your_ip>:5060"); # This will forward any register packet to your asterisk. <br></span></div><div> route(1); # <-- this route actually send the sip packet to
asterisk<br><span>}</span></div><div><br><span></span></div><div><br></div><div>route[1] {<br><span></span></div><div><span> if (!t_relay()) {<br> xlog("L_INFO", "(Rewriting) t_relay 1 - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");<br> sl_reply_error();<br> }<br> t_on_reply("1");<br> t_on_failure("1"); <br>}<br></span></div><div><br><span></span></div><div><br><span></span></div><div><span>Just as above you can route other sip messages as well to your asterisk box.</span></div><div><span></span></div><div><br></div><div style="font-family: times new roman,new
york,times,serif; font-size: 10pt;"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font face="Arial" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Michael <voip.question@gmail.com><br><b><span style="font-weight: bold;">To:</span></b> OpenSIPS users mailling list <users@lists.opensips.org><br><b><span style="font-weight: bold;">Sent:</span></b> Thursday, July 21, 2011 2:56 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [OpenSIPS-Users] Using OpenSIPS as Proxy to Asterisk<br></font><br><div id="yiv1051531427"><div dir="ltr"><div class="yiv1051531427gmail_quote">On Thu, Jul 21, 2011 at 12:20 PM, Gareth Blades <span dir="ltr"><<a rel="nofollow" ymailto="mailto:list-asterisk@skycomuk.com" target="_blank" href="mailto:list-asterisk@skycomuk.com">list-asterisk@skycomuk.com</a>></span> wrote:<br><blockquote class="yiv1051531427gmail_quote" style="margin: 0pt
0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<u></u>
<div><div><div></div>The only documentation I know of is<br></div>
<a rel="nofollow" target="_blank" href="http://www.opensips.org/Resources/DocsTutAsterisk">http://www.opensips.org/Resources/DocsTutAsterisk</a><br></div></blockquote><div><br>In this tutorial, the extensions register to OpenSIPS, while we would like to use it only as a Proxy and not as a Registrar, so that a few of the extensions would be able to register to Asterisk and make/receive calls to/from it, going through OpenSIPS, as a simple relay only. I assume it should be possible.<br>
</div></div></div>
</div><br>_______________________________________________<br>Users mailing list<br><a ymailto="mailto:Users@lists.opensips.org" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br><br><br></div></div></div></body></html>