The incoming USSD BYE message could have a payload to be sent to the MS.
| 715 | |
| 716 | // The incoming USSD BYE message could have a payload to be sent to the MS. |
| 717 | void SipDialog::handleUssdBye(SipMessage *msg) |
| 718 | { |
| 719 | // There could be multiple BYE messages, hopefully all identical, but we only want to send one DialogMessage. |
| 720 | if (getSipState() == Cleared) return; |
| 721 | DialogUssdMessage *dmsg = new DialogUssdMessage(mTranId,DialogState::dialogBye,0); |
| 722 | // Is it is ok for there to be no response string? |
| 723 | // We have to send something to the MS so in that case return an empty string. |
| 724 | if (msg->smGetMessageContentType().find("application/vnd.3gpp.ussd+xml") == string::npos) { |
| 725 | LOG(INFO) << "UUSD response does not contain correct body type"; |
| 726 | } else { |
| 727 | dmsg->dmMsgPayload = xmlFind(msg->smGetMessageBody().c_str(),"ussd-string"); |
| 728 | if (dmsg->dmMsgPayload == "") { |
| 729 | // This is ok. |
| 730 | LOG(INFO) << "Missing UUSD response does not contain correct body type"; |
| 731 | } |
| 732 | } |
| 733 | dialogQueueMessage(dmsg); |
| 734 | if (dsPeer()->ipIsReliableTransport()) { |
| 735 | dialogPushState(Cleared,0); |
| 736 | } else { |
| 737 | dialogPushState(MTDClearing,0); |
| 738 | setTimerJ(); |
| 739 | } |
| 740 | } |
| 741 | |
| 742 | |
| 743 | // The SIPInterface sends this to us based on mCallId. |
nothing calls this directly
no test coverage detected