Skip to content
LibSip_Steps.ttcn 208 KiB
Newer Older
                        else {
                            log("*** " &__SCOPE__& ": INFO: No scheme in Proxy Authenticate header!!! ***");
                            setverdict(inconc);
                            stop;
                        }

                        vc_branch := c_branchCookie & f_getRndTag();
                        vc_via := {
                            fieldName := VIA_E,
                            viaBody := {valueof(m_ViaBody_currIpaddr(vc_branch, vc_userprofile))}
                        };

                        v_Request.msgHeader.via := vc_via;
                        // Increment CSeq sequence number of and add the credentials
                        // to the original saved INVITE message.
                        vc_cSeq.method := vc_requestFor407.msgHeader.cSeq.method;
                        vc_cSeq.seqNumber := vc_cSeq.seqNumber + 1;
                        v_Request.msgHeader.cSeq.seqNumber := vc_cSeq.seqNumber;
                        v_Request.msgHeader.proxyAuthorization.fieldName := PROXY_AUTHORIZATION_E;
                        v_Request.msgHeader.proxyAuthorization.credentials := {v_Credentials};

                        // Re-send the saved INVITE with Authorization header
                        // included.
                        SIPP.send(v_Request) to vc_sent_label;
                    }
                }
            }
        }

    } // end of group DefaultsTestStep
} // end module LibSip_Steps