[SR-Users] TLS to UDP translation
赵国杰
zhaoguojie2010 at 163.com
Tue Jun 6 10:14:51 CEST 2017
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" <miconda at gmail.com> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170606/f9f6cdc6/attachment.html>
More information about the sr-users
mailing list