Hi, Pete!

I did not test this, but I think you can catch the 477 by checking the returned code of the t_relay() exit code. If it fails, simply call the use_next_gw() function.

Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 01/04/2016 12:43 PM, Pete Kelly wrote:
Hi Razvan

Happy New Year!

Yes your answer is clear, thank you. I will do some experimentation but I think I may run into some issues. I am talking to some Cisco equipment which does not like the ;transport= suffix in the request URI so the socket specification is really a preferred option.

In my case too I also want to be able to detect an internal 477 (for example if t_relay with TCP should fail and the TCP can be changed to UDP). I guess I could still catch the t_relay failure and just call use_next_gw() in dispatcher.

Pete

On 23 December 2015 at 13:43, Răzvan Crainea <[email protected] <mailto:[email protected]>> wrote:

    Hi, Pete!

    The best way to do it is choice number 1, where you specify the
    transport=tls parameter in the URI. The socket field is used to
    specify which listener OpenSIPS should use to send the request to
    that destination. It has a similar meaning with
    force_send_socket() (iirc, internally it is implemented in the
    same way).
    Therefore with choice number 2, it is not guaranteed to work. In
    most cases it will, but if you force a different transport for
    your destination (for example you have a TCP destination) and use
    a TLS socket, it might not work (haven't tested that).

    I hope my answer is clear.

    Best regards,

    Răzvan Crainea
    OpenSIPS Solutions
    www.opensips-solutions.com <http://www.opensips-solutions.com>

    On 12/22/2015 04:52 PM, Pete Kelly wrote:
    Hi all!

    Is there an "approved" way to send to a TLS destination using the
    dispatcher module?

    I notice there could be 2 ways to specify TLS within the
    tables/configuration:

    1) By using the destination field (by suffixing with ;transport=tls)
    2) By using the socket field (by specifying the local tls: socket).

    Is only one (or both) of these normally required?


    _______________________________________________
    Users mailing list
    [email protected] <mailto:[email protected]>
    http://lists.opensips.org/cgi-bin/mailman/listinfo/users


    _______________________________________________
    Users mailing list
    [email protected] <mailto:[email protected]>
    http://lists.opensips.org/cgi-bin/mailman/listinfo/users




_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to