Is NAPTR query always necessary?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Is NAPTR query always necessary?

hsuan
Hi all,

I am newbie on opensips, I wonder if the NAPTR is necessary in some case?
When my sip domain is set to FQDN, the opensips server will send NAPTR query to DNS server. But there is no NAPTR supported DNS in my environment, although the opensips server will get the ip and port eventaully.
Why the opensips server will send NAPTR query again and again even though it already get the ip and port from DNS? When the opensips server get into the NAPTR loop, the user will get 483 too many hops finally and will not able to register to opensips server. Once if the sip domain is set to ip address, the user will register successfully. Is there any way to disable the NAPTR query in opensips server? Please advice.

Best regards,
Eason

Reply | Threaded
Open this post in threaded view
|

Re: Is NAPTR query always necessary?

Bogdan-Andrei Iancu
Hi Eason,

according to RFC3263 ( SIP: Locating SIP Servers), if the explicit
protocol and port is contain by the destination SIP URI, the proxy must
try to do NAPTR and SRV lookups to discover what protocol and port to use...
If these records are missing, the default value ( UDP + 5060) are assumed.

these DNS lookups are done each time a requests is routed out (if not
using IPs).

What happens in your case is a SIP looping on the proxy (sending the
request to itself). You can check this with tcpdump/ngrep/wireshark ,
watching the traffic on LO interface.

Regards,
Bogdan


hsuan wrote:

> Hi all,
>
> I am newbie on opensips, I wonder if the NAPTR is necessary in some case?
> When my sip domain is set to FQDN, the opensips server will send NAPTR query
> to DNS server. But there is no NAPTR supported DNS in my environment,
> although the opensips server will get the ip and port eventaully.
> Why the opensips server will send NAPTR query again and again even though it
> already get the ip and port from DNS? When the opensips server get into the
> NAPTR loop, the user will get 483 too many hops finally and will not able to
> register to opensips server. Once if the sip domain is set to ip address,
> the user will register successfully. Is there any way to disable the NAPTR
> query in opensips server? Please advice.
>
> Best regards,
> Eason
>
>
>  


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Is NAPTR query always necessary?

hsuan
Hi Bogdan,

Thanks for your feedback.

Yes, I can find the sip request to itself on LO interface.

But I don't know what setting in opensips server will cause SIP looping. Could you spell out more precisely? Why the sip looping only happens in the domain is not numeric? Do you mean it's not the DNS issue? I am a little confused.

Best regards,
Eason


Bogdan-Andrei Iancu wrote
Hi Eason,

according to RFC3263 ( SIP: Locating SIP Servers), if the explicit
protocol and port is contain by the destination SIP URI, the proxy must
try to do NAPTR and SRV lookups to discover what protocol and port to use...
If these records are missing, the default value ( UDP + 5060) are assumed.

these DNS lookups are done each time a requests is routed out (if not
using IPs).

What happens in your case is a SIP looping on the proxy (sending the
request to itself). You can check this with tcpdump/ngrep/wireshark ,
watching the traffic on LO interface.

Regards,
Bogdan


hsuan wrote:
> Hi all,
>
> I am newbie on opensips, I wonder if the NAPTR is necessary in some case?
> When my sip domain is set to FQDN, the opensips server will send NAPTR query
> to DNS server. But there is no NAPTR supported DNS in my environment,
> although the opensips server will get the ip and port eventaully.
> Why the opensips server will send NAPTR query again and again even though it
> already get the ip and port from DNS? When the opensips server get into the
> NAPTR loop, the user will get 483 too many hops finally and will not able to
> register to opensips server. Once if the sip domain is set to ip address,
> the user will register successfully. Is there any way to disable the NAPTR
> query in opensips server? Please advice.
>
> Best regards,
> Eason
>
>
>  


_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Is NAPTR query always necessary?

Bogdan-Andrei Iancu
Hi Eason ,

the looping happens because your OpenSIPS does not recognize the domain
from RURI as local domain (to be processed locally) and simply fwds it
based on DNS.

In your script, do you use multi-domain support? Is it based on the
default opensips cfg ?

Regards,
Bogdan

hsuan wrote:

