< Previous by Date Date Index Next by Date >
  Thread Index Next in Thread >

[reSIProcate-users] Problem resending a received message


Hello,

I have a problem making a proxy. When receiving a message I want to send
it to another node, but it never reaches the net. I can construct an
identical message and it is sended correctly. I have tried to change the
"isExternal" value to the received message, so the stack can treat it as
a received from tu message.

Here the code, inmediatly received message:


    if (received.exists(h_Routes))
        received.header(h_Routes).pop_front();

    received.setFromTU();

    NameAddr target("sip:DESTINO@xxxxxxxxxxxx:5080;transport=udp");
    NameAddr from("sip:ORIGEN@xxxxxxxxxxxxxxxxxx;transport=udp");
    NameAddr contact("sip:192.168.1.14");
    NameAddr scscf("sip:david.tarifa:5080;transport=udp");

    //Create INVITE

    //auto_ptr<SipMessage> request(Helper::makeInvite(target, from,
contact));
    SipMessage* request = new SipMessage;
    MethodTypes method(INVITE);
    RequestLine rLine(method);
    rLine.uri() = target.uri();
    request->header(h_To) = target;
    request->header(h_RequestLine) = rLine;
    request->header(h_MaxForwards).value() = 70;
    request->header(h_CSeq).method() = method;
    request->header(h_CSeq).sequence() = 1;
    request->header(h_From) = from;
    request->header(h_From).param(p_tag) =
Helper::computeTag(Helper::tagSize);
    request->header(h_Contacts).push_back(contact);
    request->header(h_CallId).value() =
received.header(h_CallId).value();   //Helper::computeCallId();
    request->header(h_Vias).push_back(via);
    request->header(h_Routes).push_back(target);



if (received.isRequest() && (received.method() == INVITE)) {
    cout << "message to be sent" << endl;
    cout << received << endl;
    //cout << *request << endl;


    mStack.send(received);
    //mStack.send(*request);
}



I switch between sending received and request, only request works.
Printing them shows the same.

Thanks in advance

      David