Hi Florian,
after load_gws() you need to call next_gw(). See the online doc for LCR
module.
regards,
bogdan
Florian Fainelli wrote:
Replying to myself,
Here is my routing block :
route{
# initial sanity checks -- messages with
# max_forwards==0, or excessively long requests
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
exit;
};
if (msg:len >= 2048 ) {
sl_send_reply("513", "Message too big");
exit;
};
# we record-route all messages -- to make sure that
# subsequent messages will go through our proxy; that's
# particularly good if upstream and downstream entities
# use different transport protocol
#if (!method=="REGISTER")
# record_route();
# subsequent messages withing a dialog should take the
# path determined by record-routing
if (loose_route()) {
# mark routing logic in request
append_hf("P-hint: rr-enforced\r\n");
route(1);
};
#if (uri=~"^sip:06(09|12)[0-9]*@*") {
# log("Routage appel SFR\n");
# forward(82.138.76.138, 5060);
#};
# if the request is for other domain use UsrLoc
# (in case, it does not work, use the following command
# with proper names and addresses in it)
if (!load_gws()) {
sl_send_reply("503", "Server Internal Error - Cannot load
gateways");
xlog ("L_INFO","Impossible de charger les routes");
}
route[1] {
# send it out now; use stateful forwarding as it works reliably
# even for UDP2TCP
if (!t_relay()) {
sl_reply_error();
};
exit;
}
Do you have any clues ?
Le Mercredi 1 Mars 2006 16:16, Florian Fainelli a écrit :
Hello all,
I am progressing in my dynamic routing with lcr.
I am able to make my calls being routed to a given gateway, but they are
not forwarded at all, you will find below the error messages I get :
12(13607) SIP Request:
12(13607) method: <CANCEL>
12(13607) uri: <sip:60957512@213.161.196.133>
12(13607) version: <SIP/2.0>
12(13607) parse_headers: flags=2
12(13607) header field type 8, name=<Max-Forwards>, body=<10>
12(13607) Found param type 232, <branch> = <1>; state=16
12(13607) end of header reached, state=5
12(13607) parse_headers: Via found, flags=2
12(13607) parse_headers: this is the first via
12(13607) header field type 1, name=<Via>, body=<SIP/2.0/UDP
157.159.80.57:5060;branch=1>
12(13607) first via: <SIP/2.0/UDP> <157.159.80.57:5060(5060)>12(13607)
;<>12(13607)
12(13607) exiting parse_msg
12(13607) After parse_msg...
12(13607) preparing to run routing scripts...
12(13607) DEBUG:maxfwd:is_maxfwd_present: value = 10
12(13607) parse_headers: flags=200
12(13607) header field type 4, name=<From>,
body=<<sip:157.159.80.57>;tag=044864755209883246007508179717>
12(13607) DEBUG:parse_to:end of header reached, state=9
12(13607) DEBUG: get_hdr_field: <To> [32];
uri=[sip:60957512@213.161.196.133]
12(13607) DEBUG: to body [<sip:60957512@213.161.196.133>
]
12(13607) header field type 3, name=<To>,
body=<<sip:60957512@213.161.196.133>>
12(13607) header field type 7, name=<Contact>,
body=<<sip:157.159.80.57>>
12(13607) header field type 26, name=<User-Agent>, body=<TELES.VoIPBOX
10.0 #302>
12(13607) header field type 6, name=<Call-ID>,
body=<000688355273195645908699556113(a)157.159.80.57>
12(13607) get_hdr_field: cseq <CSeq>: <1> <CANCEL>
12(13607) header field type 5, name=<CSeq>, body=<1 CANCEL>
12(13607) header field type 19, name=<Allow>,
body=<INVITE,ACK,CANCEL,BYE,UPDATE,REGISTER>
12(13607) DEBUG: get_hdr_body : content_length=0
12(13607) header field type 12, name=<Content-Length>, body=<0>
12(13607) found end of header
12(13607) find_first_route: No Route headers found
12(13607) loose_route: There is no Route HF
12(13607) parsed uri:
type=1 user=<60957512>(8)
passwd=<>(0)
host=<213.161.196.133>(15)
port=<>(0): 0
params=<>(0)
headers=<>(0)
12(13607) uri params:
transport=<>, val=<>, proto=0
12(13607) user-param=<>, val=<>
12(13607) method=<>, val=<>
12(13607) ttl=<>, val=<>
12(13607) maddr=<>, val=<>
12(13607) lr=<>
12(13607) DEBUG: add_param: tag=044864755209883246007508179717
12(13607) DEBUG:parse_to:end of header reached, state=29
12(13607) load_gws(): DEBUG: Added gw_uri_avp
<sip:@82.138.76.138:5060;transport=tcp>
12(13607) DEBUG:destroy_avp_list: destroying list 0xb5c01f10
12(13607) receive_msg: cleaning up
Thanks in advance for your answers.
------------------------------------------------------------------------
_______________________________________________
Users mailing list
Users(a)openser.org
http://openser.org/cgi-bin/mailman/listinfo/users