cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
831
Views
15
Helpful
9
Replies

need help with dialpeers

stoofer
Level 1
Level 1

Hi guys, 

I am not an expert and struggling with a dial-peer config. What we are trying to achieve :

we have a voice gateway connected to a sip provider on one side and an old pbx connected on the other side through 2 T1's.

The pbx sends out the full number 11 digits with a 9 prexfix, on the other side the provider is sending the full +e164 number to our gateway and is expecting 10 or 11 digits back.

can somebody have a look at these dialpeers and advice any changes if needed? I have masked out the ip's.

 

thanks guys

 

 

!
trunk group Siemens_PBX
max-calls any 30
hunt-scheme sequential
!
controller T1 0/0/0
cablelength long 0db
pri-group timeslots 1-24 service mgcp
trunk-group Siemens_PBX timeslots 1-24 preference 2
!
controller T1 0/1/0
cablelength long 0db
pri-group timeslots 1-24 service mgcp
trunk-group Siemens_PBX timeslots 1-24 preference 1
!
voice translation-rule 11
rule 1 /.+\(...........\)$/ /\1/
!
voice translation-rule 21
rule 1 /^9\(.*\)/ /\1/
!
!
voice translation-profile SIP_INCOMING
translate called 11
!
voice translation-profile SIP_OUTGOING
translate called 21
!
dial-peer voice 91 voip
description *** DIAL PEER FOR OUTGOING PSTN CALLS ***
translation-profile incoming SIP_OUTGOING
destination-pattern 9T
session protocol sipv2
session target ipv4:*.*.*.*:5060
voice-class sip early-offer forced
voice-class sip bind control source-interface GigabitEthernet0/0
voice-class sip bind media source-interface GigabitEthernet0/0
dtmf-relay rtp-nte
ip qos dscp cs5 media
ip qos dscp cs4 signaling
no vad
!
dial-peer voice 911 voip
description *** DIAL PEER FOR 911CALLS ***
destination-pattern 911
session protocol sipv2
session target ipv4:*.*.*.*:5060
voice-class sip early-offer forced
voice-class sip bind control source-interface GigabitEthernet0/0
voice-class sip bind media source-interface GigabitEthernet0/0
dtmf-relay rtp-nte
ip qos dscp cs5 media
ip qos dscp cs4 signaling
no vad
!
dial-peer voice 100 voip
description *** INBOUND CALLS FROM SERVICE PROVIDER ***
translation-profile incoming SIP_INCOMING
session protocol sipv2
incoming called-number .
voice-class codec 1
dtmf-relay rtp-nte
ip qos dscp cs5 media
ip qos dscp cs4 signaling
no vad
!
dial-peer voice 1000 pots
trunkgroup Siemens_PBX
description pots calls from pbx
incoming called-number .
forward-digits all
!
dial-peer voice 2000 pots
trunkgroup Siemens_PBX
description calls to Siemens PBX
destination-pattern 1402.......
!

2 Accepted Solutions

Accepted Solutions

As a start change your translation to this.
voice translation-rule 11
rule 1 /^\+\(...........\)$/ /\1/

And modify your dial peers with this.
dial-peer voice 91 voip
translation-profile outgoing SIP_OUTGOING

Remove “forward-digits all” from your inbound POTS dial peer. It’s a command that is used on outbound POTS dial peers. Depending upon what number format you need for inbound calls to your PBX you might need to add this command to your outbound POTS dial peer.

I would also recommend to add the interface bind commands on your inbound VOIP dial peer.
voice-class sip bind control source-interface GigabitEthernet0/0
voice-class sip bind media source-interface GigabitEthernet0/0



Response Signature


View solution in original post

If the translation need is the same for both called and calling you can use the same rule as you outlined. But as you said before that the PBX sends called number with a 9 in-front wouldn’t you be better off if you rewrite the calling number to this.

If you want to do this configuration should do it for you.

voice translation-rule 12
rule 1 /^\+\(...........\)$/ /9\1/

voice translation-profile SIP_INCOMING
translate calling 12



Response Signature


View solution in original post

9 Replies 9

As a start change your translation to this.
voice translation-rule 11
rule 1 /^\+\(...........\)$/ /\1/

And modify your dial peers with this.
dial-peer voice 91 voip
translation-profile outgoing SIP_OUTGOING

Remove “forward-digits all” from your inbound POTS dial peer. It’s a command that is used on outbound POTS dial peers. Depending upon what number format you need for inbound calls to your PBX you might need to add this command to your outbound POTS dial peer.

I would also recommend to add the interface bind commands on your inbound VOIP dial peer.
voice-class sip bind control source-interface GigabitEthernet0/0
voice-class sip bind media source-interface GigabitEthernet0/0



Response Signature


stoofer
Level 1
Level 1

Hi Roger,

 

So I made the changes, now I have this  :

 

 

voice translation-rule 11
rule 1 /^\+\(...........\)$/ /\1/

 

