cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2405
Views
5
Helpful
5
Replies

CUBE Dial peer matching for SIP Refer so I can use a SIP copy-list

mmoulson1
Level 4
Level 4

We are using an external service to handle some calls. They then pass the call back to us using SIP Refer, with a message that looks like this:

REFER sip:07777777777@x.x.x.x:5061;transport=tls SIP/2.0
Via: SIP/2.0/TLS y.y.y.y:5051;alias;branch=z9hG4bKac1695937645
Max-Forwards: 70
From: <sip:888881@y.y.y.y>;tag=1c683391999
To: <sip:07777777777@x.x.x.x>;tag=7BF366BF-10CC
Call-ID: A015B57F-6EAC11EB-82ADA75C-A4B61232@z.z.z.z
CSeq: 1 REFER
Contact: <sip:y.y.y.y:5051;transport=tls>
Refer-To: <sip:888882@x.x.x.x?X-VBot=John.Smith%2CABC123%2CManchester%2C7>
User-Agent: Cisco
Content-Length: 0

 

I need to extract the "Refer-To: <sip:888882@x.x.x.x?X-VBot=John.Smith%2CABC123%2CManchester%2C7>" so I can pass this as part of a new invite for the outbound call. I was trying to achieve this with a "voice-class sip copy-list", however I can't get the inbound refer message to match against a dial-peer. From what I can see it is matching dial-peer 0.

 

I have tried:

destination uri-referred-by

incoming uri from

incoming called-number 888882

However nothing appears it to make it match.

 

Any ideas on how I can make it match or an alternative method to exact/forward the Refer-To data?

 

Many thanks.

1 Accepted Solution

Accepted Solutions

mmoulson1
Level 4
Level 4

According to TAC I am seeing dial-peer 0 in the debug as it is a potential match, the debug shows the potential matches before making a selection.

 

The CUBE receives the refer message on the outgoing dial peer of the original call (dial-peer 2 in my case). Pass-Through configuration was required to convert the "Refer-To" message received to a "Referred-By" header that is included with the new invite for the redirected call.

 

Config looks like this:

voice service voip
sip
pass-thru headers 10
!
voice class sip-hdr-passthrulist 10
passthru-hdr Referred-By
!
dial-peer voice 2 voip
voice-class sip profiles 2 inbound
!
voice class sip-profiles 2
request REFER sip-header Refer-To copy "Refer-To: (.*)" u01
request REFER sip-header Referred-By add "Referred-By: \u01"

View solution in original post

5 Replies 5

A couple of things, you absolutely need to fix that dial peer 0 is matched as that should be avoided at all cost. Look at this document for optional way to match inbound dial peer, https://www.cisco.com/c/en/us/support/docs/voice/ip-telephony-voice-over-ip-voip/211306-In-Depth-Explanation-of-Cisco-IOS-and-IO.html

Also have a look at this from the same doc.

It should be noted that by default the outgoing SIP Request-URI and To header URI are going to have the session target of the outbound-dial-peer. This can be disabled by using the command requri-passing which allows the gateway to pass the in-leg URI host portion to the out-leg instead of replacing the URI host portion with the session-target. The command requri-passing was added in 15.4(1)T and IOS-XE 3.11S.

This could be a solution to pass the request uri from the inbound to the outbound call leg without the need to use copy list functionality. If so this would be what you'd need to add.

voice service voip
 sip
  requri-passing

 



Response Signature


mmoulson1
Level 4
Level 4

I have tried again today to change round the matching on the inbound peer but nothing appears to make it match.

 

What is a little odd is the debug doesn't show an inbound peer for the refer message I see 2 outgoing peers:

Outgoing Dial-peer=0
Outgoing Dial-peer=11

 

When we pass the call out initially I see:

Incoming Dial-peer=1
Outgoing Dial-peer=2

Which is what I would expect. I'm not sure if the refer is handled differently.

Try with this.

voice class uri 2001 sip
 host ipv4:x.x.x.x !IP address that you want to match on, adopt to your need
!
dial-peer voice 2 voip !Your inbound dial peer, adopt to your need
 incoming uri request 2001

Also have a look at this presentation from Cisco Live 2016, https://www.ciscolive.com/c/dam/r/ciscolive/emea/docs/2016/pdf/BRKUCC-2934.pdf, it have some good information about how to match the inbound direction.



Response Signature


mmoulson1
Level 4
Level 4

According to TAC I am seeing dial-peer 0 in the debug as it is a potential match, the debug shows the potential matches before making a selection.

 

The CUBE receives the refer message on the outgoing dial peer of the original call (dial-peer 2 in my case). Pass-Through configuration was required to convert the "Refer-To" message received to a "Referred-By" header that is included with the new invite for the redirected call.

 

Config looks like this:

voice service voip
sip
pass-thru headers 10
!
voice class sip-hdr-passthrulist 10
passthru-hdr Referred-By
!
dial-peer voice 2 voip
voice-class sip profiles 2 inbound
!
voice class sip-profiles 2
request REFER sip-header Refer-To copy "Refer-To: (.*)" u01
request REFER sip-header Referred-By add "Referred-By: \u01"

Thank you for sharing the solution (+5).



Response Signature