-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Julien Lamarche edited this page Mar 18, 2020
·
1 revision
Welcome to the sipp wiki!
Hnadling unexpectected messasge
Either here in call.cpp:
In sipp/src/call.cpp:
2987 /* If it is still not found, process an unexpected message */
2988 if(!found) {
2989 if (call_scenario->unexpected_jump >= 0) {
2990 bool recursive = false;
2991 if (call_scenario->retaddr >= 0) {
2992 if (M_callVariableTable->getVar(call_scenario->retaddr)->getDouble() != 0) {
2993 /* We are already in a jump! */
2994 recursive = true;
2995 } else {
2996 M_callVariableTable->getVar(call_scenario->retaddr)->setDouble(msg_index);
2997 }
2998 }
2999 if (!recursive) {
3000 if (call_scenario->pausedaddr >= 0) {
3001 M_callVariableTable->getVar(call_scenario->pausedaddr)->setDouble(paused_until);
3002 }
3003 msg_index = call_scenario->unexpected_jump;
3004 queue_up(msg);
3005 paused_until = 0;
3006 return run();
3007 } else {
3008 if (!process_unexpected(msg)) {
3009 return false; // Call aborted by unexpected message handling
3010 }
3011 }
3012 } else {
3013 T_AutoMode L_case;
3014 if ((L_case = checkAutomaticResponseMode(request)) == 0) {
3015 if (!process_unexpected(msg)) {
3016 return false; // Call aborted by unexpected message handling
3017 }
3018 } else {
3019 // call aborted by automatic response mode if needed
3020 return automaticResponseMode(L_case, msg);
3021 }
3022 }
3023 }
But where is it parsing in here sipp/src/scenario.cpp
871 if((cptr = xp_get_value("response"))) {
872 curmsg ->recv_response = get_long(cptr, "response code");
873 if (method_list) {
874 curmsg->recv_response_for_cseq_method_list = strdup(method_list);
875 }
876 if ((cptr = xp_get_value("response_txn"))) {
877 curmsg->response_txn = get_txn(cptr, "transaction response", false, false, false);
878 }
879 }
880