<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Fixedsys;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.apple-style-span
        {mso-style-name:apple-style-span;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Yes but there should be an option to turn it off. When a UA receives the MESSAGE Request the “dp+” gets displayed on some clients which is confusing and the reply needs to route back potentially though many sip hops with lookups etc.. Having a “dp+” prepended on the From URI may not be the best sip based solution for that, maybe adding a custom header perhaps?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>John<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] <b>On Behalf Of </b>Joćo Mesquita<br><b>Sent:</b> Wednesday, January 19, 2011 8:15 PM<br><b>To:</b> FreeSWITCH Users Help<br><b>Subject:</b> Re: [Freeswitch-users] dp+ prefixed on From URI<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>John, you should read what he wrote one more time. The code shows precisely what he said. I am going to quote here:<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>"<span class=apple-style-span><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>you sent it from mod_commands which chose the dp realm to advertise dp+</span></span>"<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>If you _received_ a message from SIP, you would've seen the sip+ prefix and if you sent from the conference module, you would've seen the conf+ prefix on the event. Makes more sense now?<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Regards,<o:p></o:p></p></div><div><div><p class=MsoNormal style='margin-bottom:12.0pt'>Joćo Mesquita<br><br><o:p></o:p></p><div><p class=MsoNormal>On Thu, Jan 20, 2011 at 12:10 AM, John Rose <<a href="mailto:johnrose@comtex.net">johnrose@comtex.net</a>> wrote:<o:p></o:p></p><div><div><p> <o:p></o:p></p><p>Well from <b>switch_core_chat_send</b> it's hardcoded "dp" as the protocol when <b>argv[0]</b> is the actual protocol being passed from the <b>chat</b> API argument.<o:p></o:p></p><p> <o:p></o:p></p><p><span style='font-size:10.0pt;font-family:Fixedsys;color:green'>//-------------------------------------------------------------------------------------------</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'>SWITCH_STANDARD_API(chat_api_function)</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'>{</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> <span style='color:blue'>char</span> *lbuf = NULL, *argv[5];</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> <span style='color:blue'>int</span> argc = 0;</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> <span style='color:blue'>if</span> (!zstr(cmd) && (lbuf = strdup(cmd))</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> && (argc = switch_separate_string(lbuf, <span style='color:#A31515'>'|'</span>, argv, (<span style='color:blue'>sizeof</span>(argv) / <span style='color:blue'>sizeof</span>(argv[0])))) >= 4) {</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> <span style='color:blue'>if</span> (switch_core_chat_send(argv[0], <span style='color:#A31515'>"dp"</span>, argv[1], argv[2], <span style='color:#A31515'>""</span>, argv[3], !zstr(argv[4]) ? argv[4] : NULL, <span style='color:#A31515'>""</span>) == SWITCH_STATUS_SUCCESS) {</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> stream->write_function(stream, <span style='color:#A31515'>"Sent"</span>);</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> } <span style='color:blue'>else</span> {</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> stream->write_function(stream, <span style='color:#A31515'>"Error! Message Not Sent"</span>);</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> }</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> } <span style='color:blue'>else</span> {</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> stream->write_function(stream, <span style='color:#A31515'>"Invalid"</span>);</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> }</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> switch_safe_free(lbuf);</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> <span style='color:blue'>return</span> SWITCH_STATUS_SUCCESS;</span><o:p></o:p></p><p><span style='font-size:10.0pt;font-family:Fixedsys'>}</span><o:p></o:p></p><p><span style='font-size:10.0pt;font-family:Fixedsys;color:green'>//-------------------------------------------------------------------------------------------</span><o:p></o:p></p><p> <o:p></o:p></p><p>Then here in sophia_prescence.c it prepends “dp+” to the sip <b>From</b> URI. The “dp+” can cause issues downstream when the sip <b>MESSAGE</b> is gets routed outbound from the FS box... should be an option to turn it off… <o:p></o:p></p><div><p> <o:p></o:p></p><p>From: \"+15186819448\" <<a href="mailto:sip%3Adp%2B%2B15186819448@65.41.13.124" target="_blank">sip:dp++15186819448@65.41.13.124</a>>;tag=FUetK564c4egm\\r\\n<o:p></o:p></p><p> <o:p></o:p></p><p> <o:p></o:p></p></div><p>John<o:p></o:p></p><p> <o:p></o:p></p><p><span style='font-size:10.0pt;font-family:Fixedsys;color:green'>//-------------------------------------------------------------------------------------------</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys;color:blue'>if</span><span style='font-size:10.0pt;font-family:Fixedsys'> (!strcasecmp(proto, SOFIA_CHAT_PROTO)) {</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> from = hint;</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> } <span style='color:blue'>else</span> {</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> <span style='color:blue'>char</span> *fp, *p = NULL;</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> fp = strdup(from);</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> <span style='color:blue'>if</span> (!fp) {</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, <span style='color:#A31515'>"Memory Error!\n"</span>);</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> <span style='color:blue'>goto</span> end;</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> }</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> <span style='color:blue'>if</span> ((p = strchr(fp, <span style='color:#A31515'>'@'</span>))) {</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> *p++ = <span style='color:#A31515'>'\0'</span>;</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> }</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> <span style='color:blue'>if</span> (zstr(p)) {</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> p = profile->domain_name;</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> <span style='color:blue'>if</span> (zstr(p)) {</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> p = host;</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> }</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> }</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> ffrom = switch_mprintf(<span style='color:#A31515'>"\"%s\" <<a href="sip:%25s+%25s@%25s">sip:%s+%s@%s</a>>"</span>, fp, proto, fp, p);</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> from = ffrom;</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:Fixedsys'> switch_safe_free(fp);</span><o:p></o:p></p><p><span style='font-size:10.0pt;font-family:Fixedsys'> }</span><o:p></o:p></p><p><span style='font-size:10.0pt;font-family:Fixedsys;color:green'>//-------------------------------------------------------------------------------------------</span><o:p></o:p></p><div><p><span style='font-size:10.0pt;font-family:Fixedsys;color:green'> </span><o:p></o:p></p><p> <o:p></o:p></p><p> <o:p></o:p></p><p>> -----Original Message-----<o:p></o:p></p><p>> From: <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a> [mailto:<a href="mailto:freeswitch-" target="_blank">freeswitch-</a><o:p></o:p></p><p>> <o:p></o:p></p><p>> It's not a bug, you are being presumptuous.<o:p></o:p></p><p>> <o:p></o:p></p><p>> Every chat interface has a proto prefix that helps FS to route the messages to<o:p></o:p></p><p>> the right module.<o:p></o:p></p><p>> you sent it from mod_commands which chose the dp realm to advertise dp+<o:p></o:p></p><p>> <o:p></o:p></p><p>> if you came in from SIP it is sip+ and conference are conf+ etc.....<o:p></o:p></p><p>> <o:p></o:p></p><p>> <o:p></o:p></p><p>> On Wed, Jan 19, 2011 at 1:43 PM, John Rose <<a href="mailto:johnrose@comtex.net" target="_blank"><span style='color:windowtext;text-decoration:none'>johnrose@comtex.net</span></a>> wrote:<o:p></o:p></p><p>> >> -----Original Message-----<o:p></o:p></p><p>> >> From: John Rose [mailto:<a href="mailto:johnrose@comtex.net" target="_blank">johnrose@comtex.net</a>]<o:p></o:p></p><p>> >><o:p></o:p></p><p>> >> Why does the chat API command prefix a "dp+" onto the From URI when I<o:p></o:p></p><p>> >> call the chat API? Here is an argument that I am using:<o:p></o:p></p><p>> >><o:p></o:p></p><p>> >><o:p></o:p></p><p>> "sip|+<a href="mailto:15186819448@65.41.13.124" target="_blank">15186819448@65.41.13.124</a>|external/<a href="mailto:sip%3A%2B12062990047@65.41.13.125" target="_blank">sip:+12062990047@65.41.13.125</a><o:p></o:p></p><p>> >> |<o:p></o:p></p><p>> >> Test message."<o:p></o:p></p><p>> >><o:p></o:p></p><p>> >> Then the From header:<o:p></o:p></p><p>> >><o:p></o:p></p><p>> >> From: \"+15186819448\"<o:p></o:p></p><p>> >> <<a href="mailto:sip%3Adp%2B%2B15186819448@65.41.13.124" target="_blank">sip:dp++15186819448@65.41.13.124</a>>;tag=FUetK564c4egm\\r\\n<o:p></o:p></p><p>> >><o:p></o:p></p><p>> ><o:p></o:p></p><p>> ><o:p></o:p></p><p>> > Argh, after looking through the code I think this is a FS bug where it<o:p></o:p></p><p>> > was intended for this "dp+" to be prefixed in the Jingle protocol<o:p></o:p></p><p>> > under certain circumstances not SIP.... looks very suspicious...<o:p></o:p></p><p>> ><o:p></o:p></p><p>> > John<o:p></o:p></p><p>> ><o:p></o:p></p></div></div></div><p class=MsoNormal style='margin-bottom:12.0pt'><br>_______________________________________________<br>FreeSWITCH-users mailing list<br><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p></div></div></div></div></body></html>