<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt">Hello Ahmed!<br><br>Use rewritehost("") and send 302 reply to user, I am using permission module and redirecting to zz.zz.zz.zz. ip if authenticated by permission module.<br><br>if (check_source_address("1","$avp(i:9)")) {<br> xlog("L_INFO","GW sends INVITE and was found in DB: $avp(i:9)\n");<br> xlog("L_INFO","from user-> $ru\n");<br><br> rewritehost("zz.zz.zz.zz");<br> sl_send_reply("302", "Redirect");<br>
exit;<br> }<br><br><br>Thanks<br>Regards<br>Muhammad Zulqarnain<br><br><br><br>Re: [OpenSIPS-Users] How to send SIP header 302 registration request to Asterisk<br>Friday, December 18, 2009 2:22:26 PM<br>From:<br>"Ahmed Munir" <ahmedmunir007@gmail.com><br>To:<br>"" <users@lists.opensips.org><br>Hi,<br><br>Thanks for your reply, I'm attaching the file named trace. Where OpenSIPs IP is: yy.yy.yy.yy, Asterisk IP: zz.zz.zz.zz and my UAC IP: xx.xx.xx.xx.<br><br>As you can see I'm getting unauthourized error from Asterisk side, even using these credentials I can get registered on my Asterisk machine<br><br>Previously I forgot to ask, how can I set SIP header 302 on registeration section in OpenSIPs?<br><br>Kindly advise me.<br><br><br><br> <br><br> Date: Thu, 17 Dec 2009 22:40:15 -0800<br> From: Jai Rangi <jprangi@gmail.com><br> Subject: Re:
[OpenSIPS-Users] How to send SIP header 302 registration<br> request to Asterisk<br> To: OpenSIPS users mailling list <users@lists.opensips.org><br> Message-ID:<br> <eb007ec0912172240hc779cbflbf3460b835f1fef3@mail.gmail.com><br> Content-Type: text/plain; charset="iso-8859-1"<br><br> Getting some ngrep traces will help some other to help you. Unauthorized<br> message is for useraccount or for opensip.<br> -Jai<br><br><br> On Thu, Dec 17, 2009 at 10:25 PM, Ahmed Munir <ahmedmunir007@gmail.com>wrote:<br><br> > Hi,<br> ><br> > I'm using OpenSIPs version 1.6, the module I'm using is dispatcher using<br> > mysql. My
question is how can I send SIP header 302 registration request to<br> > Asterisk? Because Asterisk is sending me unAuthorized message to OpenSIPs.<br> > Even the credentials I'm using for Asterisk is the same as I'm using for<br> > OpenSIPs.<br> ><br> ><br> > Kindly advise me to resolve this issue.<br> ><br> > --<br> > Regards,<br> ><br> > Ahmed Munir<br> ><br> ><br> ><br> > _______________________________________________<br> > Users mailing list<br> > Users@lists.opensips.org<br><span> > <a target="_blank"
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a></span><br> ><br> ><br> -------------- next part --------------<br> An HTML attachment was scrubbed...<br><span> URL: <a target="_blank" href="http://lists.opensips.org/pipermail/users/attachments/20091217/2c123ff7/attachment-0001.htm">http://lists.opensips.org/pipermail/users/attachments/20091217/2c123ff7/attachment-0001.htm</a></span><br><br> ------------------------------<br><br><br><br>-- <br>Regards,<br><br>Ahmed Munir</div><br>
</body></html>