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

CUBE with SIP REFER

Aubin Gouthon
Level 1
Level 1

Hello Guys, 

I'm trying to make SIP REFER work on CUBE but no luck. What am I missing? 

When CUBE receives the REFER message, it sends "SIP/2.0 400 Bad Request"

The goal is to get the CUBE to send an INVITE to the address in the REFER-TO header. 

I do have the following commands on the inbound dial-peer:

-no supplementary-service sip refer 

-refer consume

 

This is the REFER message received:

REFER sip:5167@10.154.25.50:5060 SIP/2.0
Via: SIP/2.0/UDP 10.140.175.244;rport;branch=z9hG4bKr2cKN3g0FS8Xp
Max-Forwards: 70
From: <sip:1418@10.140.175.244>;tag=aZ3mB0cXp7m0K
To: "Softnet." <sip:5167@10.154.25.50>;tag=C0AB0034-1EEA
Call-ID: 6E76D4A3-C85B11EA-8838EA6E-8E8920FA@10.154.25.50
CSeq: 22994694 REFER
Contact: <sip:1418@10.140.175.244:5060;transport=udp>
User-Agent: FreeSWITCH-mod_sofia/1.8.6~64bit
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
Refer-To: <3711346@10.154.25.50>
Referred-By: <sip:10.140.175.244>
Content-Length: 0
X-Route: ad_reset

 

 

And CUBE responds with this:
SIP/2.0 400 Bad Request
Via: SIP/2.0/UDP 10.140.175.244;rport;branch=z9hG4bKr2cKN3g0FS8Xp
From: <sip:1418@10.140.175.244>;tag=aZ3mB0cXp7m0K
To: "Softnet" <sip:5167@10.154.25.50>;tag=C0AB0034-1EEA
Date: Sat, 18 Jul 2020 18:29:32 GMT
Call-ID: 6E76D4A3-C85B11EA-8838EA6E-8E8920FA@10.154.25.50
Server: Cisco-SIPGateway/IOS-15.4.3.M3
CSeq: 22994694 REFER
Content-Length: 0
Contact: <sip:5167@10.154.25.50:5060>

 

10 Replies 10

Jonathan Schulenberg
Hall of Fame
Hall of Fame

If memory serves, REFER handling is off by default. You need to enable it with supplementary-service sip refer.

https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/voice/cube_sip/configuration/15-mt/cube-sip-15-mt-book/voi-cub-sip-dyn-refer-handling.html

Hi Jonathan,

I have the command:
no supplementary-service sip refer in dial-peer configuration mode.
This is for the REFER consumption, an INVITE should be sent towards the
Refer-to dial peer.

Ah right. Assuming that you already verified the call legs are matching the dial-peers you expect them to, does CUBE have an outbound dial-peer match for the Refer-to header?
Refer-To: <3711346@10.154.25.50>

Yes I have an outbound Dial-peer for the destination URI
3711346@10.154.25.50
Could this be due to the Referred-By header Referred-By:
10.140.175.244> ?
Is CUBE expecting an URI in this format : user@IP ?
10.140.175.244>

By default CUBE will only consume the user/LHS of that URI and route it like any other numeric destination. The outbound dial-peer would need to be destination-pattern 3711346

If you really want to route the full URI you'll need to turn on requri-passing.

https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/voice/cube/configuration/cube-book/sip-supp-uri-based-dialing.html

Jul 21 00:37:32.173: //16624339/5BCD33800192/SIP/Msg/ccsipDisplayMsg:
Sent:
INVITE sip:1418@10.140.175.244:5060 SIP/2.0
Via: SIP/2.0/UDP 10.154.25.50:5060;branch=z9hG4bKC4B19824D0
From: "Aubin Gouthon" 5167>;tag=CC488E8C-1FA8
To: 1418>
Date: Tue, 21 Jul 2020 00:37:32 GMT
Call-ID: 32B539DA-CA2111EA-8521EA6E-8E8920FA@10.154.25.50
Supported: 100rel,timer,resource-priority,replaces,sdp-anat
Min-SE: 1800
Cisco-Guid: 1540174720-0000065536-0026409451-1696176906
User-Agent: Cisco-SIPGateway/IOS-15.4.3.M3
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
CSeq: 101 INVITE
Timestamp: 1595291852
Contact: 5167>
Expires: 180
Allow-Events: telephone-event
Max-Forwards: 68
P-Asserted-Identity: "Aubin Gouthon" 5167>
Privacy: none
Session-Expires: 1800
Content-Type: application/sdp
Content-Disposition: session;handling=required
Content-Length: 245
v=0
o=CiscoSystemsSIP-GW-UserAgent 66 2427 IN IP4 10.154.25.50
s=SIP Call
c=IN IP4 10.154.25.50
t=0 0
m=audio 19074 RTP/AVP 0 101
c=IN IP4 10.154.25.50
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20


