[cisco-voip] CCM Express Ext. to PSTN and PSTN to Ext.

Ryan West rwest at zyedge.com
Tue Apr 22 09:15:49 EDT 2008


Here you go, just place this into a voice translation-rule

rule 1 /^9\(.*\)/ /\1/

-ryan

From: Mark Mclean [mailto:m.mclean08 at gmail.com]
Sent: Tuesday, April 22, 2008 9:12 AM
To: Ryan West
Cc: cisco-voip at puck.nether.net
Subject: Re: [cisco-voip] CCM Express Ext. to PSTN and PSTN to Ext.

How can this be done for the outbound translation rule you gave me:

voice translation-rule 2
 rule 1 /^100/ /8529x70/
 rule 2  /^\(.*\)/ /8529\1/

Regards,
Tamer

On Tue, Apr 22, 2008 at 3:07 PM, Ryan West <rwest at zyedge.com<mailto:rwest at zyedge.com>> wrote:

Since you are already deeply in bed with translation patterns, I would just continue on that route, even if you use a variable length destination-pattern match, you'll still need to use a translation pattern to strip out the 9 for international calling.



From: Mark Mclean [mailto:m.mclean08 at gmail.com<mailto:m.mclean08 at gmail.com>]
Sent: Tuesday, April 22, 2008 9:05 AM

To: Ryan West
Cc: cisco-voip at puck.nether.net<mailto:cisco-voip at puck.nether.net>
Subject: Re: [cisco-voip] CCM Express Ext. to PSTN and PSTN to Ext.



Ryan, sorry i can follow you, but why should i do this? i guess the 9 in the destination-pattern should be removed by defualt! is that correct?





On Tue, Apr 22, 2008 at 2:47 PM, Ryan West <rwest at zyedge.com<mailto:rwest at zyedge.com>> wrote:

Mark,



You can use a outbound called number translation to search on 9/.*/ and then replace that with the number without 9 or you can create multiple outbound peers, which will also help with outbound interdigit timeout issues.  Or you can use the secondary-dialtone under the telephony-service section to accomplish that as well, I think :)



-ryan







From: Mark Mclean [mailto:m.mclean08 at gmail.com<mailto:m.mclean08 at gmail.com>]
Sent: Tuesday, April 22, 2008 8:39 AM

To: Ryan West
Cc: cisco-voip at puck.nether.net<mailto:cisco-voip at puck.nether.net>
Subject: Re: [cisco-voip] CCM Express Ext. to PSTN and PSTN to Ext.



Dear Ryan,

I applied the configurations and everything looks fine, however i have a simple problem, the internal extensions when they try to place an outbound call they dial 9 the problem is that the dial-peer voice 111 forward the 9 to the PSTN without removing it.
Here is the dial-peer config:



!
dial-peer voice 111 pots
 description "Outbound PSTN"
 translation-profile outgoing my-profile
 destination-pattern 9T
 direct inward-dial
 no digit-strip
 port 0/1/0:15
 forward-digits all
!
Thanks for the support...

Regards,

Mark





On Mon, Apr 21, 2008 at 3:49 PM, Mark Mclean <m.mclean08 at gmail.com<mailto:m.mclean08 at gmail.com>> wrote:

Thanks, i will test and update you...

Mark

On Mon, Apr 21, 2008 at 3:45 PM, Ryan West <rwest at zyedge.com<mailto:rwest at zyedge.com>> wrote:

Yes to the first 2 questions.  Change the translation profile to an inbound and outbound profile and then change dial-peer voice 112 pots to something like this:



 dial-peer voice 112 pots
 description "Inbound PSTN"

 translation-profile incoming my-profile-inbound

 preference 0
 incoming-called number .

 direct inward-dial

 no digit-strip
 port 0/3/0:15
 forward-digits all



voice translation-profile my-profile-inbound

 translated called 1





-ryan



From: Mark Mclean [mailto:m.mclean08 at gmail.com<mailto:m.mclean08 at gmail.com>]
Sent: Monday, April 21, 2008 9:40 AM
To: Ryan West
Cc: cisco-voip at puck.nether.net<mailto:cisco-voip at puck.nether.net>
Subject: Re: [cisco-voip] CCM Express Ext. to PSTN and PSTN to Ext.



Thanks, Mark for you response, but please accept my apologies as i do not understand the part for the translation!

>From your example; i guess using voice translation-rule 1 will route the inbound calls from the PSTN to the internal extensions, please correct me if i am wrong!



And what about voice translation-rule 2, the 1st line ( rule 1 /^100/ /8529x70/  ) does it mean the outgoing call from ext 100 will go to the PSTN using 8529xx70 ? and the 2nd line ( rule 2  /^\(.*\)/ /8529\1/    ) does it mean whatever the internal ext. is just use it after 8529xx and send this called ID to the PSTN?



And the final question, how can i use this under the dial peer? should be something like this:



!
dial-peer voice 111 pots
 description "Outbound PSTN"
 translation-profile outgoing my-profile

 preference 0
 destination-pattern .T
 no digit-strip
 port 0/3/0:15
 forward-digits all
