[sr-dev] kamailio ims (dev) and fhoss/ unregister problems.

Jason Penton jason.penton at gmail.com
Tue Mar 19 18:52:28 CET 2013


okay the problem here has to do with your config file:

your config should rather look something like this:

route[register]
{
        if (!t_newtran()) {    #absorb retransmissions
                sl_reply("500","Could not create transaction");
                exit;
        }
        if (!ims_www_authenticate(NETWORKNAME)) {
                if ($? == -2) {
                        t_reply("403", "Authentication Failed");
                        exit;
                } else if ($? == -3) {
                        t_reply("400", "Bad Request");
                        exit;
                } else {
                        #user has not been authenticated. Lets send a
challenge via 401 Unauthorized
                        xlog("L_DBG","About to challenge! auth_ims\n");
                        ims_www_challenge("$td");
                        #this is async so to know status we have to check
the reply avp
                        xlog("L_DBG","maa_return code is
$avp(s:maa_return_code)\n");

                        switch ($avp(s:maa_return_code)){
                                case 1: #success
                                        xlog("L_DBG", "MAR success -
401/407 response sent from module");
                                        break;
                                case -1: #failure
                                        xlog("L_ERR", "MAR failure - error
response sent from module");
                                        break;
                                case -2: #error
                                        xlog("L_ERR", "MAR error - sending
error response now");
                                        t_reply("500", "MAR failed");
                                        break;
                                default:
                                        xlog("L_ERR", "Unknown return code
from MAR, value is [$avp(s:uaa_return_code)]");
                                        t_reply("500", "Unknown response
code from MAR");
                                        break;
                        }
                        exit;
                }
        }
        else {
               if (!impu_registered("location")) {
                        xlog("L_DBG","IMPU not registered\n");
                        save("location");
                        #this is async so to know status we have to check
the reply avp
                        xlog("L_DBG","saa_return code is
$avp(s:saa_return_code)\n");
                        switch ($avp(s:saa_return_code)){
                                case 1: #success
                                        xlog("L_DBG", "SAR success - 200
response sent from module");

isc_match_filter_reg("0","location");
                                        exit;
                                case -1: #failure
                                        xlog("L_ERR", "SAR failure - error
response sent from module");
                                        break;
                                case -2: #error
                                        xlog("L_ERR", "SAR error - error
response sent from module");
                                        break;
                                default:
                                        xlog("L_ERR", "Unknown return code
from SAR, value is [$avp(s:uaa_return_code)]");
                                        break;
                        }
                } else {
                        xlog("L_DBG","IMPU registered\n");
                        isc_match_filter_reg("1","location");
                        save("location");
                        #this is async so to know status we have to check
the reply avp
                        xlog("L_DBG","saa_return code is
$avp(s:saa_return_code)\n");
                        switch ($avp(s:saa_return_code)){
                                case 1: #success
                                        xlog("L_DBG", "SAR success - 200
response sent from module");
                                        exit;
                                case -1: #failure
                                        xlog("L_ERR", "SAR failure - error
response sent from module");
                                        break;
                                case -2: #error
                                        xlog("L_ERR", "SAR error - error
response sent from module");
                                        break;
                                default:
                                        xlog("L_ERR", "Unknown return code
from SAR, value is [$avp(s:uaa_return_code)]");
                                        break;
                        }
                }
        }
        break;
}




On Mon, Mar 18, 2013 at 5:01 PM, treyormsbee <trey85stang at gmail.com> wrote:

> Hello Jason,
>
> We would appreciate any help you can provide.  We are kind of stuck on this
> problem.
>
> Sorry for the nabble link:
>
>
> http://sip-router.1086192.n5.nabble.com/Problems-with-Mar-portion-of-registration-td116527.html
>
>
>
> --
> View this message in context:
> http://sip-router.1086192.n5.nabble.com/kamailio-ims-dev-and-fhoss-unregister-problems-tp116190p116532.html
> Sent from the Development mailing list archive at Nabble.com.
>
> _______________________________________________
> sr-dev mailing list
> sr-dev at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20130319/6a3b4229/attachment.htm>


More information about the sr-dev mailing list