Hi my name is Luca.
I have this problem with trunk IAX
In the gateway i have this error
chan_iax2.c:11474 socket_process: Registration of ‘host01’ rejected: ‘Registration Refused’ from: ‘192.168.1.110’
In the host i have
chan_iax2.c:8122 register_verify: No registration for peer ‘host01’ (from 192.168.1.100)
chan_iax2.c:11474 socket_process: Registration of ‘host01’ rejected: ‘Registration Refused’ from: ‘192.168.1.100’
This implies that host01 does not exist on the machine receiving the registration request.
On your gateway, you are attempting to register as User host01:
register => host01:marilena@192.168.1.110
However, you don’t have a peer named host01 on HOST01. Instead, you have a user named gateway:
[gateway]
type=user
username=host01
...
I would suspect that your user should be of type peer, and that when you register from the GATEWAY, that you should register as the peer on HOST01. That is:
Hosts that are static don’t need a registration. You only need to register if your host is dynamic.
If you want to use registration, then set the host=dynamic for your peers/users.
That aside, I’m not sure why you have both friends and users defined on each system. You should only need the peer or friend, each one representing the system on the other side.
The purpose of registration is for one IAX2 peer to inform another IAX2 peer of its location. This is analogous to registration in SIP as well, where a SIP UA will register to a SIP registrar so that other SIP UAs can find its location.
If you know the location of the IAX2 peer - which you apparently do, since you hardcoded their IP addresses - then you don’t need to register. Each peer has the location already. Registrations will fail because there is nothing for them to register against - each peer already has the address in the .conf file.
If you want to use registration - for example, you don’t want to have to hardcode the IP address or domain names of your IAX2 peers in the respective .conf files - then you must set host=dynamic.