[OpenSIPS-Users] OpenSER as reverse proxy / relay, external to internal
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Thu Oct 16 16:58:50 CEST 2008
Hi Adam,
you should do something like:
if (dst_ip==100.90.80.70) {
force_send_socket(udp:10.1.1.1:5060);
.....
<change uri, do routing>
.....
}
Regards,
Bogdan
Adam Goldberg wrote:
> Hi -- I have a machine running openser 1.3.1-notls ... the machine has
> two interfaces, one public (100.90.80.70) and one private (10.0.0.1)
> ... We have a SIP gateway on our internal network with IP 10.1.1.1.
> I'm trying to configure this so all calls to 100.90.80.70 are relayed
> to 10.1.1.1. My current config looks like this; but nothing is
> working ... help would be much appreciated.
>
> Thanks in advance,
> Adam
>
>
>
>
> # lower debug level for debugging purposes:
> debug=5
> log_stderror = yes
> fork=yes
> children=4
> check_via=no
> dns=no
> mpath="/usr/lib/openser/modules/"
>
> loadmodule "sl.so"
> loadmodule "textops.so"
> loadmodule "rr.so"
> loadmodule "tm.so"
> loadmodule "usrloc.so"
> loadmodule "nathelper.so"
> loadmodule "mediaproxy.so"
> loadmodule "domain.so"
>
> modparam("rr", "enable_full_lr", 1)
> modparam("rr", "enable_double_rr",0)
>
> route {
> if (msg:len >= 2048 ) {
> sl_send_reply("513", "Message too big");
> exit;
> };
>
> if (loose_route()) {
> append_hf("P-hint: rr-enforced\r\n");
> route(1);
> };
>
> if (!uri==myself) {
> append_hf("P-hint: outbound\r\n");
> route(1);
> };
>
> route(1);
> }
>
> route[1] {
> rewritehostport("10.1.1.1:5060");
> force_rtp_proxy();
> fix_nated_contact();
> if (!t_relay()) {
> sl_reply_error();
> };
> exit;
> }
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
More information about the Users
mailing list