[Kamailio-Users] DNS lookup for requests within dialog
Daniel-Constantin Mierla
miconda at gmail.com
Thu Sep 24 12:46:32 CEST 2009
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.
- hope/pray that asterisk is using these dialog info for building
re-registration messages
- on your kamailio route based on Route header
Cheers,
Daniel
>
> 2009/9/24 Daniel-Constantin Mierla <miconda at 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 at lists.kamailio.org
> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>
>
--
Daniel-Constantin Mierla
* Kamailio SIP Masterclass, Nov 9-13, 2009, Berlin
* http://www.asipto.com/index.php/sip-router-masterclass/
More information about the sr-users
mailing list