| 643 | } |
| 644 | |
| 645 | SipDtmfTU::SipDtmfTU(SipDialog *wDialog, unsigned wInfo) //: SipClientTrLayer(wDialog->dsPeer(), make_branch(),wDialog) |
| 646 | { |
| 647 | string branch = make_branch(); |
| 648 | SipMessage *msg = new SipMessageRequestWithinDialog(stGetMethodNameV(),wDialog,branch); |
| 649 | static const string applicationDtmf("application/dtmf-relay"); |
| 650 | string body; |
| 651 | switch (wInfo) { |
| 652 | case 11: body = string("Signal=*\nDuration=200"); break; |
| 653 | case 12: body = string("Signal=#\nDuration=200"); break; |
| 654 | default: body = format("Signal=%i\nDuration=200",wInfo); break; |
| 655 | } |
| 656 | msg->smAddBody(applicationDtmf,body); |
| 657 | sctInitInDialogClientTransaction(wDialog, msg, branch); |
| 658 | delete msg; |
| 659 | } |
| 660 | |
| 661 | void SipDtmfTU::TUWriteHighSideV(SipMessage *sipmsg) { |
| 662 | switch ((sipmsg->msmCode*100)/100) { |
nothing calls this directly
no test coverage detected