!

!
dial-peer voice 112 pots
 description "Inbound PSTN"
 translation-profile incoming my-profile

 preference 0
 destination-pattern .T
 no digit-strip
 port 0/3/0:15
 forward-digits all
!

Thanks again...

Marks

On Mon, Apr 21, 2008 at 2:54 PM, Ryan West <rwest at zyedge.com<mailto:rwest at zyedge.com>> wrote:

Mark,



You can accomplish the desired configuration by removing 'dialplan-pattern 1 21850.. extension-length 2' and going with an inbound and outbound translation / number expansion pattern.  You should really try to have some of the numbers match their external DIDs, overall it is much easier to program that way and more difficult to troubleshoot later.  Most of the time, setting the expectation of the customer that they will have new internal extensions is really not that big of a deal.



voice translation-rule 1

 rule 1 /^8529x70/ /100/

 rule 2 /^8529x88/ /100/

 rule 3 /^8529x71/ /some fax number/

......

....

...

...

..



voice translation-rule 2

 rule 1 /^100/ /8529x70/

 rule 2  /^\(.*\)/ /8529\1/



voice translation-profile my-profile

 translate calling 2

 translate called 1



As you can see, you're going to keep creating these rules.  The rules are called from voice translation-profiles which are applied to the dial-peer(s) going to and from the PSTN.  In a simplified configuration, you could use a single dial-peer to perform the translation in either direction.



-ryan



From: cisco-voip-bounces at puck.nether.net<mailto:cisco-voip-bounces at puck.nether.net> [mailto:cisco-voip-bounces at puck.nether.net<mailto:cisco-voip-bounces at puck.nether.net>] On Behalf Of Mark Mclean
Sent: Monday, April 21, 2008 7:38 AM
To: cisco-voip at puck.nether.net<mailto:cisco-voip at puck.nether.net>
Subject: [cisco-voip] CCM Express Ext. to PSTN and PSTN to Ext.



Dear All,



I have a Cisco Router acting as Call Manager Express, I am new to the Cisco voice solutions and I would like to acheive the following (my current configuration included below)



The PSTN trunk telephone number range is  8529xx70 to 8529xx99 (30 numbers) and the provider only sends 7 digits as DNIS.



 *   Internal Ext. should be able to call each other

 *   There will be direct numbers where 8529xx70 will be routed to extension 100, and 8529xx88 to extension 100 as well,

 *   The following number 8529xx71 to be routed to a FAX

 *   Plus each one will have one or more direct numbers from the range above

One more questions I want to ask, How to make it possible to place a caller ID that will depend on the party who initiate the call? For example when extension 177 dial out using the PSTN trunk the prime number "8529xx70" will be sent, what i want to do is if extension 107 dial out to the PSTN the caller ID will be sent as 8529xx77.



Note: The current configurations inculded below...

Apprecieate you quick replies!

Thanks,

Mark

---------------------------------------------------------------------------------

!
version 12.4
service timestamps debug datetime msec localtime
service timestamps log datetime msec localtime
service password-encryption
!
hostname CallManagerExpress
!
boot-start-marker
boot-end-marker
!
logging buffered 16000 debugging
!
aaa new-model
!
!
aaa authentication banner ^CC
                Unauthorized access is not allowed

aaa authentication login default local
aaa authentication enable default none
aaa authorization exec default local
aaa authorization network default local
!
aaa session-id common
!
resource policy
!
clock timezone EST 1
clock summer-time EST recurring last Sun Mar 2:00 last Sun Oct 3:00
no network-clock-participate wic 3
ip subnet-zero
!
!
ip cef
no ip dhcp use vrf connected
ip dhcp excluded-address 192.168.45.1<http://192.168.45.1/> 192.168.45.4<http://192.168.45.4/>
!
ip dhcp pool ip-voice-HK
   network 192.168.45.0<http://192.168.45.0/> 255.255.255.0<http://255.255.255.0/>
   default-router 192.168.45.1<http://192.168.45.1/>
   option 150 ip 192.168.45.1<http://192.168.45.1/>
   domain-name yourdomain.com<http://yourdomain.com/>
!
!
ip tftp source-interface Loopback2
ip domain name yourdomain.com<http://yourdomain.com/>
ip dhcp-server 192.168.45.1<http://192.168.45.1/>
isdn switch-type primary-net5
!
!
trunk group  bri
!
!
trunk group  1
!
voice-card 0
 no dspfarm
!
!
voice call convert-discpi-to-prog
!
voice service voip
 h323
  h245 caps mode restricted
!
!
voice class codec 1
 codec preference 1 g711alaw
 codec preference 2 g729r8
 codec preference 3 g711ulaw
 codec preference 4 g723ar63
!
!
!
voice class h323 1
  call start slow
!
!
!
crypto pki trustpoint TP-self-signed-84563672238598
 enrollment selfsigned
 subject-name cn=IOS-Self-Signed-Certificate-84563672238598
 revocation-check none
rsakeypair TP-self-signed-84563672238598
!
!
crypto pki certificate chain TP-self-signed-84563672238598
 certificate self-signed 01
