OpenWrt Forum Archive

Topic: asterisk 1.8.10.1 hangs when resolving dns in register, trunk r32786

The content of this topic has been archived on 25 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi there!

I found an issue when upgrading my DIR-825 to latest trunk. Asterisk failed to register to my voip provider, and no other UDP SIP phone would register with it. Also, asterisk cpu utilization went to 100%.
My sip.conf looked like this:

[general]
...
register => user:pass@voip-provider.com/number

[phone1]
type=friend
host=dynamic
...
[voip_provider]                                            
type=peer                                                       
host=voip-provider.com
...

With strace I saw this repeating all the time:

1837  open("/etc/resolv.conf", O_RDONLY) = 11
1837  ioctl(11, SNDCTL_TMR_TIMEBASE or TCGETS, 0xb72180b4) = -1 ENOTTY (Inappropriate ioctl for device)
1837  read(11, "search lan\nnameserver 127.0.0.1\n", 4096) = 32
1837  read(11, "", 4096)                = 0
1837  close(11)                         = 0

Changing the register line to:

egister => user:pass@ipaddress/number

worked around the issue.
Interestingly, the peer connected without problems even with the dns name in the 'host=' line, the problem is only with the 'register =>" line.

The discussion might have continued from here.