[reSIProcate] Use DUM send Message
Scott Godin
slgodin at gmail.com
Wed Jun 24 11:13:56 CDT 2015
You can't really control the number of retransmission, since it's part of
the SIP protocol itself. With a default T1 timer of 500ms the SIP
transaction timeout will be 32 seconds. After 32 seconds of no response,
DUM will receive an internally generated 408 response from the core stack
and it will call ClientPagerMessageHandler::onFailure assuming you have
installed the PagerMessageHandler properly. For more information on
retransmissions and timing, check out RFC3261.
Scott
On Wed, Jun 24, 2015 at 7:28 AM, 许波 <xubonts at 163.com> wrote:
> Thank you , I try to instead with OctetContents, it works better!
> But I still can't control it, when the MESSAGE is sent but not received a
> response.
> The program will keep re-sending the MESSAGE until dead.
> I want to make it failure after the seconds or times.
> Can you tell me how to do that?
>
>
>
> 2015-06-24
> ------------------------------
> 许波
> ------------------------------
>
> *发件人:*slgodin at gmail.com
> *发送时间:*2015-06-23 19:38
> *主题:*Re: Use DUM send Message
> *收件人:*"许波"<xubonts at 163.com>
> *抄送:*"Scott Godin"<sgodin at sipspectrum.com>,"
> resiprocate-devel at resiprocate.org"<resiprocate-devel at resiprocate.org>
>
> Using SdpContents is incorrect. Try OctetContents instead.
>
> Scott
>
> Sent from my iPhone
>
> On Jun 23, 2015, at 5:22 AM, 许波 <xubonts at 163.com> wrote:
>
> Thanks for your reply.
> I use the message like this:
>
> *Generate the XML:*
> CMarkup outPutXML("<?xml version='1.0'?>");
> outPutXML.AddElem("Response");
> outPutXML.IntoElem();
> outPutXML.AddElem("CmdType","MediaInfo");
> outPutXML.AddElem("SN",12345);
> outPutXML.AddElem("CPU",g_computerStatus.CpuRate);
> outPutXML.AddElem("Memory",g_computerStatus.MemoryLoad);
> outPutXML.AddElem("Net",g_computerStatus.NetUsage);
> outPutXML.OutOfElem();
>
> char xmlOut[1024];
> strcpy(xmlOut,outPutXML.GetDoc().c_str());
>
>
> *Send the Message:* Data txt = Data(xmlOut);
> HeaderFieldValue *hfv = new HeaderFieldValue(txt->data(), (unsigned
> int)txt->size());
> Mime type("Application", "MANSCDP+xml");
> SdpContents *mSdp = new SdpContents(*hfv, type);
> Contents *body = mSdp->getContents()->clone();
> auto_ptr<Contents> content(body);
> cpmh.get()->page(content);
>
> When I run in the Debug mode, my program will dead soon.
>
>
> And the logs are attatched.
> Please help me analyze the problem. It's the CMarkup's reason, or I
> send the message in a wrong way?
> Thank you!
>
> 2015-06-23
> ------------------------------
> 许波
> ------------------------------
>
> *发件人:*Scott Godin <sgodin at sipspectrum.com>
> *发送时间:*2015-06-20 04:43
> *主题:*Re: Use DUM send Message
> *收件人:*"许波"<xubonts at 163.com>
> *抄送:*"resiprocate-devel at resiprocate.org"<resiprocate-devel at resiprocate.org
> >
>
> You need to install a ClientPagerMessageHandler. Check out
> dum/test/basicMessage for an example.
>
> Scott
>
> On Tue, Jun 16, 2015 at 8:25 PM, 许波 <xubonts at 163.com> wrote:
>
>> Hi,
>> When I write the code like this
>>
>> SharedPtr<UserProfile>
>> outboundUserProfile(m_dum.getMasterUserProfile());
>> outboundUserProfile->setDefaultFrom(m_sipmsg.header(h_From));
>> ClientPagerMessageHandle cpmh =
>> m_dum.makePagerMessage(myDest,outboundUserProfile);
>> body = m_sipmsg.getContents()->clone();
>> auto_ptr<Contents> content(body);
>> cpmh.get()->page(content);
>>
>> The DUM will send MESSAGE to the destination. And if the dest doesn't
>> reply, DUM will try about 11 times.
>> I want to know, is there any way to get the status that the DUM haven't
>> got the reply ?
>> In my wok, I need to do something if the sent MESSAGE get no reply !
>>
>> 2015-06-17
>> ------------------------------
>> XUBO
>>
>
> <MediaServer.log>
>
> <SipServer.log>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20150624/d33bf4fb/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2015-06-23_171815.png
Type: image/png
Size: 75309 bytes
Desc: not available
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20150624/d33bf4fb/attachment.png>
More information about the resiprocate-devel
mailing list