!
!
controller E1 0/3/0
pri-group timeslots 1-31
 framing NO-CRC4
!
!
interface Loopback2
 no ip address
!
interface GigabitEthernet0/0
 description Voice
 no ip address
 duplex auto
 speed auto
 h323-gateway voip interface
!
interface GigabitEthernet0/0.44
 encapsulation dot1Q 44
ip address 192.168.45.1<http://192.168.45.1/> 255.255.255.0<http://255.255.255.0/>
 no snmp trap link-status
!
interface GigabitEthernet0/1
 description Data
 ip address 192.168.40.4<http://192.168.40.4/> 255.255.255.0<http://255.255.255.0/>
 duplex auto
 speed auto
!
ip default-gateway 192.168.40.1<http://192.168.40.1/>
ip classless
ip route 0.0.0.0<http://0.0.0.0/> 0.0.0.0<http://0.0.0.0/> 192.168.40.1<http://192.168.40.1/>
!
!
ip http server
ip http access-class 23
ip http authentication local
ip http secure-server
ip http timeout-policy idle 60 life 86400 requests 10000
ip http path flash:
!
access-list 23 permit 192.168.10.0<http://192.168.10.0/> 0.0.0.7<http://0.0.0.7/>
access-list 23 permit 192.168.45.0<http://192.168.45.0/> 0.0.0.7<http://0.0.0.7/>
access-list 23 permit 192.168.45.0<http://192.168.45.0/> 0.0.0.255<http://0.0.0.255/>
no cdp log mismatch duplex
!
!
tftp-server flash:ATA030100SCCP040211A.zup
tftp-server flash:P00403020214.bin
tftp-server flash:P00307020200.bin
tftp-server flash:CP7912060000SCCP050124A.sbin
tftp-server flash:P00305000600.bin
tftp-server flash:P00305000600.sbn
tftp-server flash:P00307020200.loads
tftp-server flash:P00307020200.sb2
tftp-server flash:P00307020200.sbn
tftp-server flash:S00103020002.bin
tftp-server flash:S00104000100.sbn
tftp-server flash:CP7902060000SCCP050124A.sbin
tftp-server flash:CP7905060000SCCP050124A.sbin
tftp-server flash:CP7905060000SCCP050124A.zup
tftp-server flash:P00303020214.bin
!
control-plane
!
!
!
telephony-service
 load 7935 P00503010100
 load 7960-7940 P00303020214
 load 7914 S00103020002
 load ATA ATA030101SCCP040610A.zup
 load 7912 CP7912010200SCCP031023A.sbin
 max-ephones 30
 max-dn 150
 ip source-address 192.168.45.1<http://192.168.45.1/> port 2000
 max-redirect 8
 system message HK CallManager Express
 url services http://192.168.45.4/cisco/services.asp
 url authentication http://192.168.40.4/Authenticate.asp
 network-locale CH
time-format 24
 date-format dd-mm-yy
 create cnf-files version-stamp 7960 Nov 22 2006 11:57:52
 dialplan-pattern 1 21850.. extension-length 2
 voicemail 9948
 max-conferences 4 gain -6
 call-forward pattern .T
 test test.wav
 web admin system name admin password XXXX
 dn-webedit
 time-webedit
 transfer-system full-consult
 transfer-pattern 7..
 secondary-dialtone 0
!
!
ephone-dn  1  dual-line
 number 100
 label reception
 name reception
!
!
ephone-dn  2  dual-line
number 101
 label phone2
 name Desk2
!
!
ephone-dn  3  dual-line
 number 102
 label phone3
 name Desk3
!
!
ephone-dn  4  dual-line
 number 103
 label phone4
 name Desk4
!
!
ephone-dn  5  dual-line
 number 104
 label phone5
 name Desk5
!
!
ephone-dn  6  dual-line
 number 105
 label phone6
 name Desk6
!
!
ephone-dn  7  dual-line
 number 106
 label phone7
 name Desk7
!
!
!
!
ephone  1
 mac-address 001A.6D27.6B91
 type 7960
 button  1:1
!
!
!
ephone  2
mac-address 0004.F2E2.08CA
 type 7936
 button  1:2
!
!
!
ephone  3
 mac-address 001B.0C18.DA91
 type 7940
 button  1:3
!
!
!
ephone  4
 mac-address 001B.0C18.AC97
 type 7940
 button  1:4
!
!
!
ephone  5
 mac-address 0019.30D4.AC14
 type 7940
button  1:5
!
!
!
ephone  6
 mac-address 001B.0C18.C967
 type 7940
 button  1:6
!
!
!
ephone  7
 mac-address 001B.0C18.B8FA
 type 7940
 button  1:7
!
!
!
scheduler allocate 20000 1000
ntp clock-period 17208075
ntp server 192.168.40.1<http://192.168.40.1/>
ntp server 192.168.40.254<http://192.168.40.254/>
!
end
!

---------------------------------------------------------------------------------









-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://puck.nether.net/pipermail/cisco-voip/attachments/20080422/ac44eb90/attachment-0001.html 


More information about the cisco-voip mailing list