05-26-2010 12:46 PM - edited 03-15-2019 10:57 PM
I need to re-route calls into my H323 gateway based upon
the ANI. Can this be done? I know you can block the calls but not sure if I can re-route them to a different extension.
05-27-2010 06:00 AM
You can route calls on the incoming dial peer by matching using the 'answer-address'. This will match the ani of the caller. You can then use translation rules to change the called number within that dial peer.
Hope this helps
Rick
05-27-2010 08:25 AM
I cant seem to get it to work, no matter what phone I call from it matches the dial-peer and tran
slates. Doesnt seem to look at the ANI at all when callign from 2 different phnoes with different ANI's. Assume 6666 is the main number but I want any call from 1000 to go to 7717 and not 6666 and any other call to ring 6666.
Here is the config:
voice translation-rule 1
rule 1 /6666/ /7717/
!
!
voice translation-profile XfertoFax
translate called 1
!
!
dial-peer voice 12345 voip
translation-profile outgoing XfertoFax
answer-address 1000
destination-pattern 6666
session target ipv4:10.200.10.10
codec g711ulaw
05-27-2010 09:20 AM
It's not a match all, it's a match any. If you have:
dial-peer voice 12345 voiptranslation-profile outgoing XfertoFax
answer-address 1000
destination-pattern 6666
session target ipv4:10.200.10.10
codec g711ulaw
It's going to match on the called number 6666 or the calling number 1000.
The matching order is:
1 - match incoming called number
2 - match answer address
3 - match destination pattern
Once you match a dial peer with one of these, it will route. So you would need one dial-peer for each of your different answer addresses.
Also, this needs to be on the Incoming dial peer, I'm assuming this is coming from a pots line, so it would need to be on the pots dial-peer.
Hope this helps
Rick
05-27-2010 09:53 AM
This is a test gateway where I am calling in/out to IP Phones. If I dial from my 2 phones, I match the appropriate incoming dial-peer but it seems to randomly choose one or the other dial-peer for outbound and translation and the translated number rings. Not sure how I can force the dest-pattern for outgoing.
XfertoFax should be: Dial 6666 --> 7617 if dialed from Ext.1000
Forward should be: Dial 6666 --> 2000 if dialed from Ext 7263
Latest Config:
dial-peer voice 12345 voip
translation-profile outgoing XfertoFax
answer-address 1000
destination-pattern 6666
session target ipv4:10.200.10.10
codec g711ulaw
!
dial-peer voice 54321 voip
translation-profile outgoing Forward
answer-address 7263
destination-pattern 6666
session target ipv4:10.200.10.10
codec g711ulaw
Thanks for your input.
05-27-2010 10:03 AM
It sounds like it's matching on the destination-pattern which is the same on both. Since you don't have a preference set, it's going to round robin between the two.
Note, you need to match on the answer-address on the incoming dial-peer. Having it on the outgoing dial-peer won't do anything. So match by the answer address and translate your called number both on the incoming dial-peer, then have two separate outgoing dial-peers to send the resulting pattern to your device.
Hope this helps
Rick
05-28-2010 05:37 AM
I was reading this wonderful discussion with the idea 'routing against calling#', let me have an input here. Think of two call-legs, one is incoming which will match your calling# and will change your called# by translation-rule, second is the outgoing dial-peer with the converted called#. So your configuration might look like below:
incoming call-leg
------------------------
!
dial-peer voice 1 voip
incoming called-number .
answer-address 1111 !!! in case 1111 is the ANI
translation-profile incoming Xslate-Called-1
!
voice translation-rule 1
rule 1 // /2222/
voice translation-profile Xslate-Called-1
translate called 1
!
outgoing call-leg (minimum configuration)
--------------------------------------------------------
!
dial-peer voice 2 voip
destinationation-pattern 2222
session target ipv4: x.x.x.x
!
But you have to create multiple dial-peers for individual calling# pattern.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide