Philipp von Klitzing
2004-Jan-12 07:20 UTC
[Asterisk-Users] host=dynamic and defaultip=xxx
Hi there, can anyone shed some light about the use of "host=dynamic" and "defaultip=xxx.xxx.xxx.xxx" in view of iax.conf and sip.conf? In bug 558 I learned that at lest for iax.conf these two settings should NOT be used together. Does the same apply for sip.conf? That would mean that both the Wiki as well as the draft handbook need to be adjusted. Cheers, Philipp
Philipp von Klitzing wrote:> Hi there, > > can anyone shed some light about the use of > > "host=dynamic" and > "defaultip=xxx.xxx.xxx.xxx"If I'm not wrong, which may be the case, defaultip is used in the SIP channel until registration, if you have host=dynamic. This might be useful if you have NATed clients and restart your server with long times between SIP registrations (maxexpiry). So I think that bkw's statement in bugs.digium.com was, if not wrong, maybe not entirely correct :-) Stepping carefully here... /O
Stephen R. Besch
2004-Jan-12 10:30 UTC
[Asterisk-Users] Re: host=dynamic and defaultip=xxx
Philipp von Klitzing wrote:> Hi there, > > can anyone shed some light about the use of > > "host=dynamic" and > "defaultip=xxx.xxx.xxx.xxx" >Experimentation with host=dynamic revealed that it means that asterisk will create an entry which waits for the remote end to register (i.e. call up and pass the remote IP address to *). It is essential if the remote unit is using DHCP or some other means to dynamically get it's IP address. It can also be used when the remote IP is fixed. In this case, when the remote end registers, it will send its IP address to *. If you have a fixed IP, then you can also enter it as host=ip and avoid registration/re-registeration issues altogether. In this case, instead of a formal registration procedure, * will send a query packet every so often (qualify=xxx, in ms) to see if the IP is available, and if it is, it will use the IP. Apparently, it will accept packets from the address in any case. This can be useful in cases with hardware that has re-registration issues (such as the Grandstream phones - but this may have been fixed). If you have a very large installation, the dynamic option is really useful, since it frees you from having to enter and maintain all of those IP addresses in the configuration files. In a small installation, it is probably better to use the host=IP option, since it should have a higher reliability in terms of availability From what I can tell, the defaultip is used to define the address of a remote device (phone, etc) which is to be rung if the device specified in the host= option is, for some reason, unavailable. The idea is to pass incoming calls over to some predefined, reliable, unit when the dialed one is off line. I have no experience with its use in iax.conf.