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" <[email protected]>
To:
"" <[email protected]>
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 <[email protected]>
    Subject: Re: [OpenSIPS-Users] How to send SIP header 302 registration
           request to Asterisk
    To: OpenSIPS users mailling list <[email protected]>
    Message-ID:
           <[email protected]>
    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 
<[email protected]>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
    > [email protected]
    > 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


      
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to