Something I only just discovered today...

Wow, while taking a Lab I discovered something that I never ever knew and always took for granted that the way I thought it worked is how it works.


Session-target

on our dial-peers I think if your reading this blog you know what it does :). If your someone like me you might use it to match incoming calls based on the session target, and that can REALLY screw you, take this as an example:

dial-peer voice 1003 voip
session target ipv4:10.0.0.1
incoming called-number .T
codec g711ulaw
!
dial-peer voice 1004 voip
session target ipv4:177.1.1.1
incoming called-number .T
codec g729br8
!

SO what I am saying there is any call coming in from 10.0.0.1 use G711ulaw and any call from 177.1.1.1 use G729, that's what I am trying to do there, easy right? Well.. nope, you can't actually do that believe it or not. In my example above the first dial-peer would ALWAYS be matched and hence even 177.1.1.1 when it had an incoming call would try and use g.711 instead of g.729

Extremely confusing for me, and I thought being able to use the session target like that is fairly reasonable, I mean after all, the above config DOES work if you replaced session target with two seperate ports for example (although okay you couldn't specify a codec but lets say you applied digit manipulation on one but not the other or something smart ass :P)


Here it is straight from the Cisco horses mouth:
http://www.ciscostadium.org/application/pdf/paws/14074/in_dial_peer_match.pdf

"Assume the incoming called number (DNIS) is "81690". Dial peer 2 is matched.
dial-peer voice 1 pots
incoming called-number 8....
direct-inward-dial
!
dial-peer voice 2 pots
incoming called-number 816..
direct-inward-dial
Note: For inbound dial peers, the session target command is ignored."

I hope this helps someone out there as it had me banging my head for a while!

Cheers
Pete




No comments:

Post a Comment

Popular old posts.