Alright I tried that, but it does not get the two peers that match that destination.
Here are my peers:
dial-peer voice 1 voip
destination-pattern [2-9].........
session protocol sipv2
session target sip-server
codec g711ulaw
no vad
!
dial-peer voice 2 mmoip
service fax_on_vfc_onramp_app out-bound
destination-pattern [2-9].........
information-type fax
session target mailto:$d$@inbound.efax.beanfield.com
dsn success
!
And here is the code that prints the voice tags for each dial peer found:
1set matchcnt [object create dial-peer dp_handle:0 $DNIS]
2 puts "\nDial peers found for $DNIS: $matchcnt"
3 set peerinfo [object get dial-peer dp_handle0 voicePeerTag]
4 puts "\nDial peer voice tags for $DNIS: $peerinfo"
5
6 set peerinfo1 [object get dial-peer dp_handle1 voicePeerTag]
7 puts "\nDial peer voice tags (dp_handle1) for $DNIS: $peerinfo1"
8
9 set peersinfo [object get dial-peer dp_handle:0:$matchcnt voicePeerTag]
10 puts "\nAll dial peer voice tags for $DNIS: $peersinfo"
11
And here is the output that does not include the second dial-peer for some reason:
Dial peers found for 4165832182: 1
Dial peer voice tags for 4165832182: 1
Dial peer voice tags (dp_handle1) for 4165832182:
All dial peer voice tags for 4165832182:
I really need a handle for the dial-peer 2.