< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

Re: [reSIProcate-users] 200 response after BYE.


Please disregard, it seems the problem was the branch tag.


On Tue, Aug 31, 2010 at 4:48 PM, Gustavo Sícoli <sic.thesage@xxxxxxxxx> wrote:
Hello,

I've alterated DUM behavior to work with my B2B app and it is not automatically sending 200 after receiving a BYE anymore. Instead, I created a new callback "onTerminatedConfirmed" to be called when I receive a 200 message from B so I can send a 200 to A. To send this 200 message I use DUM::send(my200), the problem is that for some reason my message is not sent, it is instead discarded. Could you help me understanding why is it being discarded?

follows a simplified sample of how I'm building/sending the message. Note that caller is a struct I stored some usefull information and that the response is constructed based on response I receive from B side, therefore some parameters has to be altered to match A side:
   NameAddr contact;
   contact.uri() =  dum->getMasterProfile()->getPublicGruu();
   Helper::makeResponse(rsp, msg, 200,contact);
   rsp.remove(h_To);
   rsp.remove(h_From);

   rsp->header(h_To) = caller->to;
   rsp->header(h_From) = caller->from;
   rsp->header(h_CallId).value() = caller->mSis->getCallId();
   rsp->header(h_Vias).front().remove(p_branch);
   rsp->header(h_Vias).front().param(p_branch) = caller->via.param(p_branch);

   dum->send(rsp);

Here is debug output from the moment I receive BYE from A side:

DEBUG | 20100831-162622.244 | B2BUA | RESIP:TRANSPORT | 3077605072 | Transport.cxx:287 | incoming from: [ V4 192.168.2.1:5070 UDP target domain=unspecified mFlowKey=3 ]
DEBUG | 20100831-162622.244 | B2BUA | RESIP:TRANSACTION | 3077605072 | TransactionUser.cxx:66 | Checking if SipReq:  BYE b2b@xxxxxxxxxxxxxxxxx tid=-21302-1-6 cseq=BYE contact=ASIDE@xxxxxxxxxxx:5070 / 2 from(wire) is for me
DEBUG | 20100831-162622.244 | B2BUA | RESIP:TRANSACTION | 3077605072 | TransactionUser.cxx:71 | Checking rule...
DEBUG | 20100831-162622.244 | B2BUA | RESIP:TRANSACTION | 3077605072 | MessageFilterRule.cxx:45 | Matching rule for:

BYE sip:b2b@xxxxxxxxxxxxxxxxx SIP/2.0
Via: SIP/2.0/UDP 192.168.2.1:5070;branch=z9hG4bK-21302-1-6
Max-Forwards: 70
Contact: <sip:ASIDE@xxxxxxxxxxx:5070;transport=UDP>
To: "BSIDE" <sip:BSIDE@xxxxxxxxxxxxxxxxx>;tag=3fbcc945
From: "ASIDE" <sip:ASIDE@xxxxxxxxxxxxxxxxx>;tag=1
Call-ID: 1-21302@xxxxxxxxxxx
CSeq: 2 BYE
Allow: INVITE, BYE, REGISTER, ACK, OPTIONS, CANCEL, INFO, PRACK, SUBSCRIBE, NOTIFY, UPDATE
Reason: SIP;description="user Hung Up"
Content-Length: 0


