Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

Voice Gateway to Voice Gateway SIP Trunking

Hi Everyone,

Please see image below:

We are configuring SIP Trunking between VG1 and VG2 and CUCM. It will be configured only for inbound calls (calls coming from VG1, going to VG2, and lastly terminated in CUCM).

VG2 to CUCM is already configured without issues.

However, we do not have control over VG1, and still waiting for their configuration.

Right now, I just configured VG2 with outbound voip dial-peers going to CUCM.

My question is, do I need to create a separate dial-peer for inbound matching in VG2?

dial-peer voice 3 voip
destination-pattern 5553...
session protocol sipv2
session target ipv4:10.1.2.20
session transport tcp
voice-class codec 1
preference 1

I mean, in the configuration above, when a call originates from VG1, and is received in VG2, will it automatically hit dial-peer 3? If so, what is the matched inbound dial-peer? Is it the default? How can I change that? Do I have to configure a separate dial-peer for the inbound match, or should I just insert the command incoming called-number inside dial-peer 3?

Please help. Thanks!

Everyone's tags (2)
9 REPLIES
New Member

Hi, 

Hi, 

The command "destination-pattern" made to match inbound and outbound calls so in your case if the called number start with 5553 followed with any 3 digits it will route the calls to cucm. 

The command "incoming called-number" & "answer address" made to match inbound calls only. 

The recommended configuration is to use "incoming called-number" to match inbound calls and "destination-pattern" to match outbound calls. If your setup is too basic you can use "destination-pattern" to match inbound and outbound.

Also you can use "incoming called-number" and "destination-pattern" on the same dial-peer to have best match for that dial-peer.

Regards,

Muaaz

New Member

You said destination pattern

You said destination pattern is used for inbound and outbound? The dial peer will be used as outbound and call will  be routed to CUCM, then when I call from CUCM (assuming configurations are complete) going to the VG using the 5553... extensions, it will also match the destination pattern, this time as inbound dial peer matching the calling number. Is that correct?

As per recommended, if I create another dial-peer to match the inbound calls, how should I configure it? 

dial-peer voice 4 voip

incoming called-number 5553...

session protocol sipv2

session target ipv4:10.1.1.10

Is this configuration correct?

Thank you for your response.

New Member

Hi, 

Hi, 

The "destination-pattern" it is matching only called number. So when you call from cucm to VG the caller will 5553... will not match destination-pattern 5553... as this is to match called-number 

For this configuration: 

dial-peer voice 4 voip

incoming called-number 5553...

session protocol sipv2

session target ipv4:10.1.1.10

You may add destination-pattern 5553... to the configuration as best practice. 

Also you can use the same to call from cucm to VG. For example pattern 4442... in VG side you need to configure 

dial-peer voice 5 voip

incoming called-number 4442...

destination-pattern 4442...

session protocol sipv2

session target ipv4:1.1.1.1 (VG IP)

Regards, 

Muaaz


New Member

Or you can have seprate dial

Or you can have seprate dial peers for inbound calls as below:

dial-peer voice 4 voip

incoming called-number 5553...

session protocol sipv2

dial-peer voice 5 voip

destination-pattern 5553...

session protocol sipv2

session target ipv4:10.1.1.10

Both are correct configuration

Regards, 

Muaaz

On inbound dial peers,

On inbound dial peers, "destination-pattern" will match the calling number, not the called number. Best practice is to use one dial peer for inbound, one for outbound. I recommend you create a second dial peer using "incoming called-number" for your inbound leg. Without this configuration, the call will match default dial peer 0. The downside to this match is that you have no control over codec, etc.

Brandon

New Member

I agree with that since I

I agree with that since I also read documents on dial peers. Can I use incoming called-number instead? I think answer address command is for calling party number right? Or can I point it to the IP Address of VG1 using the command answer address

Thank you

Sorry, I meant to say

Sorry, I meant to say "incoming called-number". I just corrected the previous post. So, something like:

dial-peer voice 2 voip
incoming called-number 5553...
session protocol sipv2
session transport tcp
voice-class codec 1

dial-peer voice 3 voip
destination-pattern 5553...
session protocol sipv2
session target ipv4:10.1.2.20
session transport tcp
voice-class codec 1
preference 1

You will also need:

voice service voip
allow-connections sip to sip

New Member

Wow thank you for the sample

Wow thank you for the sample configuration. I have a question though, in your configuration of dial-peer 2, it has no session target command? Does that mean that session target command only works for outbound dial-peers? So in this configuration, wherever the call came from, as long as it matched the dial-peer 2 with the incoming called-number, it will route the call?

Another question is, is there a way to disable the default dial peer? And calls will not be routed whenever there is no configured inbound dial-peer to match the call?

No need for session target on

No need for session target on the inbound dial peer. Dial peers will be matched on incoming called number, answer address, destination pattern, port, default dial peer in that order. See the link below for further explatation.

No way to disable the default dial peer to my knowledge.

https://www.cisco.com/c/en/us/support/docs/voice/call-routing-dial-plans/14074-in-dial-peer-match.html

5
Views
0
Helpful
9
Replies