Timestamp: 3678136652173
UTC Timestamp:3678136652173

Jul 21 00:37:32.173: //16624339/5BCD33800192/SIP/Msg/ccsipDisplayMsg:
Received:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.154.25.50:5060;branch=z9hG4bKC4B19824D0
From: "Aubin Gouthon" 5167>;tag=CC488E8C-1FA8
To: 1418>
Call-ID: 32B539DA-CA2111EA-8521EA6E-8E8920FA@10.154.25.50
CSeq: 101 INVITE
Timestamp: 1595291852 0.000088
User-Agent: FreeSWITCH-mod_sofia/1.8.6~64bit
Content-Length: 0


Timestamp: 3678136652173
UTC Timestamp:3678136652173

Jul 21 00:37:32.173: //16624339/5BCD33800192/SIP/Msg/ccsipDisplayMsg:
Received:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.154.25.50:5060;branch=z9hG4bKC4B19824D0
From: "Aubin Gouthon" 5167>;tag=CC488E8C-1FA8
To: 1418>
Call-ID: 32B539DA-CA2111EA-8521EA6E-8E8920FA@10.154.25.50
CSeq: 101 INVITE
User-Agent: FreeSWITCH-mod_sofia/1.8.6~64bit
Content-Length: 0


Timestamp: 3678136652173
UTC Timestamp:3678136652173

Jul 21 00:37:32.177: //16624339/5BCD33800192/SIP/Msg/ccsipDisplayMsg:
Received:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.154.25.50:5060;branch=z9hG4bKC4B19824D0
From: "Aubin Gouthon" 5167>;tag=CC488E8C-1FA8
To: 1418>;tag=XQSmFScUDBg5j
Call-ID: 32B539DA-CA2111EA-8521EA6E-8E8920FA@10.154.25.50
CSeq: 101 INVITE
Contact: 1418>
User-Agent: FreeSWITCH-mod_sofia/1.8.6~64bit
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Require: timer
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-descrip tion, presence.winfo, message-summary, refer
Session-Expires: 1800;refresher=uac
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 251
P-Asserted-Identity: "1418" 1418>
v=0
o=FreeSWITCH 1595269176 1595269177 IN IP4 10.140.175.244
s=FreeSWITCH
c=IN IP4 10.140.175.244
t=0 0
m=audio 22676 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20


Timestamp: 3678136652177
UTC Timestamp:3678136652177

Jul 21 00:37:32.181: //16624339/5BCD33800192/SIP/Msg/ccsipDisplayMsg:
Sent:
ACK sip:1418@10.140.175.244:5060;transport=udp SIP/2.0
Via: SIP/2.0/UDP 10.154.25.50:5060;branch=z9hG4bKC4B19916A3
From: "Aubin Gouthon" 5167>;tag=CC488E8C-1FA8
To: 1418>;tag=XQSmFScUDBg5j
Date: Tue, 21 Jul 2020 00:37:32 GMT
Call-ID: 32B539DA-CA2111EA-8521EA6E-8E8920FA@10.154.25.50
Max-Forwards: 70
CSeq: 101 ACK
Allow-Events: telephone-event
Privacy: none
Content-Length: 0


Timestamp: 3678136652181
UTC Timestamp:3678136652181

Jul 21 00:37:34.677: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:
REFER sip:5167@10.154.25.50:5060 SIP/2.0
Via: SIP/2.0/UDP 10.140.175.244;rport;branch=z9hG4bKQU5c5BpySa4Qg
Max-Forwards: 70
From: 1418>;tag=XQSmFScUDBg5j
To: "Aubin Gouthon" 5167>;tag=CC488E8C-1FA8
Call-ID: 32B539DA-CA2111EA-8521EA6E-8E8920FA@10.154.25.50
CSeq: 23092135 REFER
Contact: 1418>
User-Agent: FreeSWITCH-mod_sofia/1.8.6~64bit
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
Refer-To: <3711346@10.10.140.150.101>
Referred-By: 10.140.175.244>
Content-Length: 0
X-Route: ad_reset


