[sr-dev] [Urgent] Double REGISTER and MESSAGE issue in Kamailio3.1

Coca chanea at gmail.com
Fri Jul 29 19:18:40 CEST 2011


Sorry, last mail forgot to attach file, send again.

Dear Klaus,

Thanks for your help last time. Your response is always so quick.

Following your advice, I've attached the log of Kamailio3.1 in this
message.(debug=3)

Something strange can be found in this log as below:
( 10.150.175.210 is the private ip of the Amazon EC2 server)
--------------------------------------------------------------------------------------------------------------------
17(1715) DEBUG: <core> [socket_info.c:501]: grep_sock_info - checking if
host==us: 17==9 &&  [sip.mydomain.org] == [127.0.0.1]
17(1715) DEBUG: <core> [socket_info.c:504]: grep_sock_info - checking if
port 5060 matches port 5060
17(1715) DEBUG: <core> [socket_info.c:501]: grep_sock_info - checking if
host==us: 17==14 &&  [sip.mydomain.org] == [10.150.175.210]
17(1715) DEBUG: <core> [socket_info.c:504]: grep_sock_info - checking if
port 5060 matches port 5060
17(1715) DEBUG: <core> [socket_info.c:501]: grep_sock_info - checking if
host==us: 17==9 &&  [sip.mydomain.org] == [127.0.0.1]
17(1715) DEBUG: <core> [socket_info.c:504]: grep_sock_info - checking if
port 5060 matches port 5060
17(1715) DEBUG: <core> [socket_info.c:501]: grep_sock_info - checking if
host==us: 17==14 &&  [sip.mydomain.org] == [10.150.175.210]
17(1715) DEBUG: <core> [socket_info.c:504]: grep_sock_info - checking if
port 5060 matches port 5060
--------------------------------------------------------------------------------------------------------------------

Any kind of hint further??

Your help will be great appreciated.

2011/7/29 Klaus Darilion <klaus.mailinglists at pernau.at>

> 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 at lists.sip-router.org
> > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>
> _______________________________________________
> sr-dev mailing list
> sr-dev at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20110730/5977e9de/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: doubleMsgInKamailioLog
Type: application/octet-stream
Size: 15877 bytes
Desc: not available
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20110730/5977e9de/attachment-0001.obj>


More information about the sr-dev mailing list