[OpenSIPS-Users] Simple Forwarding Proxy

Robert robert at inteli-core.com
Wed Mar 7 20:55:18 CET 2012


I am trying to install OpenSIPS as a simple SIP proxy to allow users to
register on an offset port ­ which then gets re-directed to our VoIP
platform.

As far as registrations go ­ I have that working.

I have added a binding for port 53 and port 8080
I also added rewritehostport statements in the config as per guides for
Asterisk integration.

And I can complete calls outbound and get 2 way audio.
The issue I am experiencing is that I cannot get inbound calls to come
through.

I'm not sure if this a NAT issue with the UA ­ or if possibly I have not
added enough headers in the config to allow the VoIP platform to know that
the UA is behind NAT.

I'm a n00b at OpenSIPS ­ so please bare with me :)

        # account only INVITEs
        if (is_method("INVITE")) {
                setflag(1); # do accounting
                rewritehostport("xx.xx.xx.xx:5060");
        }

        if (is_method("REGISTER"))
        {
                # authenticate the REGISTER requests (uncomment to enable
auth)
                ##if (!www_authorize("", "subscriber"))
                ##{
                ##      www_challenge("", "0");
                ##      exit;
                ##}
                ##
                ##if (!db_check_to())
                ##{
                ##      sl_send_reply("403","Forbidden auth ID");
                ##      exit;
                ##}
                save("location");
                #rewritehostport("xx.xx.xx.xx:5060");
                rewritehostport("xx.xx.xx.xx:5060");
                route(1);

                if (!save("location"))
                        sl_reply_error();

                exit;
        }

route[1] {
        # for INVITEs enable some additional helper routes
        if (is_method("INVITE")) {
                rewritehostport("xx.xx.xx.xx:5060");
                t_on_branch("2");
                t_on_reply("2");
                t_on_failure("1");
        }

        if (!t_relay()) {
                sl_reply_error();
        };
        exit;
}



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20120307/2519b1b8/attachment.htm>


More information about the Users mailing list