> Hi Bogdan,
>
> Thanks for your feedback.
>
> Yes, I can find the sip request to itself on LO interface.
>
> But I don't know what setting in opensips server will cause SIP looping.
> Could you spell out more precisely? Why the sip looping only happens in the
> domain is not numeric? Do you mean it's not the DNS issue? I am a little
> confused.
>
> Best regards,
> Eason
>
>
>
> Bogdan-Andrei Iancu wrote:
>  
>> Hi Eason,
>>
>> according to RFC3263 ( SIP: Locating SIP Servers), if the explicit
>> protocol and port is contain by the destination SIP URI, the proxy must
>> try to do NAPTR and SRV lookups to discover what protocol and port to
>> use...
>> If these records are missing, the default value ( UDP + 5060) are assumed.
>>
>> these DNS lookups are done each time a requests is routed out (if not
>> using IPs).
>>
>> What happens in your case is a SIP looping on the proxy (sending the
>> request to itself). You can check this with tcpdump/ngrep/wireshark ,
>> watching the traffic on LO interface.
>>
>> Regards,
>> Bogdan
>>
>>
>> hsuan wrote:
>>    
>>> Hi all,
>>>
>>> I am newbie on opensips, I wonder if the NAPTR is necessary in some case?
>>> When my sip domain is set to FQDN, the opensips server will send NAPTR
>>> query
>>> to DNS server. But there is no NAPTR supported DNS in my environment,
>>> although the opensips server will get the ip and port eventaully.
>>> Why the opensips server will send NAPTR query again and again even though
>>> it
>>> already get the ip and port from DNS? When the opensips server get into
>>> the
>>> NAPTR loop, the user will get 483 too many hops finally and will not able
>>> to
>>> register to opensips server. Once if the sip domain is set to ip address,
>>> the user will register successfully. Is there any way to disable the
>>> NAPTR
>>> query in opensips server? Please advice.
>>>
>>> Best regards,
>>> Eason
>>>
>>>
>>>  
>>>      
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>    
>
>  


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Is NAPTR query always necessary?

hsuan
Hi Bogdan,

I use multi-domain support, but if I comment the multi-domain setting in opensips.cfg the looping still happen. Would I add something in my opensips.cfg to avoid the looping?

Thanks,
Eason


Bogdan-Andrei Iancu wrote
Hi Eason ,

the looping happens because your OpenSIPS does not recognize the domain
from RURI as local domain (to be processed locally) and simply fwds it
based on DNS.

In your script, do you use multi-domain support? Is it based on the
default opensips cfg ?

Regards,
Bogdan

hsuan wrote:
> Hi Bogdan,
>
> Thanks for your feedback.
>
> Yes, I can find the sip request to itself on LO interface.
>
> But I don't know what setting in opensips server will cause SIP looping.
> Could you spell out more precisely? Why the sip looping only happens in the
> domain is not numeric? Do you mean it's not the DNS issue? I am a little
> confused.
>
> Best regards,
> Eason
>
>
>
> Bogdan-Andrei Iancu wrote:
>  
>> Hi Eason,
>>
>> according to RFC3263 ( SIP: Locating SIP Servers), if the explicit
>> protocol and port is contain by the destination SIP URI, the proxy must
>> try to do NAPTR and SRV lookups to discover what protocol and port to
>> use...
>> If these records are missing, the default value ( UDP + 5060) are assumed.
>>
>> these DNS lookups are done each time a requests is routed out (if not
>> using IPs).
>>
>> What happens in your case is a SIP looping on the proxy (sending the
>> request to itself). You can check this with tcpdump/ngrep/wireshark ,
>> watching the traffic on LO interface.
>>
>> Regards,
>> Bogdan
>>
>>
>> hsuan wrote:
>>    
>>> Hi all,
>>>
>>> I am newbie on opensips, I wonder if the NAPTR is necessary in some case?
>>> When my sip domain is set to FQDN, the opensips server will send NAPTR
>>> query
>>> to DNS server. But there is no NAPTR supported DNS in my environment,
>>> although the opensips server will get the ip and port eventaully.
>>> Why the opensips server will send NAPTR query again and again even though
>>> it
>>> already get the ip and port from DNS? When the opensips server get into
>>> the
>>> NAPTR loop, the user will get 483 too many hops finally and will not able
>>> to
>>> register to opensips server. Once if the sip domain is set to ip address,
>>> the user will register successfully. Is there any way to disable the
>>> NAPTR
>>> query in opensips server? Please advice.
>>>
>>> Best regards,
>>> Eason
>>>
>>>
>>>  
>>>      
>> _______________________________________________
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>    
>
>  


_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Is NAPTR query always necessary?

Bogdan-Andrei Iancu
Hi Eason,

What is the RURI of the request looping on your server?

Regards,
Bogdan

hsuan wrote:

