Sip.conf / Allow peers from a network / 1.4.24

Dear all,

I am currently configuring peer access from a whole network in Asterisk 1.4.24 using the following entry in my sip.conf:

permit=A.B.C.0/ (<=== where A.B.C.0 is the network address)

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.

Any help is appreciated!

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.

Hi David,

thanks for your quick response.

After checking this documentation, I was pretty sure that I can add permit-tags to peers as well: … -deny-mask

So, what would be the best solution? I am probably confusing matching and access control.

Will I need to add 255 peers to my sip.conf?

Best, Mark.

I’ve never had to consider the case. Why do you want to allow restricted incoming calls, but not allow any outgoing calls to the same device?


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).

Best, Mark