cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
664
Views
5
Helpful
7
Replies

How do I match several explicit incoming numbers in one string?

UrbanPeasant
Level 1
Level 1

I need to match several explicit numbers on an incoming (from PSTN) dial peer so i can send the calls onwards out of a specific trunk, and I'm not seeing how I can do that, as the options I've used end up catching calls for other combinations of numbers I don't want e.g.

incoming called-number 0152459[234][2349][2357][1467]  is no good because of the multiple combination of options it allows.

 

What I actually want to match is 3324, and 2227, and 4474

Is there a character that allows that exact matches like incoming called-nu 0152459(3324$)(2227$)(4474$)

Or some other config that allows me to match the exact numbers I need?

 

Thanks

Nathan.

1 Accepted Solution

Accepted Solutions

Scott Leport
Level 7
Level 7

Hi Nathan,

 

I wonder if an incoming called e164-pattern-map might help? 

https://www.cisco.com/c/en/us/support/docs/voice/ip-telephony-voice-over-ip-voip/211306-In-Depth-Explanation-of-Cisco-IOS-and-IO.html#anc8

 

It would allow you to group numbers in a pattern-map and then the pattern-map is applied to a dial-peer. 

 

View solution in original post

7 Replies 7

Scott Leport
Level 7
Level 7

Hi Nathan,

 

I wonder if an incoming called e164-pattern-map might help? 

https://www.cisco.com/c/en/us/support/docs/voice/ip-telephony-voice-over-ip-voip/211306-In-Depth-Explanation-of-Cisco-IOS-and-IO.html#anc8

 

It would allow you to group numbers in a pattern-map and then the pattern-map is applied to a dial-peer. 

 

this sounds like a great idea. Looking into it.

I agree with Scott and to elaborate here's how you would do it:

 

Hi Nathan,

Hopefully, this may save you time and research. If you need help customizing to your environment send the running-config.

conf t

Note: You can mix and match patterns (4 digit, 10 digit, etc) similar to the destination-pattern command.
Note: IOS 15.4 or later for e164 pattern-map command

voice class e164-pattern-map 20
 e164 3324 <--- 4 digit example from PSTN --->
 e164 2227
 e164 4474
 e164 5553213324 <--- 10 digit example from PSTN --->
 e164 15553213324 <--- 11 digit example from PSTN --->
 description Calls from PSTN
!
!
Note: IOS 15.4 or later for server-group command
!
voice class server-group 20
 ipv4 <<x.x.x.x>> preference 1
 ipv4 <<x.x.x.x>> preference 2
 description PSTN_PROVIDER
!
dial-peer voice 20
 description INBOUND_FROM_PSTN
 incoming called e164-pattern-map 20
 session protocol sipv2
 dtmf-relay rtp-nte
 session server-group 20
!

Then you would add a dial-peer to route the call towards the Trunk you mentioned.

Thanks,

Just wanted to point out that the suggested command is only applicable on voip dial peers, so if your PSTN facing dial peer is of the type of pots it is not applicable. For this my suggestion would be to create individual dial peers per number instead of going creative and trying to do it on one. Not pretty, but it would work.



Response Signature


Thanks for elaborating Roger.

 

I forgot to post POTs config, but can if you need it. As Roger mentioned it would have to be multiple dial-peers, but is there a specific reason you're trying to match with only one?

UrbanPeasant
Level 1
Level 1

Thanks all, I appreciate the help.

It's SIP.
The leave the incoming peer that collects the call from the PSTN trunk alone. This ITSP = this dial peer. It seems to work well there is a single peer collecting the calls.

The incoming call is matched on incoming uri via, but the number presented isn't e164 format, so  there's a translation that sets both caller and called to e164 by dropping the 0 and adding +44.
The directional handling is done on the way out (inside), off the CUBE.

What I plan to do tonight is change my current outgoing peer that uses a destination pattern range, to use a new e164 pattern map to match a range of numbers, and the handful of explicit numbers, which will then be translated and sent to the PBX.

It looks like this should work well.

 

Seems odd that this e164 map can do non e164 numbers despite its name. I'll try and keep that in mind for the future.

It can for sure do a match on any format of number(s), regardless of its name.



Response Signature