> Hi Bogdan,
>
> I use multi-domain support, but if I comment the multi-domain setting in
> opensips.cfg the looping still happen. Would I add something in my
> opensips.cfg to avoid the looping?
>
> Thanks,
> Eason
>
>
>
> Bogdan-Andrei Iancu wrote:
>  
>> Hi Eason ,
>>
>> the looping happens because your OpenSIPS does not recognize the domain
>> from RURI as local domain (to be processed locally) and simply fwds it
>> based on DNS.
>>
>> In your script, do you use multi-domain support? Is it based on the
>> default opensips cfg ?
>>
>> Regards,
>> Bogdan
>>
>> hsuan wrote:
>>    
>>> Hi Bogdan,
>>>
>>> Thanks for your feedback.
>>>
>>> Yes, I can find the sip request to itself on LO interface.
>>>
>>> But I don't know what setting in opensips server will cause SIP looping.
>>> Could you spell out more precisely? Why the sip looping only happens in
>>> the
>>> domain is not numeric? Do you mean it's not the DNS issue? I am a little
>>> confused.
>>>
>>> Best regards,
>>> Eason
>>>
>>>
>>>
>>> Bogdan-Andrei Iancu wrote:
>>>  
>>>      
>>>> Hi Eason,
>>>>
>>>> according to RFC3263 ( SIP: Locating SIP Servers), if the explicit
>>>> protocol and port is contain by the destination SIP URI, the proxy must
>>>> try to do NAPTR and SRV lookups to discover what protocol and port to
>>>> use...
>>>> If these records are missing, the default value ( UDP + 5060) are
>>>> assumed.
>>>>
>>>> these DNS lookups are done each time a requests is routed out (if not
>>>> using IPs).
>>>>
>>>> What happens in your case is a SIP looping on the proxy (sending the
>>>> request to itself). You can check this with tcpdump/ngrep/wireshark ,
>>>> watching the traffic on LO interface.
>>>>
>>>> Regards,
>>>> Bogdan
>>>>
>>>>
>>>> hsuan wrote:
>>>>    
>>>>        
>>>>> Hi all,
>>>>>
>>>>> I am newbie on opensips, I wonder if the NAPTR is necessary in some
>>>>> case?
>>>>> When my sip domain is set to FQDN, the opensips server will send NAPTR
>>>>> query
>>>>> to DNS server. But there is no NAPTR supported DNS in my environment,
>>>>> although the opensips server will get the ip and port eventaully.
>>>>> Why the opensips server will send NAPTR query again and again even
>>>>> though
>>>>> it
>>>>> already get the ip and port from DNS? When the opensips server get into
>>>>> the
>>>>> NAPTR loop, the user will get 483 too many hops finally and will not
>>>>> able
>>>>> to
>>>>> register to opensips server. Once if the sip domain is set to ip
>>>>> address,
>>>>> the user will register successfully. Is there any way to disable the
>>>>> NAPTR
>>>>> query in opensips server? Please advice.
>>>>>
>>>>> Best regards,
>>>>> Eason
>>>>>
>>>>>
>>>>>  
>>>>>      
>>>>>          
>>>> _______________________________________________
>>>> Users mailing list
>>>> [hidden email]
>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>
>>>>
>>>>    
>>>>        
>>>  
>>>      
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>    
>
>  


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Is NAPTR query always necessary?

hsuan
Dear Bogdan,

Thank you for your feedback again...

The request looping packet info in LO interface is listed below:
=======================
No.     Time        Source                Destination           Protocol Info
     69 0.276057    10.7.2.50             10.7.2.50             SIP      Request: REGISTER sip:opensips.mydomain.com

Frame 69 (5887 bytes on wire, 5887 bytes captured)
Ethernet II, Src: 00:00:00:00:00:00 (00:00:00:00:00:00), Dst: 00:00:00:00:00:00 (00:00:00:00:00:00)
Internet Protocol, Src: 10.7.2.50 (10.7.2.50), Dst: 10.7.2.50 (10.7.2.50)
User Datagram Protocol, Src Port: 5060 (5060), Dst Port: 5060 (5060)
Session Initiation Protocol
    Request-Line: REGISTER sip:opensips.mydomain.com SIP/2.0
        Method: REGISTER
        [Resent Packet: True]
        [Suspected resend of frame: 1]
    Message Header
        Via: SIP/2.0/UDP 10.7.2.50;branch=z9hG4bK34ab.924721e4.0
        ...
