Looping usually means, that Kamailio fails to detect that the message is
target to itself. This is often caused by if the SIP domain in the
request URI is not know to Kamailio's aliases.
If you can not fix it, enable debug=3 and watch how the message is
processed through the script to find out where the message is routed
falsely.
regards
Klaus
Am 29.07.2011 11:21, schrieb Coca:
Dear List,
I have Kamailio 3.1 installed in Amazon EC 2 server.
Everything is working fine except that every REGISTER / MESSAGE was
looped for twice or 3 times.
And I am sure this is not caused by UA.
I have attached the ngrep log in this message.
And also, my main modification to the kamailio.cfg is like below:
Your help will be great great appreciated.
Thank you!!
Coca
----------------------------------
#!define WITH_MYSQL
#!define WITH_NAT
alias="mydomain.org <http://mydomain.org>"
alias="xx.xx.xx.xx"
advertised_address="xx.xx.xx.xx"
...
...
route {
# per request initial checks
route(REQINIT);
# NAT detection
route(NAT);
# handle requests within SIP dialogs
route(WITHINDLG);
### only initial requests (no To tag)
# CANCEL processing
if (is_method("CANCEL"))
{
if (t_check_trans())
t_relay();
exit;
}
t_check_trans();
# authentication
route(AUTH);
# record routing for dialog forming requests (in case they are routed)
# - remove preloaded route headers
remove_hf("Route");
if (is_method("INVITE|SUBSCRIBE"))
{
#record_route();
/* for NAT support */
record_route_preset("xx.xx.xx.xx");
}
# account only INVITEs
if (is_method("INVITE"))
{
setflag(FLT_ACC); # do accounting
}
# dispatch requests to foreign domains
route(SIPOUT);
### requests for my local domains
# handle presence related requests
route(PRESENCE);
# handle registrations
route(REGISTRAR);
if ($rU==$null)
{
# request with no Username in RURI
sl_send_reply("484","Address Incomplete");
exit;
}
# dispatch destinations to PSTN
route(PSTN);
# user location service
route(LOCATION);
route(RELAY);
}
# Handle SIP registrations
route[REGISTRAR] {
if (is_method("REGISTER"))
{
if(isflagset(FLT_NATS))
{
setbflag(FLB_NATB);
# uncomment next line to do SIP NAT pinging
setbflag(FLB_NATSIPPING);
}
if (!save("location"))
sl_reply_error();
exit;
}
}
_______________________________________________
sr-dev mailing list
sr-dev(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev