12-04-2020 08:03 AM
Hello,
I have a cisco callmanager express and the SIP provider gives us the following range number to be used to make outside calls. the range is from 555091900 to 555091999.These numbers are configured on users IPhones as an extension for making outside calls. Now we have purchase a billing application to manage our calling expenses but to install the application we need to strip the SIP numbers digit to 05 digits. This is because the application supports 05 digits.
So how to strip these 09 digits numbers to 04 digits numbers so that the users with the new 04 digits numbers can still make outside calls and is reachable from outside.
Example:
Let say a user has the number 555091901 on his iphone to make outside calls and is reachable from outside with the same number through SIP trunk. let strip this number to 91901 and configured it on iphone.
How this user can still make outside calls and be reachable at the same time?
Thank you.
Solved! Go to Solution.
12-04-2020 08:41 AM - edited 12-04-2020 09:21 AM
Try below config. and configure 5 digit extension for the users.
Voice translation-rule 1
rule 1 /^5550\(91...$\)/ /\1/ >>>> Translate 9 Digit to 5 digit this will be used when call comes inside
!
voice translation-rule 2
rule 1 /\(^91...$\)/ /5550\1/ >>>> Translate 5 Digit to 9 digit this will be used when call goes outside
!
!
!
voice translation-profile in
translate called 1
!
voice translation-profile out
translate calling 2
!
!
dial-peer voice 1 voip >>>> incoming Dial-peer
description ***ALL INCOMING***
translation-profile incoming in
incoming called-number .
dial-peer voice 2 voip >>> Outgoing dial-peer
description ##DIAL_PEER_GSM##
translation-profile outgoing out
destination-pattern 9[79].......
session target ipv4:XX.XX.XX.XX
!
12-04-2020 08:33 AM
Pretty simple, you would use voice translation rules. You’ll need one that strips the long numbers down to the short for ingress calls and then you need to do the reverse for calls in the egress direction.
12-04-2020 08:41 AM - edited 12-04-2020 09:21 AM
Try below config. and configure 5 digit extension for the users.
Voice translation-rule 1
rule 1 /^5550\(91...$\)/ /\1/ >>>> Translate 9 Digit to 5 digit this will be used when call comes inside
!
voice translation-rule 2
rule 1 /\(^91...$\)/ /5550\1/ >>>> Translate 5 Digit to 9 digit this will be used when call goes outside
!
!
!
voice translation-profile in
translate called 1
!
voice translation-profile out
translate calling 2
!
!
dial-peer voice 1 voip >>>> incoming Dial-peer
description ***ALL INCOMING***
translation-profile incoming in
incoming called-number .
dial-peer voice 2 voip >>> Outgoing dial-peer
description ##DIAL_PEER_GSM##
translation-profile outgoing out
destination-pattern 9[79].......
session target ipv4:XX.XX.XX.XX
!
12-04-2020 08:52 AM
Details, but your rules you created translate to/from 5 digits and your explanation text says 4 digits.
12-04-2020 09:25 AM
Hello Roger,
You are right it is to in strip to 05 digits
12-04-2020 10:03 AM
Is there any specific reason for writing 05 instead of 5?
12-04-2020 10:57 AM
No specific reason Roger
05=5
12-04-2020 09:27 AM
Hello Nithin,
You have understood my needs it is 05 digits instead of 04 digits as said earlier. I will try your solution asap and let you know.
Thanks
12-08-2020 03:30 AM
Hello Nithin,
Your solution was very helpfull but I have just adjust configuration dial peer.
Thank you
12-08-2020 07:28 AM
@henriprisodjango Sorry for pointing out the obvious, but isn't it expected that you can't actually expect that you could take a suggested change and implement that without any adoption to fit into your specific configuration, anyway not when you haven't shared any piece of information about your setup?
12-09-2020 02:20 AM
@Roger Kallberg What do you mean? The solution given by @Nithin Eluvathingal was helpfull although I have ajusted the configuration. The adjustments were done on dial-peer. I have applied the two translations profile on all diall-peer.
Exemple:
dial-peer voice 1 voip
description outgoing call to SIP TRUNK
translation-profile incoming in
translation-profile outgoing out
destination-pattern 222......
session protocol sipv2
session target ipv4:XX.XX.XX.XX
voice-class codec 1
dtmf-relay rtp-nte
no vad
I have done this to every destination-pattern and the user can call outside using 5 digits numbers and can be reachable from outside with the 9 digits numbers.
I did not use this
dial-peer voice 1 voip >>>> incoming Dial-peer
description ***ALL INCOMING***
translation-profile incoming in
incoming called-number .
12-09-2020 03:27 AM - edited 12-09-2020 03:28 AM
@henriprisodjango wrote:
Your solution was very helpfull but I have just adjust configuration dial peer.
You wrote this.
What I mean is as you did not share any details on your configuration @Nithin Eluvathingal could not have known what dial peer(s) you use. So at a minimum that would be something that you you're self would need to put some effort on to adopt to fit to your needs.
12-09-2020 03:36 AM
@Roger Kallberg Ok I understand. Anyway thanks for all.
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