<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi, making progress<br><br>we now have this so the REGISTER is passed to the Sipgate proxy transparently it could be any proxy server so <br><br> if (is_method("REGISTER"))<br> {<br> <br> ##$du = "sip:sipgate.co.uk:5060";<br> t_relay();<br> exit();<br> }<br><br>We can see via Wireshark trace that REGISTER is reaching the sipgate proxy but OpenSIPS is returning a 403 to our Asterisk (acting as the SIP client)<br><br>its because of this code, so then upon receiving the 403 from Opensips it doesn't respond to the 401 from the sipgate proxy. What should we be doing below<br><br>if
(!is_uri_host_local())<br> {<br> if(is_from_local()) {<br> route(1);<br> }<br> else {<br> sl_send_reply("403","Not here");<br> }<br><br> ##append_hf("P-hint:
outbound\r\n");<br> # if you have some interdomain connections via TLS<br> ##if($rd=="tls_domain1.net") {<br> ## t_relay("tls:domain1.net");<br> ## exit;<br> ##} else if($rd=="tls_domain2.net") {<br> ## t_relay("tls:domain2.net");<br>
## exit;<br> ##}<br> ##route(1);<br> }<br><br>Thanks<br><br>--- On <b>Sat, 24/7/10, Nauman Sulaiman <i><nauman762-home@yahoo.co.uk></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Nauman Sulaiman <nauman762-home@yahoo.co.uk><br>Subject: Re: [OpenSIPS-Users] Opensips as outbound proxy for asterisk client<br>To: "OpenSIPS users mailling list" <users@lists.opensips.org>, "Laszlo" <laszlo@voipfreak.net><br>Date: Saturday, 24 July, 2010, 19:48<br><br><div id="yiv363631247"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit;
font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit; -x-system-font: none;" valign="top">Hi, many thanks<br><br> we don't follow this line<br><br>$du = "sip:sipgate_ip_goes_here:port"<br><br>where do we get the sipgate ip, should this just be<br><br>$du = "sip:sipgate.co.uk:5060"<br><br>at least it explains why we saw the REGISTER being gobbled<br><br><br>--- On <b>Sat, 24/7/10, Laszlo <i><laszlo@voipfreak.net></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Laszlo <laszlo@voipfreak.net><br>Subject: Re: [OpenSIPS-Users] Opensips as outbound proxy for asterisk client<br>To: nauman762-home@yahoo.co.uk, "OpenSIPS users mailling list" <users@lists.opensips.org><br>Date: Saturday, 24 July, 2010, 19:28<br><br><div id="yiv373057038">You can relay the register to sipgate, so when auth is done, then you
can forward it.<br><br>consume_credentials();<br>$du =
"sip:sipgate_ip_goes_here:port";<br>t_relay();<br>exit;<br><br>so instead of doing if (!save("location")) etc<br>
<br><br>-Laszlo<br><br><br><div class="gmail_quote">2010/7/24 Nauman Sulaiman <span dir="ltr"><<a rel="nofollow">nauman762-home@yahoo.co.uk</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit;" valign="top">Hi, We have Asterisk 1.6.2.9 and Opensips 1.6.2 in the same Linux box and we want <br>to have OpenSIPS as the out/inbound proxy for Asterisk when running as UAC. <br>
<br>We have Asterisk registered with Sipgate ok when sending REGISTER directly to the Sipgate<br>domain but would like to send the Register via OpenSIPS so it's in the path for incoming invites<br><br>Opensips.cfg as follows<br>
<br>listen=udp:<a rel="nofollow" target="_blank" href="http://192.168.0.20:5060">192.168.0.20:5060</a><br><br>register code: we have removed the authentication for now to get this working first<br><br> if (is_method("REGISTER"))<br>
{<br><br> if (!db_check_to())<br> {<br>
sl_send_reply("403","Forbidden auth ID");<br> exit;<br> }<br><br> if (!save("location"))<br> sl_reply_error();<br><br> exit;<br>
}<br><br><br><br><br>we have astersik sip.conf file as follows<br><br>[general]<br>port=5062<br>bindaddr=0.0.0.0<br>context=default<br>outboundproxy=192.168.0.20<br>outboundproxyport=5060<br><br>register =>
<a rel="nofollow" target="_blank" href="http://username:secret@sipgate.co.uk/username">username:secret@sipgate.co.uk/username</a><br><br>[username]<br>type=friend<br>context=incoming<br>username=username<br>secret=secret<br>host=<a rel="nofollow" target="_blank" href="http://sipgate.co.uk">sipgate.co.uk</a><br>
host=dynamic<br>fromdomain=<a rel="nofollow" target="_blank" href="http://sipgate.co.uk">sipgate.co.uk</a><br>insecure=port,invite<br>nat=yes<br>disallow=all<br>allow=alaw<br>canreinvite=no<br><br>However the REGISTER messages are sent by Astersik but ther is no response fron OpenSIPS and it is not routing them either . Is it because they are both on the same IP?<br>
We do have then on different ports so though it would be ok<br><br></td></tr></tbody></table><br>
<br>_______________________________________________<br>
Users mailing list<br>
<a rel="nofollow">Users@lists.opensips.org</a><br>
<a rel="nofollow" target="_blank" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br><div style="visibility: hidden; display: inline;" id="avg_ls_inline_popup"></div><style type="text/css">#yiv363631247 #yiv373057038 #avg_ls_inline_popup {padding:0px 0px;margin-left:0px;margin-top:0px;width:240px;overflow:hidden;word-wrap:break-word;color:black;font-size:10px;text-align:left;line-height:13px;}</style>
</div></blockquote></td></tr></tbody></table><br>
</div><br>-----Inline Attachment Follows-----<br><br><div class="plainMail">_______________________________________________<br>Users mailing list<br><a ymailto="mailto:Users@lists.opensips.org" href="/mc/compose?to=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></div></blockquote></td></tr></table><br>