In this lab we tried to use two functions translation rules and COR list
translations being used to transform the number from PSTN to local extention and COR was used to restrict the caller whom they can call or whom they cannot.
First of all we planned our dial plan, as you know we have been using two routers one is CME which have one sip and sccp phone and other router name CME-SIP that does have two SIP phones
Here, we just used one SIP Phone 4001 @ CME router and one SIP Phone 6001 @ CME-SIP router, like that;
4001--------------CME----------------CME-SIP----------------6001
below is the COR config that we used in this scenario
The below configuration for COR has been done on the CME side as needed
1) Defining cor list members
dial-peer cor custom
name local_KAR
name LD_LHR
name LongDist
name international
2) -------- Outgoing Corlists
dial-peer cor list KAR
member local_KAR
dial-peer cor list LHR
member LD_LHR
dial-peer cor list LD
member LongDist
dial-peer cor list INT
member international
3)----- incoming corlists
dial-peer cor list LongD
member local_KAR
member LD_LHR
dial-peer cor list Local
member local_KAR
4) applying outgoing corlist to dial peers
dial-peer voice 9042 voip
corlist outgoing LHR
destination-pattern 9042[39].......
session protocol sipv2
session target ipv4:172.16.1.2
dtmf-relay rtp-nte
codec g711ulaw
5) applying incoming corlist to ip phones
voice register pool 1
corlist incoming LongD
we also tried with
voice register pool 1
corlist incoming Local
When a caller dials 9042........ number it gets transformed to 042........ number basically eliminates the '9' digit so here we were emulating a PSTN call using the below translation rule and profile @ CME router
voice translation-rule 30
rule 1 /^9\(042[39].......\)/ /\1/
rule 2 /^9\([39].......\)/ /\1/
voice translation-profile lhr
translate called 30 ---- here translating a called number i.e DNIS
applying translation profile to dial-peer
dial-peer voice 9042 voip
translation-profile outgoing lhr
destination-pattern 9042[39].......
session protocol sipv2
session target ipv4:172.16.1.2
dtmf-relay rtp-nte
codec g711ulaw
corlist outgoing LHR
Now when digit passes to CME-SIP router provided the SIP Phone 4001 has the authorized cor list to continue. So when it recieves number starting from 042 it basically matches the following dial-peer;
dial-peer voice 42 voip
translation-profile incoming local_Profile
session protocol sipv2
incoming called-number 042........
dtmf-relay rtp-nte
codec g711ulaw
here u noticed we have used the translation profile so that once it matches the incoming called number it basically transforms its number to local number i.e 6001. Lets see how
voice translation-rule 500
rule 1 /^[39]......./ /5001/
rule 2 /^042[39]......./ /6001/
voice translation-profile local_Profile
translate called 500
So following the rule it matches rule 2 and rings the 6001 phone. Simple isn't it ;)
@ Cme side we tested with two incoming cor list to 4001 to test the function first we apply
voice register pool 1
corlist incoming LongD -- that basically through the call
we also tried with;
voice register pool 1
corlist incoming Local -- that basically blocked the call
HTH
Regards
No comments:
Post a Comment