TLS to UDP translation

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

TLS to UDP translation

赵国杰
Hi everyone,
     I have a kamailio server with TLS enabled. I need to forword UAC request to a PSTN gateway which only support UDP. Is it possible that kamailio can translate this with proper configuration? How can i do this?

many thanks
Jesse


 


_______________________________________________
Kamailio (SER) - Users Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Reply | Threaded
Open this post in threaded view
|

Re: TLS to UDP translation

Daniel-Constantin Mierla-6

Hello,

if you set r-uri to a UDP address, then you can just use t_relay(), and everything needed should be done by kamailio. Be sure you do record_route()/loose_route(), so the requests within dialog are also routed properly.

Cheers,
Daniel


On 06.06.17 08:50, 赵国杰 wrote:
Hi everyone,
     I have a kamailio server with TLS enabled. I need to forword UAC request to a PSTN gateway which only support UDP. Is it possible that kamailio can translate this with proper configuration? How can i do this?

many thanks
Jesse


-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - www.kamailioworld.com

_______________________________________________
Kamailio (SER) - Users Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Reply | Threaded
Open this post in threaded view
|

Re: TLS to UDP translation

赵国杰
Hello Daniel,
     Thank you for the reply. I'm quite new to the sip world, and not sure how to change the config file. The pstn part of the config file is as follows:
   #!ifdef WITH_PSTN
        if (strempty($sel(cfg_get.pstn.gw_ip))) {
                xlog("SCRIPT: PSTN routing enabled but pstn.gw_ip not defined\n");
                return;
        }
        if(!($rU=~"^(\+|00)[1-9][0-9]{3,20}$")) return;

        if(from_uri!=myself && src_ip!=104.199.152.250) {
                sl_send_reply("403", "Not Allowed haha");
                exit;
        }

        if (strempty($sel(cfg_get.pstn.gw_port))) {
                $ru = "sip:" + $rU + "@" + $sel(cfg_get.pstn.gw_ip);
        } else {
                $ru = "sip:" + $rU + "@" + $sel(cfg_get.pstn.gw_ip) + ":"
                                        + $sel(cfg_get.pstn.gw_port);
        }

        route(RELAY);
        exit;
#!endif


Can you help me do the modification? Thank you.

Cheers,
Jesse

At 2017-06-06 15:36:22, "Daniel-Constantin Mierla" <[hidden email]> wrote:

Hello,

if you set r-uri to a UDP address, then you can just use t_relay(), and everything needed should be done by kamailio. Be sure you do record_route()/loose_route(), so the requests within dialog are also routed properly.

Cheers,
Daniel


On 06.06.17 08:50, 赵国杰 wrote:
Hi everyone,
     I have a kamailio server with TLS enabled. I need to forword UAC request to a PSTN gateway which only support UDP. Is it possible that kamailio can translate this with proper configuration? How can i do this?

many thanks
Jesse


-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - www.kamailioworld.com


 


_______________________________________________
Kamailio (SER) - Users Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Reply | Threaded
Open this post in threaded view
|

Re: TLS to UDP translation

赵国杰
In reply to this post by Daniel-Constantin Mierla-6

Hi Daniel,
      I solved the problem by add "transport=udp". Thanks anyway.

Cheers
Jesse

At 2017-06-06 15:36:22, "Daniel-Constantin Mierla" <[hidden email]> wrote:

Hello,

if you set r-uri to a UDP address, then you can just use t_relay(), and everything needed should be done by kamailio. Be sure you do record_route()/loose_route(), so the requests within dialog are also routed properly.

Cheers,
Daniel


On 06.06.17 08:50, 赵国杰 wrote:
Hi everyone,
     I have a kamailio server with TLS enabled. I need to forword UAC request to a PSTN gateway which only support UDP. Is it possible that kamailio can translate this with proper configuration? How can i do this?

many thanks
Jesse


-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - www.kamailioworld.com


 


_______________________________________________
Kamailio (SER) - Users Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Reply | Threaded
Open this post in threaded view
|

Re: TLS to UDP translation

Daniel-Constantin Mierla-6

Hello,

is the protocol scheme 'sips'? Because if the scheme is 'sip', the lack of transport parameter implies use of UDP.

Cheers,
Daniel


On 06.06.17 10:48, 赵国杰 wrote:

Hi Daniel,
      I solved the problem by add "transport=udp". Thanks anyway.

Cheers
Jesse

At 2017-06-06 15:36:22, "Daniel-Constantin Mierla" [hidden email] wrote:

Hello,

if you set r-uri to a UDP address, then you can just use t_relay(), and everything needed should be done by kamailio. Be sure you do record_route()/loose_route(), so the requests within dialog are also routed properly.

Cheers,
Daniel


On 06.06.17 08:50, 赵国杰 wrote:
Hi everyone,
     I have a kamailio server with TLS enabled. I need to forword UAC request to a PSTN gateway which only support UDP. Is it possible that kamailio can translate this with proper configuration? How can i do this?

many thanks
Jesse


-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - www.kamailioworld.com


 


-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - www.kamailioworld.com

_______________________________________________
Kamailio (SER) - Users Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Reply | Threaded
Open this post in threaded view
|

Re: TLS to UDP translation

赵国杰
Hello,
    the protocol scheme is sip.

Cheers
Jesse

At 2017-06-07 18:03:08, "Daniel-Constantin Mierla" <[hidden email]> wrote:

Hello,

is the protocol scheme 'sips'? Because if the scheme is 'sip', the lack of transport parameter implies use of UDP.

Cheers,
Daniel


On 06.06.17 10:48, 赵国杰 wrote:

Hi Daniel,
      I solved the problem by add "transport=udp". Thanks anyway.

Cheers
Jesse

At 2017-06-06 15:36:22, "Daniel-Constantin Mierla" [hidden email] wrote:

Hello,

if you set r-uri to a UDP address, then you can just use t_relay(), and everything needed should be done by kamailio. Be sure you do record_route()/loose_route(), so the requests within dialog are also routed properly.

Cheers,
Daniel


On 06.06.17 08:50, 赵国杰 wrote:
Hi everyone,
     I have a kamailio server with TLS enabled. I need to forword UAC request to a PSTN gateway which only support UDP. Is it possible that kamailio can translate this with proper configuration? How can i do this?

many thanks
Jesse


-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - www.kamailioworld.com


 


-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - www.kamailioworld.com


 


_______________________________________________
Kamailio (SER) - Users Mailing List
[hidden email]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users