=======================
Is "Request-Line: REGISTER sip:opensips.mydomain.com SIP/2.0" the RURI that you mentioned?

BR,
Eason

Bogdan-Andrei Iancu wrote
Hi Eason,

What is the RURI of the request looping on your server?

Regards,
Bogdan

hsuan wrote:
> Hi Bogdan,
>
> I use multi-domain support, but if I comment the multi-domain setting in
> opensips.cfg the looping still happen. Would I add something in my
> opensips.cfg to avoid the looping?
>
> Thanks,
> Eason
>
>
>
> Bogdan-Andrei Iancu wrote:
>  
>> Hi Eason ,
>>
>> the looping happens because your OpenSIPS does not recognize the domain
>> from RURI as local domain (to be processed locally) and simply fwds it
>> based on DNS.
>>
>> In your script, do you use multi-domain support? Is it based on the
>> default opensips cfg ?
>>
>> Regards,
>> Bogdan
>>
>> hsuan wrote:
>>    
>>> Hi Bogdan,
>>>
>>> Thanks for your feedback.
>>>
>>> Yes, I can find the sip request to itself on LO interface.
>>>
>>> But I don't know what setting in opensips server will cause SIP looping.
>>> Could you spell out more precisely? Why the sip looping only happens in
>>> the
>>> domain is not numeric? Do you mean it's not the DNS issue? I am a little
>>> confused.
>>>
>>> Best regards,
>>> Eason
>>>
>>>
>>>
>>> Bogdan-Andrei Iancu wrote:
>>>  
>>>      
>>>  
>>>      
>>
>>    
>
>  


_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Is NAPTR query always necessary?

Bogdan-Andrei Iancu
Hi Eason,

yes, the "sip:opensips.mydomain.com" is your RURI  - and probalby your
opensips does not recognize the opensips.mydomain.com domain as a domain
to locally process. Have you configured it somewhere?

Regards,
Bogdan

hsuan wrote:

> Dear Bogdan,
>
> Thank you for your feedback again...
>
> The request looping packet info in LO interface is listed below:
> =======================
> No.     Time        Source                Destination           Protocol
> Info
>      69 0.276057    10.7.2.50             10.7.2.50             SIP    
> Request: REGISTER sip:opensips.mydomain.com
>
> Frame 69 (5887 bytes on wire, 5887 bytes captured)
> Ethernet II, Src: 00:00:00:00:00:00 (00:00:00:00:00:00), Dst:
> 00:00:00:00:00:00 (00:00:00:00:00:00)
> Internet Protocol, Src: 10.7.2.50 (10.7.2.50), Dst: 10.7.2.50 (10.7.2.50)
> User Datagram Protocol, Src Port: 5060 (5060), Dst Port: 5060 (5060)
> Session Initiation Protocol
>     Request-Line: REGISTER sip:opensips.mydomain.com SIP/2.0
>         Method: REGISTER
>         [Resent Packet: True]
>         [Suspected resend of frame: 1]
>     Message Header
>         Via: SIP/2.0/UDP 10.7.2.50;branch=z9hG4bK34ab.924721e4.0
>         ...
> =======================
> Is "Request-Line: REGISTER sip:opensips.mydomain.com SIP/2.0" the RURI that
> you mentioned?
>
> BR,
> Eason
>
>
> Bogdan-Andrei Iancu wrote:
>  
>> Hi Eason,
>>
>> What is the RURI of the request looping on your server?
>>
>> Regards,
>> Bogdan
>>
>> hsuan wrote:
>>    
>>> Hi Bogdan,
>>>
>>> I use multi-domain support, but if I comment the multi-domain setting in
>>> opensips.cfg the looping still happen. Would I add something in my
>>> opensips.cfg to avoid the looping?
>>>
>>> Thanks,
>>> Eason
>>>
>>>
>>>
>>> Bogdan-Andrei Iancu wrote:
>>>  
>>>      
>>>> Hi Eason ,
>>>>
>>>> the looping happens because your OpenSIPS does not recognize the domain
>>>> from RURI as local domain (to be processed locally) and simply fwds it
>>>> based on DNS.
>>>>
>>>> In your script, do you use multi-domain support? Is it based on the
>>>> default opensips cfg ?
>>>>
>>>> Regards,
>>>> Bogdan
>>>>
>>>> hsuan wrote:
>>>>    
>>>>        
>>>>> Hi Bogdan,
>>>>>
>>>>> Thanks for your feedback.
>>>>>
>>>>> Yes, I can find the sip request to itself on LO interface.
>>>>>
>>>>> But I don't know what setting in opensips server will cause SIP
>>>>> looping.
>>>>> Could you spell out more precisely? Why the sip looping only happens in
>>>>> the
>>>>> domain is not numeric? Do you mean it's not the DNS issue? I am a
>>>>> little
>>>>> confused.
>>>>>
>>>>> Best regards,
>>>>> Eason
>>>>>
>>>>>
>>>>>
>>>>> Bogdan-Andrei Iancu wrote:
>>>>>  
>>>>>      
>>>>>  
>>>>>      
>>>>>          
>>>>    
>>>>        
>>>  
>>>      
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>    
>
>  


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Is NAPTR query always necessary?

