[SR-Users] Need help with route statement
Klaus Darilion
klaus.mailinglists at pernau.at
Mon May 24 21:31:06 CEST 2010
Hi!
Please post the complete SIP trace of the scenario which does not work,
this means:
incoming INVITE, outgoing INVITE, incoming response, outgoing response
also you can increase loglevel (debug=3 for kamailio 3.0, debug=4 for
kamailio 1.5) and watch syslog.
regards
klaus
On 21.05.2010 16:37, Nelson Pereira wrote:
> I did the following changed by adding the get_redirects function (see bellow) but now im getting a 500 server error:
>
> SIP/2.0 500 Internal Server Error
> FROM: "1102"<sip:1102 at 10.98.6.5>;tag=as60aba076
> TO:<sip:1989 at 10.98.6.5:5061>;tag=f5f4ad2a5d
> CSEQ: 102 INVITE
> CALL-ID: 206fed5108bdcd2d2bb5255217713ca7 at 10.98.6.5
> VIA: SIP/2.0/TCP 10.98.6.5;branch=z9hG4bKd9ef.ed1ee9d5.0;i=3,SIP/2.0/TCP 10.98.6.5;branch=z9hG4bKd9ef.dd1ee9d5.1,SIP/2.0/UDP 10.98.6.5:5060;branch=z9hG4bK3557f87f;rport=5060
> CONTENT-LENGTH: 0
> SERVER: RTCC/3.0.0.0
>
>
>
>
>
>
> # main request routing logic
>
> route{
> if (!mf_process_maxfwd_header("10")) {
> sl_send_reply("483","Too Many Hops");
> break;
> };
> if (msg:len>= 2048 ) {
> sl_send_reply("513", "Message too big");
> break;
> };
>
> if (!method=="REGISTER") record_route();
> if (loose_route()) {
> append_hf("P-hint: rr-enforced\r\n");
> route(1);
> break;
> };
>
> if (uri==myself) {
>
> if (method=="REGISTER") {
>
> save("location");
> break;
> };
>
> # do redirect with accounting
> t_on_failure("2");
> } else {
> # just do redirect
> t_on_failure("1");
> }
>
> append_hf("P-hint: usrloc applied\r\n");
> route(3);
> }
>
> failure_route[1] {
> get_redirects("3:1");
> t_relay();
> }
>
> failure_route[2] {
> get_redirects("6:2","redirect");
> t_relay();
> }
>
> route[3]
> {
> if (src_ip==10.98.6.5) {
> if (dst_port==5065) {
> t_relay_to_tcp("10.98.118.20", "5065");
> }
> else if (dst_port==5066) {
> t_relay_to_tcp("10.98.118.20", "5066");
> }
> else if (dst_port==5067) {
> t_relay_to_tcp("10.98.118.20", "5067");
> }
> else {
> t_relay_to_tcp("10.98.118.20", "5060");
> }
> }
> else {
> t_relay_to_udp("10.98.6.5", "5060");
> };
> }
>
> Nelson Pereira
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
More information about the sr-users
mailing list