Errores #32

YASS doesn't resolve DNS SRV

Added by Iñaki Baz Castillo 11 months ago. Updated 7 months ago.

Status:Resuelta Start:03/17/2009
Priority:Normal Due date:
Assigned to:Saúl Ibarra % Done:

0%

Category:PJSIP
Target version:0.5.2

Description

When configuring an account for aliax.net (no A records, but NAPTR and SRV) YASS fails resolving the domain since no NAPTR/SRV query is performed:

 01:21:02.084   tsx0x8478954  Sending Request msg REGISTER/cseq=59783 (tdta0x85065f8) in state Null
 01:21:02.084  sip_resolve.c  DNS resolver not available, target 'aliax.net:0' type=Unspecified will be resolved with gethostbyname()
 01:21:02.116      pasound.c  Recorder thread started
 01:21:02.116    ec0x847d940  Prefetching..
 01:21:02.117    ec0x847d940  Prefetching..
 01:21:02.156    ec0x847d940  Prefetching..
 01:21:02.157    ec0x847d940  Prefetching..
 01:21:02.178  sip_resolve.c  Failed to resolve 'aliax.net'. Err=70018 (gethostbyname() has returned error (PJ_ERESOLVE))
 01:21:02.178   tsx0x8478954  Failed to send Request msg REGISTER/cseq=59783 (tdta0x85065f8)! err=70018 (gethostbyname() has returned error (PJ_ERESOLVE))
 01:21:02.178   tsx0x8478954  State changed from Null to Terminated, event=TRANSPORT_ERROR
 01:21:02.178    pjsua_acc.c  SIP registration failed, status=503 (Service Unavailable)

History

Updated by Iñaki Baz Castillo 11 months ago

  • Target version set to 0.5.0

Updated by Saúl Ibarra 11 months ago

OK, I found the way for PJSIP to use DNS SRV lookups, but I need you to try it or give me an account to try it :)

You can try it by doing this:

  • Close YASS.
  • Open YASS configuration db and insert a nameserver to do the lookup (I'll use 4.2.2.1 for example)

saghul@topux:~$ sqlite3 .yass/config.sqlite
SQLite version 3.5.9
Enter ".help" for instructions
sqlite> insert into ua(opt, val) values('nameserver', '4.2.2.1');
sqlite> select * from ua;
max_calls|2
user_agent|YASS - pjsip
stun_host|
nameserver|4.2.2.1
sqlite> .quit
saghul@topux:~$

If it works for you I'll add it tho the GUI so it can be manually configured :)

Thanks again for your feedback!

Updated by Iñaki Baz Castillo 11 months ago

It does basically nothing. BTW, which is your aim with it? does it set the outbound proxy?
I've added "aliax.net: 91.121.79.216" and later called to "sip:", getting the same error about PJ_ERESOLVE.

Also, why sould such a feature appear in the config box? The bug report is just about the incomplete DNS resolution of YASS, do I miss something?

Updated by Saúl Ibarra 8 months ago

  • Target version changed from 0.5.0 to 1.0.0

Updated by Iñaki Baz Castillo 7 months ago

Please, give more love to this bug as supporting SRV is a more than required feature nowadays for any modern SIP device :)

I expect it shouldn't be so difficult, and sure pjsip handles it by itself (and also failover).

Updated by Saúl Ibarra 7 months ago

  • Status changed from Nueva to Comentarios
  • Target version changed from 1.0.0 to 0.5.2

YASS now resolves DNS SRV hostnames :) Please check r171. I did'nt know very well how to check failover, maybe you can describe me what the appropiate setup would be (I've setup a bind nameserver with SRV).

Comments are always wellcome :)

Updated by Iñaki Baz Castillo 7 months ago

DNS doesn't work for me :(

I send a call tosip: (there is no DNS A entry but just SRV) and it doesn't work). I see nothing in the logs, just a window error "(CALL-001) Couldn't make the call.".

Updated by Saúl Ibarra 7 months ago

I have just tested it against Aliax server with my user saghul and it's working fine :-O What revision are you using? Did you install python-dns package?

Updated by Iñaki Baz Castillo 7 months ago

I'm not using a SRV for registration, but for destination (I call from oversip.net to aliax.net and it doesn't work).
Also, I don't understand why python-dns (I have installed it right now) is required. Doesn't pjsip handle SRV by itself (pure C)? or is it handled by pjsua (python)?

Updated by Saúl Ibarra 7 months ago

OK, I'm registered at my local PBX and called . It worked! Look:

02:02:29.835       endpoint  Request msg INVITE/cseq=4961 (tdta0x1b437d0) created.                                                                                                          
 02:02:29.835   inv0x1b3f608  Sending Request msg INVITE/cseq=4961 (tdta0x1b437d0)                                                                                                           
 02:02:29.835   dlg0x1b3f608  Sending Request msg INVITE/cseq=4961 (tdta0x1b437d0)                                                                                                           
 02:02:29.835   tsx0x1b45838  Transaction created for Request msg INVITE/cseq=4960 (tdta0x1b437d0)                                                                                           
 02:02:29.835   tsx0x1b45838  Sending Request msg INVITE/cseq=4960 (tdta0x1b437d0) in state Null                                                                                             
 02:02:29.835  sip_resolve.c  Starting async DNS SRV query: target=_sip._udp.aliax.net, transport=Unspecified, port=0                                                                        
 02:02:29.835 _sip._udp.alia  Starting async DNS SRV query_job: target=_sip._udp.aliax.net:5060                                                                                              
 02:02:29.835     resolver.c  Transmitting 37 bytes to NS 1 (212.55.8.132:53): DNS SRV query for _sip._udp.aliax.net                                                                         
 02:02:29.835   tsx0x1b45838  State changed from Null to Calling, event=TX_MSG                                                                                                               
 02:02:29.835   dlg0x1b3f608  Transaction tsx0x1b45838 state changed to Calling                                                                                                              
 02:02:29.838    ec0x1125950  Prefetching..                                                                                                                                                  
 02:02:29.858    ec0x1125950  Prefetching..                                                                                                                                                  
 02:02:29.871     resolver.c  Received 152 bytes DNS response from 212.55.8.132:53                                                                                                           
 02:02:29.871     resolver.c  Nameserver 212.55.8.132:53 state changed Active --> Active                                                                                                     
 02:02:29.871 _sip._udp.alia  SRV query_job for _sip._udp.aliax.net completed, 1 of 1 total entries selected:                                                                                
 02:02:29.871 _sip._udp.alia   0: SRV 0 0 5060 sip.aliax.net (91.121.79.216)                                                                                                                 
 02:02:29.871 _sip._udp.alia  Server resolution complete, 1 server entry(s) found    

python-dns package is needed for two things: * Loading nameservers from /etc/resolv.conf * Performing DNS SRV queries for STUN, to detect if an invalid host was provided.

Please, remove YASS completely (that includes your home .yass) download from SVN and execute it right there, without making a package. If that works for you the package may be missing some file, it check it now anyway :)

Updated by Saúl Ibarra 7 months ago

Just made a package and tested again. It's working for me :-O

Updated by Saúl Ibarra 7 months ago

  • Status changed from Comentarios to Resuelta

Also available in: Atom PDF