To make life easier configuring a Cisco Voice Gateway with an organisation that has multiple inbound number ranges, we can group the number ranges together and then apply the group to a single dial-peer saving lines of extra code.
First is to create a voice class e164-pattern-map, from the sub-menu we need to enter the number ranges as you would normally on a dial-peer using regex expressions. The second step is to apply the voice class to a dial-peer.
voice class e164-pattern-map 1
e164 296451[016]..
e164 296527[6-9]..
e164 2963268..
e164 2965145..
dial-peer voice 2 voip
description ## PSTN INBOUND ##
rtp payload-type nse 99
session protocol sipv2
session target sip-server
incoming called e164-pattern-map 1
voice-class codec 10
voice-class sip dtmf-relay force rtp-nte
dtmf-relay rtp-nte
fax protocol none