Timestamp: 3678136654677
UTC Timestamp:3678136654677

Jul 21 00:37:34.677: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Sent:
SIP/2.0 400 Bad Request
Via: SIP/2.0/UDP 10.140.175.244;rport;branch=z9hG4bKQU5c5BpySa4Qg
From: 1418>;tag=XQSmFScUDBg5j
To: "Aubin Gouthon" 5167>;tag=CC488E8C-1FA8
Date: Tue, 21 Jul 2020 00:37:34 GMT
Call-ID: 32B539DA-CA2111EA-8521EA6E-8E8920FA@10.154.25.50
Server: Cisco-SIPGateway/IOS-15.4.3.M3
CSeq: 23092135 REFER
Content-Length: 0
Contact: 5167>


Timestamp: 3678136654677
UTC Timestamp:3678136654677

Jul 21 00:37:44.082: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:
BYE sip:5167@10.154.25.50:5060 SIP/2.0
Via: SIP/2.0/UDP 10.140.175.244;rport;branch=z9hG4bKr4y56661pKtac
Max-Forwards: 70
From: 1418>;tag=XQSmFScUDBg5j
To: "Aubin Gouthon" 5167>;tag=CC488E8C-1FA8
Call-ID: 32B539DA-CA2111EA-8521EA6E-8E8920FA@10.154.25.50
CSeq: 23092136 BYE
User-Agent: FreeSWITCH-mod_sofia/1.8.6~64bit
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
Reason: SIP;cause=600;text="BLIND_TRANSFER"
Content-Length: 0


Timestamp: 3678136664082
UTC Timestamp:3678136664082

Jul 21 00:37:44.082: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Sent:
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.140.175.244;rport;branch=z9hG4bKr4y56661pKtac
From: 1418>;tag=XQSmFScUDBg5j
To: "Aubin Gouthon" 5167>;tag=CC488E8C-1FA8
Date: Tue, 21 Jul 2020 00:37:44 GMT
Call-ID: 32B539DA-CA2111EA-8521EA6E-8E8920FA@10.154.25.50
Server: Cisco-SIPGateway/IOS-15.4.3.M3
CSeq: 23092136 BYE
Reason: Q.850;cause=16
P-RTP-Stat: PS=588,OS=94080,PR=125,OR=20000,PL=0,JI=0,LA=0,DU=11
Content-Length: 0


Timestamp: 3678136664082
UTC Timestamp:36781366640825167>1418>5167>1418>5167>5167>1418>10.140.175.244>1418>5167>1418>1418>5167>1418>1418>1418>5167>1418>5167>1418>5167>5167>5167>1418>5167>

I have a dial-peer for 3711346, I'm not trying to use URI dialing. Here it is:

 
dial-peer voice 72 voip
 description #REFER-INVITE#
 destination-pattern 3711346
 session protocol sipv2
 session target ipv4:10.140.150.101
 voice-class sip early-offer forced
 dtmf-relay rtp-nte
 codec g711ulaw
 fax protocol none
 no vad
!
 
I attached the full SIP dialog. It looks like CUBE is rejecting the SIP REFER it received. 
Only things I noticed are: FROM and TO headers are switched, and the Cseq is huge. 

Yeah, I noticed the Request URI, FROM, To, and Cseq but I don’t spend enough time staring at REFERs to say that’s wrong.

What caught my eye however is the Refer-to header from your trace: the IPv4 address in the RHS is illegal. Is that legit what the trace contained or were you trying to mask/obscure some of the IPs?

Refer-To: <3711346@10.10.140.150.101>

Not sure what happened, probably when I was cleaning the file and removing other calls from the trace. 

I just took a fresh new logs, it is attached. 

When I bypass the CUBE and use a direct SIP trunk from CUCM, the SIP REFER works.
1 thing missing when using CUCM, it doesn't pass the custom header: X-Route: ad_reset

 

I'm looking into SIP Normalization script to copy the header from the SIP REFER and add it to the INVITE. Any idea how to make this work? 

 

I appreciate all your help on this. Thank you 

hello, may I know how you solve the issue?

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: