| 558 | } |
| 559 | |
| 560 | void SipMOInviteClientTransactionLayer::MOUssdSendINVITE(string ussd, const L3LogicalChannel *chan) |
| 561 | { |
| 562 | static const char* xmlUssdTemplate = |
| 563 | "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" |
| 564 | "<ussd-data>\n" |
| 565 | " <language>en</language>\n" |
| 566 | " <ussd-string>%s</ussd-string>\n" |
| 567 | "</ussd-data>\n"; |
| 568 | |
| 569 | LOG(INFO) << "user " << sipLocalUsername() << " state " << getSipState() <<sbText(); |
| 570 | |
| 571 | static const string cInviteStr("INVITE"); |
| 572 | SipMessage *invite = makeInitialRequest(cInviteStr); |
| 573 | // This is dumber than snot. We have to put in a dummy sdp with port 0. |
| 574 | mRTPPort = 0; |
| 575 | invite->smAddBody(string("application/sdp"),makeSDPOffer()); |
| 576 | |
| 577 | // Add RFC-4119 geolocation XML to content area, if available. |
| 578 | // TODO: This makes it a multipart message, needs to be tested. |
| 579 | string xml = format(xmlUssdTemplate,ussd); |
| 580 | invite->smAddBody(string("application/vnd.3gpp.ussd+xml"),xml); |
| 581 | |
| 582 | writePrivateHeaders(invite,chan); |
| 583 | moWriteLowSide(invite); |
| 584 | LOG(DEBUG) <<LOGVAR(invite); |
| 585 | delete invite; |
| 586 | setSipState(Starting); |
| 587 | } |
| 588 | |
| 589 | //old args: const char * calledUser, const char * calledDomain, short rtpPort, Control::CodecSet codec, |
| 590 | void SipMOInviteClientTransactionLayer::MOCSendINVITE(const L3LogicalChannel *chan) |
no test coverage detected