| 677 | |
| 678 | |
| 679 | void SipMOInviteClientTransactionLayer::handleSMSResponse(SipMessage *sipmsg) |
| 680 | { |
| 681 | // There are only three cases, and here they are: |
| 682 | stopTimers(); |
| 683 | int code = sipmsg->smGetCode(); |
| 684 | if (code < 200) { |
| 685 | // (pat) 11-26 This was wrong: mTimerBF.set(64*T1); |
| 686 | return; // Ignore 100 Trying. |
| 687 | } |
| 688 | // Smqueue incorrectly requires us to add a from-tag, and sends a 400 error if we dont. |
| 689 | // So if we get a 400 error, see if the user agent is blank (which is what smqueue does, yate adds a correct user-agent) |
| 690 | // then make an attempt to redeliver the message with a from-tag. |
| 691 | // What a botch-up. |
| 692 | if (code == 400) { |
| 693 | string useragent = sipmsg->msmHeaders.paramFind("User-Agent"); |
| 694 | if (useragent == "") { |
| 695 | LOG(INFO) << "Message delivery failed; no user-agent specified. Assuming smqueue and resending MESSAGE"; |
| 696 | gPeerIsBuggySmqueue = true; |
| 697 | // Resend the message, and this time it will add the from-tag. |
| 698 | if (dgGetDialog()->MOSMSRetry()) { return; } |
| 699 | } |
| 700 | } |
| 701 | dialogPushState((code/100)*100 == 200 ? Cleared : SSFail,code); |
| 702 | mTimerK.setOnce(T4); // 17.1.2.2: Timer K Controls when the dialog is destroyed. |
| 703 | } |
| 704 | |
| 705 | void SipInviteServerTransactionLayerBase::SipMTCancel(SipMessage *sipmsg) |
| 706 | { |
nothing calls this directly
no test coverage detected