Open jkkj1630 opened 2 years ago
I think FS is doing correctly here, as per rfc3326 -> section 2.
https://datatracker.ietf.org/doc/html/rfc3326
A SIP message MAY contain more than one Reason value (i.e., multiple Reason lines), but all of them MUST have different protocol values (e.g., one SIP and another Q.850). An implementation is free to ignore Reason values that it does not understand.
i try to send a 183 message with nua_respond,i want push a reason header there,like this
This is what i'm hoping for: SIP/2.0 183 Session Progress Via: SIP/2.0/UDP 0.0.0.0;branch=z9hG4bKmc088272DFSSg;received=0.0.0.0;rport=5060 <sip:0.0.0.0;lr;vsf=AAAAABoNBQAGAgkKCAENeQwachsfBBwfBwAXMTI5;vst=AAAAABoPAQAHBAcCAQ4BcgkDbgAEHh8FBB4fBQIdCwcDNjA7dmlkZW8-> Call-ID: bccf3d78-1bc0-123b-4f8e-286ed488c9b2 From: sip:+xxxxxxx@0.0.0.0;tag=2U6peQZFH138a To: sip:+xxxxxxx@0.0.0.0;tag=0012-126431-90ee161f42fec754 CSeq: 48941723 INVITE Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,REGISTER,INFO,UPDATE,PRACK,REFER,SUBSCRIBE,NOTIFY,MESSAGE Contact:
Require: 100rel
RSeq: 2
Reason: SIP;cause=486;text="user busy",Q.850;cause=17 <---------------Reason header style
P-Early-Media: sendrecv
P-Asserted-Service-Info: vrbt=10
Content-Length: 0
But that's what happened: SIP/2.0 183 Session Progress Via: SIP/2.0/UDP 0.0.0.0;branch=z9hG4bKmc088272DFSSg;received=0.0.0.0;rport=5060 <sip:0.0.0.0;lr;vsf=AAAAABoNBQAGAgkKCAENeQwachsfBBwfBwAXMTI5;vst=AAAAABoPAQAHBAcCAQ4BcgkDbgAEHh8FBB4fBQIdCwcDNjA7dmlkZW8-> Call-ID: bccf3d78-1bc0-123b-4f8e-286ed488c9b2 From: sip:+xxxxxxx@0.0.0.0;tag=2U6peQZFH138a To: sip:+xxxxxxx@0.0.0.0;tag=0012-126431-90ee161f42fec754 CSeq: 48941723 INVITE Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,REGISTER,INFO,UPDATE,PRACK,REFER,SUBSCRIBE,NOTIFY,MESSAGE Contact:
Require: 100rel
RSeq: 2
Reason: SIP;cause=486;text="user busy" <-----------------Reason header style
Reason: Q.850;cause=17 <-----------------Reason header style
P-Early-Media: sendrecv
P-Asserted-Service-Info: vrbt=10
Content-Length: 0
I tried different approaches, but the effect was always the same: SIPTAG_HEADER_STR("Reason: SIP;cause=486;text=\"user busy\",Q.850;cause=17") SIPTAG_REASON_STR("SIP;cause=486;text=\"user busy\",Q.850;cause=17") SIPTAG_REASON_STR("SIP;cause=486;text=\"user busy\"\x2cQ.850;cause=17") SIPTAG_REASON(sip_reason_make(nua_handle_get_home(tech_pvt->nh), "SIP;cause=486;text=\"user busy\",Q.850;cause=17"))
They sliced up my string,two reason were sent separately,whether sofia can achieve the effect I want?