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

Re: [reSIProcate-users] Forcing an Outbound Transport-Type


Hi Scott,

thanks for the quick reply.

Stepping through the code (resiprocate version 1.7.1) I found the problem in findTransportByVia(), but the respective code has not changed in trunk.

The problem is findTransportByVia() sets the transport type in the source tuple, to the transport type found in the target. I think if a Via is present with the transport set, this should be used.

I will try to provide a patch.

Best regards,
 Gabriel

Am 08.05.2012 23:32, schrieb Scott Godin:
Hi Gabriel,

Looking through the code in SVN head/trunk, I can't see anything
obviously wrong with what you are trying (there may have been bugs in
older releases).  Are you able to trace through findTransportByVia and
see why it is failing to select your TCP transport?  Examining Debug
level logs should also help to understand why as well.

Scott

On Tue, May 8, 2012 at 4:56 PM, Gabriel Hege
<gabriel-mailinglists@xxxxxx <mailto:gabriel-mailinglists@xxxxxx>> wrote:

    Hi,

    What is the proper way to force a transport type (e.g. TCP) for an
    outgoing request - or even better for all request from a certain
    UserProfile?

    The comments in Profile.hxx suggest that somebody thought about
    using setOverrideHostAndPort() to also populate the Via entries, but
    it is not implemented.

    I tried setting the transport for the first Via of a request like this:

      invite_msg = mp_dum->makeInviteSession( m_to_addr, m_profile,
    &m_sdp, new MyAppDialogSet(*mp_dum) );
      invite_msg->header(h_Vias).__front().transport() = "TCP";
      mp_dum->send(invite_msg);



    but the message is still sent over the wire as UDP, although it
    contains the following header:

      Via: SIP/2.0/TCP
    
141.22.27.150:5060;branch=__z9hG4bK-d8754z-__bf3a78252072422c-1---d8754z-;__rport



    findTransportByVia() and findTransportBySource() are actually called
    in the TransportSelector, since I do have
    setFixedTransportInterface() set for the used profile.

    Can anybody give me some advice please?

    Thank you,
      gabriel

    _________________________________________________
    resiprocate-users mailing list
    resiprocate-users@resiprocate.__org
    <mailto:resiprocate-users@xxxxxxxxxxxxxxx>
    List Archive:
    http://list.resiprocate.org/__archive/resiprocate-users/
    <http://list.resiprocate.org/archive/resiprocate-users/>