hsuan
Dear Bogdan,

I just enable presence in opensips.cfg and the problem solved. I forgot why I would comment those presence settings...

Thanks anyway, I appreciate your support very much.

Best regards,
Eason


Bogdan-Andrei Iancu wrote
Hi Eason,

yes, the "sip:opensips.mydomain.com" is your RURI  - and probalby your
opensips does not recognize the opensips.mydomain.com domain as a domain
to locally process. Have you configured it somewhere?

Regards,
Bogdan

hsuan wrote:
> Dear Bogdan,
>
> Thank you for your feedback again...
>
> The request looping packet info in LO interface is listed below:
> =======================
> No.     Time        Source                Destination           Protocol
> Info
>      69 0.276057    10.7.2.50             10.7.2.50             SIP    
> Request: REGISTER sip:opensips.mydomain.com
>
> Frame 69 (5887 bytes on wire, 5887 bytes captured)
> Ethernet II, Src: 00:00:00:00:00:00 (00:00:00:00:00:00), Dst:
> 00:00:00:00:00:00 (00:00:00:00:00:00)
> Internet Protocol, Src: 10.7.2.50 (10.7.2.50), Dst: 10.7.2.50 (10.7.2.50)
> User Datagram Protocol, Src Port: 5060 (5060), Dst Port: 5060 (5060)
> Session Initiation Protocol
>     Request-Line: REGISTER sip:opensips.mydomain.com SIP/2.0
>         Method: REGISTER
>         [Resent Packet: True]
>         [Suspected resend of frame: 1]
>     Message Header
>         Via: SIP/2.0/UDP 10.7.2.50;branch=z9hG4bK34ab.924721e4.0
>         ...
> =======================
> Is "Request-Line: REGISTER sip:opensips.mydomain.com SIP/2.0" the RURI that
> you mentioned?
>
> BR,
> Eason
>
>
> Bogdan-Andrei Iancu wrote:
>  
>> Hi Eason,
>>
>> What is the RURI of the request looping on your server?
>>
>> Regards,
>> Bogdan
>>
>> hsuan wrote:
>>    
>>> Hi Bogdan,
>>>
>>> I use multi-domain support, but if I comment the multi-domain setting in
>>> opensips.cfg the looping still happen. Would I add something in my
>>> opensips.cfg to avoid the looping?
>>>
>>> Thanks,
>>> Eason
>>>
>>>
>>>
>>> Bogdan-Andrei Iancu wrote:
>>>  
>>>      
>>>> Hi Eason ,
>>>>
>>>> the looping happens because your OpenSIPS does not recognize the domain
>>>> from RURI as local domain (to be processed locally) and simply fwds it
>>>> based on DNS.
>>>>
>>>> In your script, do you use multi-domain support? Is it based on the
>>>> default opensips cfg ?
>>>>
>>>> Regards,
>>>> Bogdan
>>>>
>>>> hsuan wrote:
>>>>    
>>>>        
>>>>> Hi Bogdan,
>>>>>
>>>>> Thanks for your feedback.
>>>>>
>>>>> Yes, I can find the sip request to itself on LO interface.
>>>>>
>>>>> But I don't know what setting in opensips server will cause SIP
>>>>> looping.
>>>>> Could you spell out more precisely? Why the sip looping only happens in
>>>>> the
>>>>> domain is not numeric? Do you mean it's not the DNS issue? I am a
>>>>> little
>>>>> confused.
>>>>>
>>>>> Best regards,
>>>>> Eason
>>>>>
>>>>>
>>>>>
>>>>> Bogdan-Andrei Iancu wrote:
>>>>>  
>>>>>      
>>>>>  
>>>>>      
>>>>>          
>>>>    
>>>>        
>>>  
>>>      
>> _______________________________________________
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>    
>
>  


_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users