Hi again
I probably misunderstood the RFC. But an INVITE does create a dialog, and the situation:
asterisk kamailio provider(hostname) --------------------> dns lookup --------------------> INVITE 1 INVITE 1
<-------------------- <-------------------- 407 407
--------------------> dns lookup --------------------> INVITE 2 INVITE 2 (authenticated)
would have the same problem.
But the htable idea seems OK, I will try it.
Thanks everybody
2009/9/24 Klaus Darilion klaus.mailinglists@pernau.at:
Daniel-Constantin Mierla schrieb:
Hello,
On 24.09.2009 12:10 Uhr, catalina oancea wrote:
Hi,
In my scenario kamailio is not a registrar, it's just a proxy forwarding requests from asterisk to the provider.
I see.
As Juha said, REGISTER does not create a real dialog, since the contact in 200OK is the address of publisher not of destination. So a proxy does not have within-dialog like routing information.
So here is a hack you can try:
- add record route on your proxy
- the provider should add its own record route to REGISTER reply -- if it
is kamailio, that is simple via append_to_reply() from textops, just before save() call.
works only if the provider use Kamailio (in which case syncronized nonces shouldn't be a problem)
- hope/pray that asterisk is using these dialog info for building
re-registration messages
I don't think that will work.
klaus
- on your kamailio route based on Route header
Cheers, Daniel
2009/9/24 Daniel-Constantin Mierla miconda@gmail.com:
Hello,
On 24.09.2009 11:47 Uhr, catalina oancea wrote:
Hi all,
I tested the following scenario:
astreisk kamailio provider(hostname) --------------------> dns lookup --------------------> REGISTER 1 REGISTER 1
<-------------------- <-------------------- 401 401
--------------------> dns lookup --------------------> REGISTER 2 REGISTER 2 (same dialog, increased cseq)
It seems that kamailio does dns lookup again when receiving REGISTER 2, although both registers are part of the same dialog. Is this the expected behavior?
IIRC now, there is no place in registrar related modules (registrar and usrloc) where DNS query is done. You have some checks in your config that caused that.
There is also an option to fetch existing contacts from location and see if it is an update (matching by call id and cseq) and do directly save("location").
Cheers, Daniel
-- Daniel-Constantin Mierla
- Kamailio SIP Masterclass, Nov 9-13, 2009, Berlin
- http://www.asipto.com/index.php/sip-router-masterclass/
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users