!
dial-peer voice 91 voip
description *** DIAL PEER FOR OUTGOING PSTN CALLS ***
translation-profile outgoing SIP_OUTGOING
destination-pattern 1T
session protocol sipv2
session target ipv4:*.*.*.*:5060
voice-class sip early-offer forced
voice-class sip bind control source-interface GigabitEthernet0/0
voice-class sip bind media source-interface GigabitEthernet0/0
dtmf-relay rtp-nte
ip qos dscp cs5 media
ip qos dscp cs4 signaling
no vad
!
dial-peer voice 911 voip
description *** DIAL PEER FOR 911CALLS ***
destination-pattern 911
session protocol sipv2
session target ipv4:*.*.*.*:5060
voice-class sip early-offer forced
voice-class sip bind control source-interface GigabitEthernet0/0
voice-class sip bind media source-interface GigabitEthernet0/0
dtmf-relay rtp-nte
ip qos dscp cs5 media
ip qos dscp cs4 signaling
no vad
!
dial-peer voice 100 voip
description *** INBOUND CALLS FROM SERVICE PROVIDER ***
translation-profile incoming SIP_INCOMING
session protocol sipv2
incoming called-number .
voice-class codec 1
voice-class sip bind control source-interface GigabitEthernet0/0
voice-class sip bind media source-interface GigabitEthernet0/0
dtmf-relay rtp-nte
ip qos dscp cs5 media
ip qos dscp cs4 signaling
no vad
!
dial-peer voice 2000 pots
trunkgroup Siemens_PBX
description calls OUT from Siemens PBX
translation-profile outgoing SIP_OUTGOING
destination-pattern 9T
forward-digits all
!
dial-peer voice 1000 pots
trunkgroup Siemens_PBX
description calls to Siemens PBX
destination-pattern 1630.......
forward-digits 0
!


I have removed the "forward-digits all" from my inbound POTS dial peer by doing a "no forward-digits all", but it now shows "forward-digits 0" . Is this ok, or how can I remove that line completely ?

 

Do a forward-digits default or default forward-digits, I don't recall the exact command.
Btw by the look it seems that you mixed up what is the inbound and outbound POTS dial peers by removing the "incoming called-number ." from DP 2000. And you for some reason added the translation for SIP outbound to that dial peer.

 

Please do these changes.

 

!
dial-peer voice 1000 pots
description calls from Siemens PBX
incoming called-number .
!
dial-peer voice 2000 pots
trunkgroup Siemens_PBX
description calls to Siemens PBX
destination-pattern 1630.......
forward-digits all

 

 



Response Signature


Roger,

 

 

The pbx is sending the gateway the number in this format : 912345678901 (so a leading 9 with another 11 digits) .

should dial-peer voice 91 voip not have a "destination-pattern 9T " instead of "destination-pattern 1T" ?

 

I have the below dial-peers configured as follows. Can you have a look at these? thanks again

 

!
voice translation-rule 11
rule 1 /^\+\(...........\)$/ /\1/
!
voice translation-rule 21
rule 1 /^9\(.*\)/ /\1/
!
!
voice translation-profile SIP_INCOMING
translate called 11
!
voice translation-profile SIP_OUTGOING
translate called 21
!

!
dial-peer voice 91 voip
description *** DIAL PEER FOR OUTGOING PSTN CALLS ***
translation-profile outgoing SIP_OUTGOING
destination-pattern 1T
session protocol sipv2
session target ipv4:*.*.*.*:5060
voice-class sip early-offer forced
voice-class sip bind control source-interface GigabitEthernet0/0
voice-class sip bind media source-interface GigabitEthernet0/0
dtmf-relay rtp-nte
ip qos dscp cs5 media
ip qos dscp cs4 signaling
no vad
!
dial-peer voice 911 voip
description *** DIAL PEER FOR 911CALLS ***
destination-pattern 911
session protocol sipv2
session target ipv4:*.*.*.*:5060
voice-class sip early-offer forced
voice-class sip bind control source-interface GigabitEthernet0/0
voice-class sip bind media source-interface GigabitEthernet0/0
dtmf-relay rtp-nte
ip qos dscp cs5 media
ip qos dscp cs4 signaling
no vad
!
dial-peer voice 100 voip
description *** INBOUND CALLS FROM SERVICE PROVIDER ***
translation-profile incoming SIP_INCOMING
session protocol sipv2
incoming called-number .
voice-class codec 1
voice-class sip bind control source-interface GigabitEthernet0/0
voice-class sip bind media source-interface GigabitEthernet0/0
dtmf-relay rtp-nte
ip qos dscp cs5 media
ip qos dscp cs4 signaling
no vad
!
dial-peer voice 1000 pots
description calls from Siemens PBX
incoming called-number .
!
dial-peer voice 2000 pots
trunkgroup Siemens_PBX
description calls to Siemens PBX
destination-pattern 1630.......
forward-digits all
!

Yes it should. That’s what you had in your original post, why did you change this?



Response Signature


must have been a copy/paste error during the troubleshooting from my side indeed, I have changed dial-peer voice 91 voip back to "destination-pattern 9T " 

 

inbound calls are working btw, but the calling party information is not being send correctly, it is being sent in full +e164 format (ex. +112345678901). This results in a blank caller id on the phones on pbx side. The pbx needs the calling party number in a format without the + or +1 I think, so I guess I need a translation profile for this as well ? 

can I add it like this under my existing SIP_INCOMING profile? Or do I have to do it in another way?

!
voice translation-profile SIP_INCOMING
translate called 11

translate calling 11
!

If the translation need is the same for both called and calling you can use the same rule as you outlined. But as you said before that the PBX sends called number with a 9 in-front wouldn’t you be better off if you rewrite the calling number to this.

If you want to do this configuration should do it for you.

voice translation-rule 12
rule 1 /^\+\(...........\)$/ /9\1/

voice translation-profile SIP_INCOMING
translate calling 12



Response Signature


Extra information. You should try to use a little more precise match criteria on your inbound dial peer from your service provider than incoming called-number .

The preference would be to use information in the VIA header as outline in this document. In Depth Explanation of Cisco IOS and IOS-XE Call Routing - Cisco

An example of this would be this.

voice class uri SP sip
 host ipv4:<IP of service provider CPE>
!
dial-peer voice 100 voip
 description Incoming Dial Peer from Service Provider
 session protocol sipv2
 incoming uri via SP


Response Signature


Many thanks Roger, I will keep this last extra bit of information on the side for now. Everything works as is , so I am going to leave it for the time being !

If anything comes up, I will post again.

 

Thanks again !