I am currently configuring peer access from a whole network in Asterisk 1.4.24 using the following entry in my sip.conf:
[provider-national]
type=peer
context=provider-in
permit=A.B.C.0/255.255.255.0 (<=== where A.B.C.0 is the network address)
insecure=port,invite
amaflags=BILLING
disallow=all
allow=alaw
allow=ulaw
allow=gsm
qualify=no
When trying to call in I receive a chan_sip.c:5630 process_sdp: No compatible codecs, not accepting this offer! error message. It’s absolutely save that I configured the codecs correctly - I can even add 255 single peers (all possible IPs from that network as 255 single peers) - don’t laugh - I tried that and it works correctly.
What am I doing wrong? I want to match on all IP addresses from a certain network using the permit-syntax. I could only find some basic documentation on which my above configuration is based on.
It needs to be possible to send calls to peers, which means that they can only have one IP address. “permit” is for access control, not for matching. Matching is done on host.
As far as I know, only default can have an indeterminate host address.
of course I can allow outgoing calls to the device (although I will never place any as this device does not accept calls to be placed outbound). Is this a big help?
My provider offers a whole network (range of IP addresses) for incoming VoIP calls and offers 5 dedicated IP addresses for outgoing calls (not in the IP range above).