Hi Sasmita,

Going back to your original idea, with sethostport(). What you need to do is :

1) strip any potential `transport` param from RURI (as it may force TLS)
    ruri_del_param("transport");

2) set as outbound socket an UDP one
    $socket_out = "udp:192.168.0.69:5060";

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
  https://www.siphub.com

On 29.07.2024 12:50, Sasmita Panda wrote:
Any suggestions on this ?



*/Thanks & Regards/*
/Sasmita Panda/
/Senior Network Testing and Software Engineer/
/3CLogic , ph:07827611765/


On Fri, Jul 26, 2024 at 4:55 PM Sasmita Panda <[email protected]> wrote:

    Hi , Thanks for the reply .
    Rather than configuration change , I have done through dynamic
    routing .

     In the dr_gateway table I have added socket information
    *udp:x.x.x.x:5060*
    mysql> select * from dr_gateways;
    
+----+------+------+---------------------------------------+-------+------------+-------+------------+-------+-----------------------+-------------+
    | id | gwid | type | address | strip | pri_prefix | attrs |
    probe_mode | state | socket                | description |
    
+----+------+------+---------------------------------------+-------+------------+-------+------------+-------+-----------------------+-------------+
    |  1 | gw4  |    3 | fs.3c.com:6080 <http://fs.3c.com:6080> |    
    0 | NULL       | NULL  |          0 |     0 |
    udp:192.168.0.69:5060 <http://192.168.0.69:5060> | NULL    |
    
+----+------+------+---------------------------------------+-------+------------+-------+------------+-------+-----------------------+-------------+

    I only have a single Invite on a single session on this leg .
    There is no Re-Invite at all  . Will I need to set
    record_route_preset on this case as well ?

    */Thanks & Regards/*
    /Sasmita Panda/
    /Senior Network Testing and Software Engineer/
    /3CLogic , ph:07827611765/


    On Wed, Jul 24, 2024 at 7:06 PM Ben Newlin
    <[email protected]> wrote:

        Sasmita,

        You need to be using $socket_out. [1]

        By default, OpenSIPS will use the receiving socket as the
        sending socket. This means if you receive the message on TLS
        and do not change $socket_out then the message will be sent
        out the TLS socket.

        Additionally, unless you are using B2BUA or maybe
        topology_hiding you will likely need to “remember” this
        protocol transition by adding a double Record-Route [2] to the
        message. You may also need to change any “transport” params
        that exist in the Request-URI and possibly the Contact header.

        [1]
        https://www.opensips.org/Documentation/Script-CoreVar-3-2#toc86

        [2] https://opensips.org/docs/modules/3.2.x/rr.html

        Ben Newlin

        *From: *Users <[email protected]> on behalf of
        Sasmita Panda <[email protected]>
        *Date: *Wednesday, July 24, 2024 at 1:54 AM
        *To: *OpenSIPS users mailling list <[email protected]>
        *Subject: *[OpenSIPS-Users] I need some info while setiing
        sethostport on opensips config .

        * EXTERNAL EMAIL - Please use caution with links and attachments *

        ------------------------------------------------------------------------

        Hi All ,

        I am using openisp version : 3.2

        I have an opensips config on which I was listening on UDP port
        only and hence using sethostport to route calls to a
        particular destination . like below .

        if(is_from_gw() || ($rp=~"5505"))
                           {
                          sethostport("freeswitch-test.xyz.com:6080
        <http://freeswitch-test.xyz.com:6080>");
                           route(inbound);
                            exit;
                           }

        Now I have to accept a call on TLS and send that to some other
        destination on UDP . I have enabled the tls module and also
        the dependent modules like tls_openssl, tls_mgm .

        socket=udp:192.168.0.y:5060
        socket=tls:192.168.0.y:5061
        socket=tcp:192.168.0.y:5060

        if(is_from_gw() || ($rp=~"5505"))
                           {
                          sethostport("freeswitch-test.xyz.com:6080
        <http://freeswitch-test.xyz.com:6080>");
                           route(inbound);
                            exit;
                           }

        This above configuration is not working . I am getting "477
        Send Failed "

        */Thanks & Regards/*

        /Sasmita Panda/

        /Senior Network Testing and Software Engineer/

        /3CLogic , ph:07827611765/

        _______________________________________________
        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
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to