DEBUG | 20100831-162622.244 | B2BUA | RESIP:TRANSACTION | 3077605072 | TransactionUser.cxx:74 | Match!
DEBUG | 20100831-162622.244 | B2BUA | RESIP | 3077605072 | Helper.cxx:375 | Helper::makeResponse(SipReq:  BYE b2b@xxxxxxxxxxxxxxxxx tid=-21302-1-6 cseq=BYE contact=ASIDE@xxxxxxxxxxx:5070 / 2 from(wire) code=100 reason=
DEBUG | 20100831-162622.244 | B2BUA | RESIP:TRANSACTION | 3077605072 | TimerQueue.cxx:85 | Adding timer: Timer Trying tid=-21302-1-6 ms=3500
DEBUG | 20100831-162622.244 | B2BUA | RESIP:TRANSACTION | 3077605072 | TransactionState.cxx:2149 | Send to TU: TU: DialogUsageManager size=0

BYE sip:b2b@xxxxxxxxxxxxxxxxx SIP/2.0
Via: SIP/2.0/UDP 192.168.2.1:5070;branch=z9hG4bK-21302-1-6
Max-Forwards: 70
Contact: <sip:ASIDE@xxxxxxxxxxx:5070;transport=UDP>
To: "BSIDE" <sip:BSIDE@xxxxxxxxxxxxxxxxx>;tag=3fbcc945
From: "ASIDE" <sip:ASIDE@xxxxxxxxxxxxxxxxx>;tag=1
Call-ID: 1-21302@xxxxxxxxxxx
CSeq: 2 BYE
Allow: INVITE, BYE, REGISTER, ACK, OPTIONS, CANCEL, INFO, PRACK, SUBSCRIBE, NOTIFY, UPDATE
Reason: SIP;description="user Hung Up"
Content-Length: 0


INFO | 20100831-162622.244 | B2BUA | RESIP:DUM | 3077605072 | resiprocate-1.6/resip/dum/DialogUsageManager.cxx:1335 | Got: SipReq:  BYE b2b@xxxxxxxxxxxxxxxxx tid=-21302-1-6 cseq=BYE contact=ASIDE@xxxxxxxxxxx:5070 / 2 from(wire)
DEBUG | 20100831-162622.244 | B2BUA | RESIP:DUM | 3077605072 | resiprocate-1.6/resip/dum/DialogUsageManager.cxx:1653 | DialogUsageManager::processRequest: SipReq:  BYE b2b@xxxxxxxxxxxxxxxxx tid=-21302-1-6 cseq=BYE contact=ASIDE@xxxxxxxxxxx:5070 / 2 from(wire)
INFO | 20100831-162622.244 | B2BUA | RESIP:DUM | 3077605072 | resiprocate-1.6/resip/dum/DialogUsageManager.cxx:1713 | Handling in-dialog request: SipReq:  BYE b2b@xxxxxxxxxxxxxxxxx tid=-21302-1-6 cseq=BYE contact=ASIDE@xxxxxxxxxxx:5070 / 2 from(wire)
DEBUG | 20100831-162622.245 | B2BUA | RESIP:DUM | 3077605072 | resiprocate-1.6/resip/dum/DialogId.cxx:50 | DialogId::DialogId: 1-21302@xxxxxxxxxxxxxxxxxxxxxx
DEBUG | 20100831-162622.245 | B2BUA | RESIP:DUM | 3077605072 | resiprocate-1.6/resip/dum/DialogSet.cxx:530 | Found matching dialog mClientSubscriptions(0), mServerSubscriptions(0) for

BYE sip:b2b@xxxxxxxxxxxxxxxxx SIP/2.0
Via: SIP/2.0/UDP 192.168.2.1:5070;branch=z9hG4bK-21302-1-6
Max-Forwards: 70
Contact: <sip:ASIDE@xxxxxxxxxxx:5070;transport=UDP>
To: "BSIDE"<sip:BSIDE@xxxxxxxxxxxxxxxxx>;tag=3fbcc945
From: "ASIDE"<sip:ASIDE@xxxxxxxxxxxxxxxxx>;tag=1
Call-ID: 1-21302@xxxxxxxxxxx
CSeq: 2 BYE
Allow: INVITE, BYE, REGISTER, ACK, OPTIONS, CANCEL, INFO, PRACK, SUBSCRIBE, NOTIFY, UPDATE
Reason: SIP;description="user Hung Up"
Content-Length: 0


DEBUG | 20100831-162622.245 | B2BUA | RESIP:DUM | 3077605072 | resiprocate-1.6/resip/dum/Dialog.cxx:370 | Dialog::dispatch: SipReq:  BYE b2b@xxxxxxxxxxxxxxxxx tid=-21302-1-6 cseq=BYE contact=ASIDE@xxxxxxxxxxx:5070 / 2 from(wire)
INFO | 20100831-162622.245 | B2BUA | RESIP:DUM | 3077605072 | resiprocate-1.6/resip/dum/InviteSession.cxx:2016 | Received SipReq:  BYE b2b@xxxxxxxxxxxxxxxxx tid=-21302-1-6 cseq=BYE contact=ASIDE@xxxxxxxxxxx:5070 / 2 from(wire)
B2BUA: InviteSession-onTerminated - SipReq:  BYE b2b@xxxxxxxxxxxxxxxxx tid=-21302-1-6 cseq=BYE contact=ASIDE@xxxxxxxxxxx:5070 / 2 from(wire)
DEBUG | 20100831-162622.245 | B2BUA | RESIP:DUM | 3077605072 | resiprocate-1.6/resip/dum/DialogUsageManager.cxx:867 | SEND:

BYE sip:BSIDE@xxxxxxxxxxx:5090 SIP/2.0
Via: SIP/2.0/udp 192.168.1.1:5060;branch=z9hG4bK-d8754z-f75a0f3e121dc143-1---d8754z-;rport
Max-Forwards: 70
To: "BSIDE"<sip:BSIDE@xxxxxxxxxxx:5090>;tag=1
From: "ASIDE"<sip:ASIDE@xxxxxxxxxxxxxxxxx>;tag=9f125525
Call-ID: OTk0YmYwYWUyMmU0YjZjM2YxZTkxMWY5YjZmZTg5YjQ.
CSeq: 0 BYE
Reason: SIP;description="user Hung Up"
Content-Length: 0


DEBUG | 20100831-162622.245 | B2BUA | RESIP:DUM | 3077605072 | resiprocate-1.6/resip/dum/DialogId.cxx:50 | DialogId::DialogId: OTk0YmYwYWUyMmU0YjZjM2YxZTkxMWY5YjZmZTg5YjQ.-9f125525-1
DEBUG | 20100831-162622.245 | B2BUA | RESIP:DUM | 3077605072 | resiprocate-1.6/resip/dum/DialogUsageManager.cxx:1001 | Send: SipReq:  BYE BSIDE@xxxxxxxxxxx:5090 tid=f75a0f3e121dc143 cseq=BYE / 0 from(tu)
DEBUG | 20100831-162622.245 | B2BUA | RESIP | 3077605072 | SipStack.cxx:337 | SEND: SipReq:  BYE BSIDE@xxxxxxxxxxx:5090 tid=f75a0f3e121dc143 cseq=BYE / 0 from(tu)
DEBUG | 20100831-162622.245 | B2BUA | RESIP:TRANSACTION | 3077605072 | TimerQueue.cxx:85 | Adding timer: Timer F tid=f75a0f3e121dc143 ms=32000
DEBUG | 20100831-162622.245 | B2BUA | RESIP:TRANSPORT | 3077605072 | TransportSelector.cxx:320 | Looking up dns entries for sip:BSIDE@xxxxxxxxxxx:5090
DEBUG | 20100831-162622.245 | B2BUA | RESIP:DNS | 3077605072 | DnsResult.cxx:207 | DnsResult::lookup sip:BSIDE@xxxxxxxxxxx:5090
DEBUG | 20100831-162622.245 | B2BUA | RESIP:DNS | 3077605072 | DnsResult.cxx:391 | Numeric result so return immediately: [ V4 192.168.2.1:5090 UDP target domain=192.168.2.1 mFlowKey=0 ]
DEBUG | 20100831-162622.246 | B2BUA | RESIP:TRANSACTION | 3077605072 | TimerQueue.cxx:85 | Adding timer: Timer E1 tid=f75a0f3e121dc143 ms=500
DEBUG | 20100831-162622.246 | B2BUA | RESIP:TRANSPORT | 3077605072 | TransportSelector.cxx:427 | hint provided by app: SIP/2.0/udp 192.168.1.1:5060;branch=z9hG4bK-d8754z-f75a0f3e121dc143-1---d8754z-;rport
DEBUG | 20100831-162622.246 | B2BUA | RESIP:TRANSPORT | 3077605072 | TransportSelector.cxx:1112 | findTransportBySource([ V4 192.168.1.1:5060 UDP target domain=unspecified mFlowKey=0 ])
DEBUG | 20100831-162622.246 | B2BUA | RESIP:TRANSPORT | 3077605072 | TransportSelector.cxx:1156 | findTransport (exact) => Transport: [ V4 192.168.1.1:5060 UDP target domain=unspecified mFlowKey=3 ] on 192.168.1.1
DEBUG | 20100831-162622.246 | B2BUA | RESIP:TRANSPORT | 3077605072 | TransportSelector.cxx:945 | Transmitting to [ V4 192.168.2.1:5090 UDP target domain=192.168.2.1 mFlowKey=0 ] tlsDomain= via [ V4 192.168.1.1:5060 UDP target domain=unspecified mFlowKey=0 ]

BYE sip:BSIDE@xxxxxxxxxxx:5090 SIP/2.0
Via: SIP/2.0/udp 192.168.1.1:5060;branch=z9hG4bK-d8754z-f75a0f3e121dc143-1---d8754z-;rport
Max-Forwards: 70
To: "BSIDE"<sip:BSIDE@xxxxxxxxxxx:5090>;tag=1
From: "ASIDE"<sip:ASIDE@xxxxxxxxxxxxxxxxx>;tag=9f125525
Call-ID: OTk0YmYwYWUyMmU0YjZjM2YxZTkxMWY5YjZmZTg5YjQ.
CSeq: 0 BYE
Reason: SIP;description="user Hung Up"
Content-Length: 0

sigcomp id=
DEBUG | 20100831-162622.246 | B2BUA | RESIP:TRANSPORT | 3077605072 | Transport.cxx:213 | Adding message to tx buffer to: [ V4 192.168.2.1:5090 UDP target domain=192.168.2.1 mFlowKey=0 ]
DEBUG | 20100831-162622.247 | B2BUA | RESIP:TRANSPORT | 3077605072 | Transport.cxx:287 | incoming from: [ V4 192.168.2.1:5090 UDP target domain=unspecified mFlowKey=3 ]
DEBUG | 20100831-162622.247 | B2BUA | RESIP:DNS | 3077605072 | DnsResult.cxx:199 | Whitelisting 192.168.2.1(1): 192.168.2.1
DEBUG | 20100831-162622.247 | B2BUA | RESIP:DNS | 3077605072 | dns/RRVip.cxx:128 | updating an existing vip: 192.168.2.1 with 192.168.2.1
DEBUG | 20100831-162622.247 | B2BUA | RESIP:TRANSACTION | 3077605072 | TransactionState.cxx:2149 | Send to TU: TU: DialogUsageManager size=0

SIP/2.0 200 OK
Via: SIP/2.0/udp 192.168.1.1:5060;branch=z9hG4bK-d8754z-f75a0f3e121dc143-1---d8754z-;rport;received=192.168.1.1
Contact: <sip:BSIDE@xxxxxxxxxxx:5090;transport=UDP>
To: "BSIDE"<sip:BSIDE@xxxxxxxxxxx:5090>;tag=1
From: "ASIDE"<sip:ASIDE@xxxxxxxxxxxxxxxxx>;tag=9f125525
Call-ID: OTk0YmYwYWUyMmU0YjZjM2YxZTkxMWY5YjZmZTg5YjQ.
CSeq: 0 BYE
Content-Type: application/sdp
Content-Length: 0


DEBUG | 20100831-162622.247 | B2BUA | RESIP:TRANSACTION | 3077605072 | TimerQueue.cxx:85 | Adding timer: Timer K tid=f75a0f3e121dc143 ms=5000
INFO | 20100831-162622.247 | B2BUA | RESIP:DUM | 3077605072 | resiprocate-1.6/resip/dum/DialogUsageManager.cxx:1335 | Got: SipResp: 200 tid=f75a0f3e121dc143 cseq=BYE contact=BSIDE@xxxxxxxxxxx:5090 / 0 from(wire)
DEBUG | 20100831-162622.247 | B2BUA | RESIP:DUM | 3077605072 | resiprocate-1.6/resip/dum/DialogUsageManager.cxx:1842 | DialogUsageManager::processResponse:

SipResp: 200 tid=f75a0f3e121dc143 cseq=BYE contact=BSIDE@xxxxxxxxxxx:5090 / 0 from(wire)
DEBUG | 20100831-162622.247 | B2BUA | RESIP:DUM | 3077605072 | resiprocate-1.6/resip/dum/DialogId.cxx:50 | DialogId::DialogId: OTk0YmYwYWUyMmU0YjZjM2YxZTkxMWY5YjZmZTg5YjQ.-9f125525-1
DEBUG | 20100831-162622.247 | B2BUA | RESIP:DUM | 3077605072 | resiprocate-1.6/resip/dum/DialogSet.cxx:530 | Found matching dialog mClientSubscriptions(0), mServerSubscriptions(0) for

SIP/2.0 200 OK
Via: SIP/2.0/udp 192.168.1.1:5060;branch=z9hG4bK-d8754z-f75a0f3e121dc143-1---d8754z-;rport;received=192.168.1.1
Contact: <sip:BSIDE@xxxxxxxxxxx:5090;transport=UDP>
To: "BSIDE"<sip:BSIDE@xxxxxxxxxxx:5090>;tag=1
From: "ASIDE"<sip:ASIDE@xxxxxxxxxxxxxxxxx>;tag=9f125525
Call-ID: OTk0YmYwYWUyMmU0YjZjM2YxZTkxMWY5YjZmZTg5YjQ.
CSeq: 0 BYE
Content-Type: application/sdp
Content-Length: 0


DEBUG | 20100831-162622.247 | B2BUA | RESIP:DUM | 3077605072 | resiprocate-1.6/resip/dum/Dialog.cxx:370 | Dialog::dispatch: SipResp: 200 tid=f75a0f3e121dc143 cseq=BYE contact=BSIDE@xxxxxxxxxxx:5090 / 0 from(wire)
INFO | 20100831-162622.247 | B2BUA | RESIP:DUM | 3077605072 | resiprocate-1.6/resip/dum/InviteSession.cxx:1867 | InviteSession::dispatchTerminated SipResp: 200 tid=f75a0f3e121dc143 cseq=BYE contact=BSIDE@xxxxxxxxxxx:5090 / 0 from(wire)
B2BUA: InviteSession-onTerminatedConfirmed - SipResp: 200 tid=f75a0f3e121dc143 cseq=BYE contact=BSIDE@xxxxxxxxxxx:5090 / 0 from(wire)
DEBUG | 20100831-162622.247 | B2BUA | RESIP | 3077605072 | Helper.cxx:375 | Helper::makeResponse(SipResp: 200 tid=f75a0f3e121dc143 cseq=BYE contact=BSIDE@xxxxxxxxxxx:5090 / 0 from(wire) code=200 reason=
DEBUG | 20100831-162622.247 | B2BUA | RESIP:DUM | 3077605072 | resiprocate-1.6/resip/dum/DialogUsageManager.cxx:867 | SEND:

SIP/2.0 200 OK
Via: SIP/2.0/udp 192.168.1.1:5060;rport;received=192.168.1.1;branch=z9hG4bK-21302-1-4
Contact: <sip:b2b@xxxxxxxxxxx:5060;transport=udp>
To: "BSIDE"<sip:BSIDE@xxxxxxxxxxxxxxxxx>;tag=3fbcc945
From: "ASIDE"<sip:ASIDE@xxxxxxxxxxxxxxxxx>;tag=1
Call-ID: 1-21302@xxxxxxxxxxx
CSeq: 0 BYE
Content-Length: 0


DEBUG | 20100831-162622.248 | B2BUA | RESIP | 3077605072 | SipStack.cxx:319 | SEND: SipResp: 200 tid=-21302-1-4 cseq=BYE contact=b2b@xxxxxxxxxxx:5060 / 0 from(tu)
DEBUG | 20100831-162622.248 | B2BUA | RESIP:DUM | 3077605072 | resiprocate-1.6/resip/dum/InviteSession.cxx:83 | ^^^ InviteSession::~InviteSession 0x892ce50
DEBUG | 20100831-162622.248 | B2BUA | RESIP:DUM | 3077605072 | resiprocate-1.6/resip/dum/Dialog.cxx:244 | Dialog::~Dialog()
B2BUA(INVITE): testAppDialog: destroyed.
DEBUG | 20100831-162622.248 | B2BUA | RESIP:DUM | 3077605072 | resiprocate-1.6/resip/dum/DialogSet.cxx:123 |  ********** DialogSet::~DialogSet: OTk0YmYwYWUyMmU0YjZjM2YxZTkxMWY5YjZmZTg5YjQ.-9f125525*************
B2BUA(INVITE): testAppDialogSet: destroyed.
INFO | 20100831-162622.248 | B2BUA | RESIP:TRANSACTION | 3077605072 | TransactionState.cxx:549 | discarding stray response: SipResp: 200 tid=-21302-1-4 cseq=BYE contact=b2b@xxxxxxxxxxx:5060 / 0 from(tu)





Regards,
Gustavo.



--
"Some say that the soul wants to speak and
does so all the time, but humans are blind to
its messages, for they come not in words but
in actions in the world around them."