" /> How to replace/remove a sip header (Composer) - Genesys CTI User Forum

Author Topic: How to replace/remove a sip header (Composer)  (Read 2201 times)

Offline Mauro Castro

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
How to replace/remove a sip header (Composer)
« on: August 20, 2021, 03:24:29 PM »
Advertisement
Hi Guys,

I'm facing a problem with sip-header (coding with Composer 8.1). When a call arrives in my IVR application, I'm using a sip-header called 'User-to-User' for retriving info.
That's ok, no problem. But when I need to transfer back this call, I need to update this header ('User-to-User'). I tried to use "sip:xxx@yyyy?User-to-User=04...03641%3Bencoding%3Dhex", but doing this SIP-S is adding another 'User-to-User'

In few words, how can I replace existent 'User-to-User' or, at least, remove original one?

[b]Incoming call:[/b]
10:29:37.374: Sending  [0,UDP] 1552 bytes to 10.x.x.x:5160 >>>>>
INVITE sip:5980@10.x.x.x:5160 SIP/2.0
From: sip:11933227106@xxxxxx;tag=22CA267D-FC52-489B-A853-E4C28743823E-14719
To: <sip:5980@10.x.x.x:5060>
Call-ID: 6C7ED83E-DDA6-46E4-9379-FC99A6CEE085-7344@10.154.43.107
CSeq: 1 INVITE
Content-Length: 305
Content-Type: application/sdp
Via: SIP/2.0/UDP 10.x.x.x:5060;branch=z9hG4bK92D72786-499D-4991-BAD1-FC2B63B17F2B-58428
Contact: <sip:11933227106@10.x.x.x:5060>
Allow: ACK, BYE, CANCEL, INFO, INVITE, MESSAGE, NOTIFY, OPTIONS, PRACK, REFER, UPDATE
[b]User-to-User: 0433.....3731;encoding=hex <-- THIS IS IMPORTANT FOR INCOMING CALL[/b]
User-Agent: SBC_LAB_SPO/v.7.20A.202.203
P-Asserted-Identity: <sip:11933227106@10.207.6.130>
Alert-Info: <cid:internal@testlab.com>;avaya-cm-alert-type=internal
P-Charging-Vector: icid-value="06244d70-01ba-11ec-b6ff-e4115be716c8"

[b]Transfer call:[/b]
10:30:50.861: SIPTR: Received [968,TCP] 1546 bytes from 10.x.x.x:56054 <<<<<
REFER sip:11933227106@10.x.x.x:5060 SIP/2.0
Via: SIP/2.0/TCP 10.x.x.x:5160;branch=z9hG4bK000000001FA6F2101fae8aabcdef09
From: <sip:5980@10.x.x.x:5060>;tag=40F0D6AA-F8B2-4490-A7A4-5D095664FDEF
To: sip:11933227106@10.y.y.y;tag=22CA267D-FC52-489B-A853-E4C28743823E-14719
Max-Forwards: 69
CSeq: 1 REFER
Call-ID: 6C7ED83E-DDA6-46E4-9379-FC99A6CEE085-7344@10.x.x.x
Contact: <sip:Genesys@10.154.43.111:5070>
Content-Length: 0
[b]Refer-To: <sip:3101104051541@10.x.x.x:5060?User-to-User=04463337303030........33332323731303641%3Bencoding%3Dhex> <-- NEW ONE[/b]
Referred-By: <sip:5980@10.x.x.x:5060>
X-Genesys-GVP-Session-ID: 0CADADE6-8085-464E-E1A6-D8493CEB6EDD;gvp.rm.datanodes=1;gvp.rm.tenant-id=1_URA_FoneFacil
[b]User-to-User: 0433.....3731;encoding=hex <-- ORIGINAL[/b]
User-Agent: SBC_LAB_SPO/v.7.20A.202.203
Alert-Info: <cid:internal@testlab.com>;avaya-cm-alert-type=internal

[b]SIP-S to SBC:[/b]
10:30:50.861: Sending  [0,UDP] 1232 bytes to 10.y.y.y:5060 >>>>>
INVITE sip:1104051541@10.y.y.y:5060 SIP/2.0
From: sip:11933227106@10.w.w.w;tag=22CA267D-FC52-489B-A853-E4C28743823E-14720
To: <sip:1104051541@10.x.x.x:5060>
Call-ID: 6C7ED83E-DDA6-46E4-9379-FC99A6CEE085-7345@10.x.x.x
CSeq: 1 INVITE
Content-Length: 0
Via: SIP/2.0/UDP 10.x.x.x:5060;branch=z9hG4bK92D72786-499D-4991-BAD1-FC2B63B17F2B-58434
Contact: <sip:11933227106@10.x.x.x:5060>
Allow: ACK, BYE, CANCEL, INFO, INVITE, MESSAGE, NOTIFY, OPTIONS, PRACK, REFER, UPDATE
[b]User-to-User: 04463337303030........33332323731303641;encoding=hex <-- NEW[/b]
X-Genesys-GVP-Session-ID: 0CADADE6-8085-464E-E1A6-D8493CEB6EDD;gvp.rm.datanodes=1;gvp.rm.tenant-id=1_URA_FoneFacil
[b]User-to-User: 0433.....3731;encoding=hex <-- ORIGINAL[/b]
X-Genesys-GVP-Session-Data: callsession=0CADADE6-8085-464E-E1A6-D8493CEB6EDD;1;0;sip:10.x.x.x:5060;;;Environment;URA_FoneFacil;;0;IVR_Profile_Default
Referred-By: <sip:5980@10.x.x.x:5060>

Thanks,
Mauro
« Last Edit: August 20, 2021, 03:57:13 PM by Mauro Castro »

Offline hsujdik

  • Hero Member
  • *****
  • Posts: 541
  • Karma: 30
Re: How to replace/remove a sip header (Composer)
« Reply #1 on: August 20, 2021, 07:40:42 PM »
Hi, Mauro.

Does the option "sip-pass-refer-headers" in SIP Server application contain "User-to-User"? If it does, could be the problem, since this option instructs which headers should be copied from the REFER method to the INVITE request.
« Last Edit: August 20, 2021, 07:42:56 PM by hsujdik »

Offline Mauro Castro

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: How to replace/remove a sip header (Composer)
« Reply #2 on: August 23, 2021, 01:30:53 PM »
Hi hsujdik,

Yes... it is configured in SIP-S. But I can't remove this option, since it is being used by another application (in fact, environment is shared by several applications)

Offline szs5tim

  • Newbie
  • *
  • Posts: 46
  • Karma: 0
Re: How to replace/remove a sip header (Composer)
« Reply #3 on: August 30, 2021, 12:48:15 PM »
The behavior is normal in my opinion and according to RFC:

"[i]A sender MAY
  include multiple User-to-User header fields, and a receiver MUST be
  prepared to receive multiple User-to-User header fields.  Consistent
  with the rules of SIP syntax, the syntax defined in this document
  allows any combination of individual User-to-User header fields or
  User-to-User header fields with multiple comma separated UUI data
  elements.  Any size limitations on the UUI data for a particular
  purpose are to be defined by the related UUI package.

  UAs SHALL ignore UUI data from packages or encoding that they do not
  understand.[/i]"

https://datatracker.ietf.org/doc/html/rfc7433#page-11

You have to figure out a way on the receiving end which user-to-user field to use because from routing you can only attach, you cannot update.