Hi,

Any help on this please ...  

Thanks!!

My question:

 

When registering and send mar or sarcant step into route-blockREG_MAR_REPLY,PRE_REG_SAR,REGPLY,REG_SAR_REPLY, I understand that after suspending the transaction, the transaction cannot be repaired, resulting in the inability to enter the routing block.



Scscf_log:

 

5(41) DEBUG: ims_dialog [dlg_handlers.c:1923]: print_all_dlgs(): ******************** 5(41) DEBUG: ims_dialog [dlg_handlers.c:1924]: print_all_dlgs(): printing 4096 dialogs

 5(41) DEBUG: ims_dialog [dlg_handlers.c:1934]: print_all_dlgs(): ******************** 5(41) DEBUG: ims_auth [authorize.c:187]: reg_await_timer(): Looking for expired/useless at 508538

 5(41) DEBUG: ims_auth [authorize.c:232]: reg_await_timer(): [DONE] Looking for expired/useless at 508538

28(64) DEBUG: cdp [peermanager.c:262]: peer_timer(): peer_timer(): taking care of peers...

 2(38) DEBUG: tm [t_lookup.c:1034]: t_check_msg(): msg (0x7f81ff9400c8) id=1/38 global id=0/0 T start=0xffffffffffffffff

 2(38) DEBUG: tm [t_lookup.c:497]: t_lookup_request(): start searching: hash=64055, isACK=0

 2(38) DEBUG: tm [t_lookup.c:455]: matching_3261(): RFC3261 transaction matching failed - via branch [z9hG4bK73af.fb775f8fd058c2be4eb837bdc9d069df.1]

 2(38) DEBUG: tm [t_lookup.c:675]: t_lookup_request(): no transaction found

 2(38) DEBUG: tm [t_lookup.c:1104]: t_check_msg(): msg (0x7f81ff9400c8) id=1/38 global id=1/38 T end=(nil)

 2(38) ERROR: <script>: ALGORITHM IS [<null>] and User-Agent is [IM-client/OMA1.0 android-ngn-stack/v2.544.836 (doubango r836 - MuMu)]

 2(38) DEBUG: ims_auth [authorize.c:768]: authenticate(): Running authenticate, is_proxy_auth=0

 2(38) DEBUG: ims_auth [authorize.c:788]: authenticate(): Checking if REGISTER is authorized for realm [ims.mnc003.mcc460.3gppnetwork.org]...

 2(38) DEBUG: ims_auth [authorize.c:826]: authenticate(): Nonce or response missing: nonce len [1908363328], response16 len[-8250504]

 2(38) ERROR: <script>: AUTH_UNSUCESSED

 2(38) DEBUG: ims_auth [authorize.c:293]: challenge(): Looking for route block [REG_MAR_REPLY]

 2(38) INFO: ims_auth [cxdx_mar.c:79]: create_return_code(): created AVP successfully : [maa_return_code] - [-2]

 2(38) DEBUG: ims_auth [authorize.c:317]: challenge(): Need to challenge for realm [ims.mnc003.mcc460.3gppnetwork.org]

 2(38) DEBUG: ims_auth [authorize.c:324]: challenge(): Checking if REGISTER is authorized for realm [ims.mnc003.mcc460.3gppnetwork.org]...

 2(38) DEBUG: ims_auth [authorize.c:1488]: get_auth_userdata(): Searching auth_userdata for IMPU sip:460036250000007@ims.mnc003.mcc460.3gppnetwork.org (Hash 372)

 2(38) DEBUG: tm [t_lookup.c:1328]: t_newtran(): msg (0x7f81ff9400c8) id=1/38 global id=1/38 T start=(nil)

 2(38) DEBUG: tm [t_lookup.c:497]: t_lookup_request(): start searching: hash=64055, isACK=0

 2(38) DEBUG: tm [t_lookup.c:455]: matching_3261(): RFC3261 transaction matching failed - via branch [z9hG4bK73af.fb775f8fd058c2be4eb837bdc9d069df.1]

 2(38) DEBUG: tm [t_lookup.c:675]: t_lookup_request(): no transaction found

 2(38) DEBUG: tm [t_hooks.c:346]: run_reqin_callbacks_internal(): trans=0x7f81f14444c8, callback type 1, id 0 entered

 2(38) DEBUG: ims_auth [authorize.c:480]: challenge(): Suspending SIP TM transaction

 2(38) DEBUG: ims_auth [authorize.c:1568]: multimedia_auth_request(): Sending MAR

 2(38) DEBUG: cdp [session.c:284]: cdp_add_session(): adding a session with id scscf.ims.mnc001.mcc001.3gppnetwork.org;2422551417;1

 2(38) DEBUG: cdp [peerstatemachine.c:89]: sm_process(): sm_process(): Peer udm219ims.huawei.com State I_Open Event Send_Message

 2(38) DEBUG: cdp [peerstatemachine.c:1156]: Snd_Message(): Snd_Message called to peer [udm219ims.huawei.com] for request with code 303

 2(38) DEBUG: cdp [session.c:305]: cdp_get_session(): called get session with id scscf.ims.mnc001.mcc001.3gppnetwork.org;2422551417;1 and hash 66

 2(38) DEBUG: cdp [session.c:314]: cdp_get_session(): no session found

 2(38) DEBUG: cdp [diameter_msg.c:82]: AAABuildMsgBuffer(): AAABuildMsgBuffer(): len=500

 2(38) DEBUG: cdp [receiver.c:1015]: peer_send_msg(): peer_send_msg(): Pipe push [0x7f81f1443bd8]

 2(38) DEBUG: ims_auth [cxdx_mar.c:565]: cxdx_send_mar(): Successfully sent async diameter

