How many lookup("location") things do you use in your configuration file ?
This seems to be the problem with more then once use of this command. Try to avoid this, or check if you can substitute some of them with simple SQL select in location table.
On Mon, Mar 28, 2011 at 10:46 AM, Efelin Novak efelin.novak@gmail.com wrote:
Hi Folks, I have a problem with a registrar module (at least I suppose so). When A calls to B, in some specific situation, B receives two INVITEs. This
mostly
(not only) happens when one account is registered on two or more UAs. In this situation the extra INVITE is sent only to the one that is second in the list (kamctl ul show ACCOUNT). kamctl ul show Alice: Contact:: <sip:orlvuzyd@192.168.28.72:52129 ;q=0;expires=1916;flags=0x0;cflags=0x40;socket=<udp:8.8.8.8:5060 ;methods=0xFFFFFFFF;received=sip:8.8.8.8:52129;user_agent=<Blink 0.2.5 (Linux)> Contact:: <sip:Alice@192.168.28.51:5060 ;q=;expires=3061;flags=0x0;cflags=0x40;socket=<udp:8.8.8.8:5060 ;methods=0x129F;received=<sip:8.8.8.8:5060 ;user_agent=<Linksys/PAP2T-3.1.15(LS)>
My situation.
- Alice calls to BOB.
- kamailio looks up in location table for BOBs registrations
- in DB there are two rows (two devices(linksys PAP2T and Blink(blink is
the second one))) 4. kamailio send 3 INVITES ( linksys, blink and blink). Every INVITE has different via.branch (Via: SIP/2.0/UDP 8.8.8.8;branch=z9hG4bKe2d7.009b1df2.1) (Via: SIP/2.0/UDP 8.8.8.8;branch=z9hG4bKe2d7.009b1df2.2) (Via: SIP/2.0/UDP 8.8.8.8;branch=z9hG4bKe2d7.009b1df2.3) All my registrar parameters are set to default. Nothing is looping on interfaces. I have no idea whether this is a bug or my missconfiguration. Thanks for replies. Kind regards, Efelin Novak
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Hi Mino,
thank you very much. This solved the problem. Second lookup added (dunno why) an extra branch. I assume this is a bug. Or do I have to specify second lookup somehow special?
Now the question is: I needed second lookup just to make sure a user is not online (the conditional redirect). Is it OK just to make query like this:
sql_query("ca"," SELECT 1 FROM location WHERE username = $rU ","ra");
and check for the number of rows?
I find out that DB and memory content is not really the same. DB is something about minute behind memory( Do you know the precise time?). If this is true I'm ok with this time. Is there any other difference?
Thanks folks,
Efelin Novak
2011/3/28 Mino Haluz mino.haluz@gmail.com
How many lookup("location") things do you use in your configuration file ?
This seems to be the problem with more then once use of this command. Try to avoid this, or check if you can substitute some of them with simple SQL select in location table.
On Mon, Mar 28, 2011 at 10:46 AM, Efelin Novak efelin.novak@gmail.com wrote:
Hi Folks, I have a problem with a registrar module (at least I suppose so). When A calls to B, in some specific situation, B receives two INVITEs. This
mostly
(not only) happens when one account is registered on two or more UAs. In this situation the extra INVITE is sent only to the one that is second in the list (kamctl ul show ACCOUNT). kamctl ul show Alice: Contact:: <sip:orlvuzyd@192.168.28.72:52129 ;q=0;expires=1916;flags=0x0;cflags=0x40;socket=<udp:8.8.8.8:5060 ;methods=0xFFFFFFFF;received=sip:8.8.8.8:52129;user_agent=<Blink 0.2.5 (Linux)> Contact:: <sip:Alice@192.168.28.51:5060 ;q=;expires=3061;flags=0x0;cflags=0x40;socket=<udp:8.8.8.8:5060 ;methods=0x129F;received=<sip:8.8.8.8:5060 ;user_agent=<Linksys/PAP2T-3.1.15(LS)>
My situation.
- Alice calls to BOB.
- kamailio looks up in location table for BOBs registrations
- in DB there are two rows (two devices(linksys PAP2T and Blink(blink is
the second one))) 4. kamailio send 3 INVITES ( linksys, blink and blink). Every INVITE has different via.branch (Via: SIP/2.0/UDP 8.8.8.8;branch=z9hG4bKe2d7.009b1df2.1) (Via: SIP/2.0/UDP 8.8.8.8;branch=z9hG4bKe2d7.009b1df2.2) (Via: SIP/2.0/UDP 8.8.8.8;branch=z9hG4bKe2d7.009b1df2.3) All my registrar parameters are set to default. Nothing is looping on interfaces. I have no idea whether this is a bug or my missconfiguration. Thanks for replies. Kind regards, Efelin Novak
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Efelin Novak wrote:
thank you very much. This solved the problem. Second lookup added (dunno why) an extra branch. I assume this is a bug.
No, that is correct behaviour. Or, sort of. The whole adding or not of branches is a bit fiddely, if I may say so.
Or do I have to specify second lookup somehow special?
Now the question is: I needed second lookup just to make sure a user is not online (the conditional redirect). Is it OK just to make query like this:
Have a look at the registered() function of the registrar module. It is probably what you are looking for.
I find out that DB and memory content is not really the same. DB is something about minute behind memory( Do you know the precise time?). If this is true I'm ok with this time. Is there any other difference?
That depends on the db_mode parameter of the usrloc module. If you set it to either 1 or 3, changes will be written to the database right away. On 3, there isn't even any caching in memory at all.
Regards, Martin
I think you can use registered() or fetch_contacts() function.
http://www.kamailio.org/docs/modules/3.1.x/modules_k/registrar.html#id295511...
regards Klaus
On 29.03.2011 08:58, Efelin Novak wrote:
Hi Mino,
thank you very much. This solved the problem. Second lookup added (dunno why) an extra branch. I assume this is a bug. Or do I have to specify second lookup somehow special?
Now the question is: I needed second lookup just to make sure a user is not online (the conditional redirect). Is it OK just to make query like this:
sql_query("ca"," SELECT 1 FROM location WHERE username = $rU ","ra");
and check for the number of rows?
I find out that DB and memory content is not really the same. DB is something about minute behind memory( Do you know the precise time?). If this is true I'm ok with this time. Is there any other difference?
Thanks folks,
Efelin Novak
2011/3/28 Mino Haluz <mino.haluz@gmail.com mailto:mino.haluz@gmail.com>
How many lookup("location") things do you use in your configuration file ? This seems to be the problem with more then once use of this command. Try to avoid this, or check if you can substitute some of them with simple SQL select in location table. On Mon, Mar 28, 2011 at 10:46 AM, Efelin Novak <efelin.novak@gmail.com <mailto:efelin.novak@gmail.com>> wrote: > Hi Folks, > I have a problem with a registrar module (at least I suppose so). When A > calls to B, in some specific situation, B receives two INVITEs. This mostly > (not only) happens when one account is registered on two or more UAs. In > this situation the extra INVITE is sent only to the one that is second in > the list (kamctl ul show ACCOUNT). > kamctl ul show Alice: > Contact:: > <sip:orlvuzyd@192.168.28.72:52129 <http://sip:orlvuzyd@192.168.28.72:52129>>;q=0;expires=1916;flags=0x0;cflags=0x40;socket=<udp:8.8.8.8:5060 <http://8.8.8.8:5060>>;methods=0xFFFFFFFF;received=<sip:8.8.8.8:52129 <http://8.8.8.8:52129>>;user_agent=<Blink > 0.2.5 (Linux)> > Contact:: > <sip:Alice@192.168.28.51:5060 <http://sip:Alice@192.168.28.51:5060>>;q=;expires=3061;flags=0x0;cflags=0x40;socket=<udp:8.8.8.8:5060 <http://8.8.8.8:5060>>;methods=0x129F;received=<sip:8.8.8.8:5060 <http://8.8.8.8:5060>>;user_agent=<Linksys/PAP2T-3.1.15(LS)> > > My situation. > 1. Alice calls to BOB. > 2. kamailio looks up in location table for BOBs registrations > 3. in DB there are two rows (two devices(linksys PAP2T and Blink(blink is > the second one))) > 4. kamailio send 3 INVITES ( linksys, blink and blink). Every INVITE has > different via.branch > (Via: SIP/2.0/UDP 8.8.8.8;branch=z9hG4bKe2d7.009b1df2.1) > (Via: SIP/2.0/UDP 8.8.8.8;branch=z9hG4bKe2d7.009b1df2.2) > (Via: SIP/2.0/UDP 8.8.8.8;branch=z9hG4bKe2d7.009b1df2.3) > All my registrar parameters are set to default. > Nothing is looping on interfaces. > I have no idea whether this is a bug or my missconfiguration. > Thanks for replies. > Kind regards, > Efelin Novak > > _______________________________________________ > sr-dev mailing list > sr-dev@lists.sip-router.org <mailto:sr-dev@lists.sip-router.org> > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev > > _______________________________________________ sr-dev mailing list sr-dev@lists.sip-router.org <mailto:sr-dev@lists.sip-router.org> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev