[OpenSIPS-Users] How to send SIP header 302 registration request to Asterisk

Muhammad Zulqarnain mzulqarnain2002 at yahoo.com
Fri Dec 18 16:41:14 CET 2009


Hello Ahmed!

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.

if (check_source_address("1","$avp(i:9)")) {
        xlog("L_INFO","GW sends INVITE and was found in DB: $avp(i:9)\n");
        xlog("L_INFO","from user-> $ru\n");

                rewritehost("zz.zz.zz.zz");
                sl_send_reply("302", "Redirect");
                exit;
        }


Thanks
Regards
Muhammad Zulqarnain



Re: [OpenSIPS-Users] How to send SIP header 302 registration request to Asterisk
Friday, December 18, 2009 2:22:26 PM
From:
"Ahmed Munir" <ahmedmunir007 at gmail.com>
To:
"" <users at lists.opensips.org>
Hi,

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.

As you can see I'm getting unauthourized error from Asterisk side, even using these credentials I can get registered on my Asterisk machine

Previously I forgot to ask, how can I set SIP header 302 on registeration section in OpenSIPs?

Kindly advise me.



 

    Date: Thu, 17 Dec 2009 22:40:15 -0800
    From: Jai Rangi <jprangi at gmail.com>
    Subject: Re: [OpenSIPS-Users] How to send SIP header 302 registration
           request to Asterisk
    To: OpenSIPS users mailling list <users at lists.opensips.org>
    Message-ID:
           <eb007ec0912172240hc779cbflbf3460b835f1fef3 at mail.gmail.com>
    Content-Type: text/plain; charset="iso-8859-1"

    Getting some ngrep traces will help some other to help you. Unauthorized
    message is for useraccount or for opensip.
    -Jai


    On Thu, Dec 17, 2009 at 10:25 PM, Ahmed Munir <ahmedmunir007 at gmail.com>wrote:

    > Hi,
    >
    > I'm using OpenSIPs version 1.6, the module I'm using is dispatcher using
    > mysql. My question is how can I send SIP header 302 registration request to
    > Asterisk? Because Asterisk is sending me unAuthorized message to OpenSIPs.
    > Even the credentials I'm using for Asterisk is the same as I'm using for
    > OpenSIPs.
    >
    >
    > Kindly advise me to resolve this issue.
    >
    > --
    > Regards,
    >
    > Ahmed Munir
    >
    >
    >
    > _______________________________________________
    > Users mailing list
    > Users at lists.opensips.org
    > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
    >
    >
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.opensips.org/pipermail/users/attachments/20091217/2c123ff7/attachment-0001.htm

    ------------------------------



-- 
Regards,

Ahmed Munir


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20091218/d25a69dc/attachment-0001.htm 


More information about the Users mailing list