26(62) DEBUG: cdp [receiver.c:756]: receive_loop(): select_recv(): There is something on the send pipe

26(62) DEBUG: cdp [receiver.c:769]: receive_loop(): select_recv(): Send pipe says [0x7f81f1443bd8] 8

26(62) DEBUG: cdp [diameter_msg.c:411]: AAAFreeMessage(): AAAFreeMessage: Freeing message (0x7f81f1443bd8) 303

26(62) DEBUG: cdp [receiver.c:575]: do_receive(): receive_loop(): [udm219ims.huawei.com] Recv Version 1 Length 224

26(62) DEBUG: cdp [receiver.c:1106]: receive_message(): receive_message(): [udm219ims.huawei.com] Recv msg 303

26(62) DEBUG: cdp [peerstatemachine.c:89]: sm_process(): sm_process(): Peer udm219ims.huawei.com State I_Open Event I_Rcv_Message

26(62) DEBUG: cdp [session.c:305]: cdp_get_session(): called get session with id scscf.ims.mnc001.mcc001.3gppnetwork.org;2422551417;1 and hash 66

26(62) DEBUG: cdp [session.c:314]: cdp_get_session(): no session found

14(50) DEBUG: cdp [worker.c:343]: worker_process(): worker_process(): [5] got task Q(1/1)

14(50) DEBUG: tm [t_lookup.c:1612]: t_lookup_ident_filter(): transaction found

14(50) INFO: ims_auth [cxdx_avp.c:137]: cxdx_get_avp(): cxdx_get_result_code: Failed finding avp (avp_code = 268, vendor_id = 0)

14(50) INFO: ims_auth [cxdx_avp.c:137]: cxdx_get_avp(): cxdx_get_sip_number_auth_items: Failed finding avp (avp_code = 607, vendor_id = 10415)

14(50) DEBUG: tm [t_reply.c:1765]: cleanup_uac_timers(): RETR/FR timers reset

14(50) DEBUG: tm [t_reply.c:637]: _reply_light(): reply sent out - buf=0x7f81ff8fa1c0: SIP/2.0 403 Forbidde... shmem=0x7f81f1448218: SIP/2.0 403 Forbidde

14(50) DEBUG: tm [t_reply.c:648]: _reply_light(): finished

14(50) DEBUG: cdp [diameter_msg.c:411]: AAAFreeMessage(): AAAFreeMessage: Freeing message (0x7f81f1443b50) 303

14(50) DEBUG: ims_auth [cxdx_mar.c:480]: async_cdp_callback(): DBG:UAR Async CDP callback: ... Done resuming transaction

14(50) INFO: ims_auth [cxdx_mar.c:79]: create_return_code(): created AVP successfully : [maa_return_code] - [-1]

14(50) DEBUG: tm [t_lookup.c:1604]: t_lookup_ident_filter(): transaction in terminated phase - skipping

14(50) WARNING: tm [t_suspend.c:192]: t_continue_helper(): active transaction not found

14(50) DEBUG: ims_auth [cxdx_mar.c:87]: free_saved_transaction_data(): Freeing saved transaction data: async

 5(41) DEBUG: ims_usrloc_scscf [ims_usrloc_scscf_mod.c:481]: timer(): Syncing cache

 

 

 

 

Kamailio_scscf.cfg

 

#!ifdef WITH_AUTH

        if (!ims_www_authenticate("$td")) {

                xlog("L_ERR","AUTH_UNSUCESSED\n");

#!else

        if (($var(alg) == "MD5") && (!ims_www_authenticate("$td"))) {

#!endif      

                if ($? == -2) {

                        send_reply("403", "Authentication Failed");

                        exit;

                } else if ($? == -3) {

                        send_reply("400", "Bad Request");

                        exit;

                } else if ($? == -9) {

                        xlog("L_DBG", "Authentication re-sync requested\n");

                        ims_www_resync_auth("REG_RESYNC_REPLY", "$td");

                        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("REG_MAR_REPLY", "$td", "$var(alg)");

                        exit;

                }

        } else {

                xlog("L_ERR", "Auth succeeded\n");

                # We need to check if this user is registered or not

                if (!impu_registered("location")) {

                        xlog("L_ERR", "Not REGISTERED\n");

                        save("PRE_REG_SAR_REPLY","location");

                        exit;

                } else {

                        isc_match_filter_reg("1","location");

                        save("REG_SAR_REPLY","location");


                        exit;

                }

        }

}


route[REG_MAR_REPLY]

{

     xlog("L_ERR","fuck-1111111\n");

     #this is async so to know status we have to check the reply avp

     xlog("L_ERR","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\n");

"scscf/kamailio_scscf/kamailio_scscf.cfg" 1496L, 45179C