cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
584
Views
0
Helpful
2
Replies

CUBE dial-peer question

MrMartin
Level 1
Level 1

Hey!
I am learning Cisco CUBE and various functions before we install in our production environment.

I have managed to setup two PBX, two CUBE and two IP phone. And i can seup calls between the phones with matching on called-number and destionation-pattern (as configuration example below).

But i would like to match the destination on URI, for example 172.16.10.30 (My PBX2)

How do i achieve that? because when i debug and looks at the SIP message header the "TO" field is my default gateway.

 

INVITE sip:223344@192.168.50.21:5060 SIP/2.0

Via: SIP/2.0/UDP 192.168.50.1:5060;branch=z9hG4bK811BE5

Remote-Party-ID: "MicroSIP1" <sip:555444@192.168.50.1>;party=calling;screen=no;privacy=off

From: "MicroSIP1" <sip:555444@192.168.50.1>;tag=5279030-235E

To: <sip:223344@192.168.50.21>

Date: Wed, 16 Mar 2022 12:50:12 GMT

Call-ID: 73F6FB56-A45E11EC-88C2BE8A-296F00AF@192.168.50.1

Supported: 100rel,timer,resource-priority,replaces,sdp-anat

Min-SE: 1800

Cisco-Guid: 1945535980-2757628396-2294070922-0695140527

User-Agent: Cisco-SIPGateway/IOS-17.3.4a

Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER

CSeq: 101 INVITE

Timestamp: 1647435012

Contact: <sip:555444@192.168.50.1:5060>

Expires: 180

Allow-Events: telephone-event

Max-Forwards: 69

Session-ID: df81484d65445ab7bb619e966f2b287d;remote=00000000000000000000000000000000

Session-Expires: 1800

Content-Type: application/sdp

Content-Disposition: session;handling=required

Content-Length: 309

 

 

Router 1.

dial-peer voice 100 voip

description inbound LAN

session protocol sipv2

incoming called-number 55....                     

voice-class sip bind control source-interface GigabitEthernet2

voice-class sip bind media source-interface GigabitEthernet2

codec transparent

no vad

!

dial-peer voice 101 voip

description outbound LAN

destination-pattern 223344

session protocol sipv2

session target ipv4:192.168.10.20

voice-class sip bind control source-interface GigabitEthernet2

voice-class sip bind media source-interface GigabitEthernet2

codec transparent

no vad

!

dial-peer voice 200 voip

description outbound WAN

destination-pattern 55....

session protocol sipv2

session target ipv4:192.168.50.1

voice-class sip bind control source-interface GigabitEthernet1

voice-class sip bind media source-interface GigabitEthernet1

codec transparent

no vad

!

dial-peer voice 201 voip

session protocol sipv2

incoming uri from 1000

voice-class sip bind control source-interface GigabitEthernet1

voice-class sip bind media source-interface GigabitEthernet1

codec transparent

no vad

!

 

 

 

voice setup.png

2 Replies 2

Have a look at this great document for details on dial peer configuration.

In general my recommendation would be to use information in the via header for inbound dial peer match.



Response Signature


Based on your shared information this would be my suggested configuration for router 1.

Router 1
voice class e164-pattern-map 1
 description E164 Pattern Map for called number to PBX1
  e164 22....
!
voice class e164-pattern-map 2
 description E164 Pattern Map for called number to PBX2
  e164 55....
!
voice class uri PBX1 sip
 host ipv4:192.168.10.20
!
voice class uri PBX2 sip
 host ipv4:192.168.50.1
!
voice class codec 1
 codec preference 1 g711alaw
 codec preference 2 g711ulaw
!
dial-peer voice 100 voip
 description *** Inbound LAN from PBX1 ***
 session protocol sipv2
 incoming uri via PBX1                     
 voice-class codec 1
 voice-class sip bind control source-interface GigabitEthernet2
 voice-class sip bind media source-interface GigabitEthernet2
 no vad
!
dial-peer voice 101 voip
 description *** Outbound LAN to PBX1 ***
 destination e164-pattern-map 1
 session protocol sipv2
 session target ipv4:192.168.10.20
 voice-class codec 1
 voice-class sip options-keepalive
 voice-class sip bind control source-interface GigabitEthernet2
 voice-class sip bind media source-interface GigabitEthernet2
 no vad
!
dial-peer voice 200 voip
 description *** Inbound WAN from PBX2 ***
 session protocol sipv2
 incoming uri via PBX2
 voice-class codec 1
 voice-class sip bind control source-interface GigabitEthernet1
 voice-class sip bind media source-interface GigabitEthernet1
 no vad
!
dial-peer voice 201 voip
 description *** Outbound WAN to PBX2 ***
 destination e164-pattern-map 2
 session protocol sipv2
 session target ipv4:192.168.50.1
 voice-class codec 1
 voice-class sip options-keepalive
 voice-class sip bind control source-interface GigabitEthernet1
 voice-class sip bind media source-interface GigabitEthernet1
 no vad


Response Signature