<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
Greetings,
<br>This is a question to the author: <i>Bogdan-Andrei Iancu
</i>, but if anybody can answer, I'd appreciate it.
<br>Softphone client is Bria.
<br><br>Here is publish event from ngrep
<br><br>PUBLISH sip:tolyp@webley SIP/2.0.
<br>Via: SIP/2.0/TCP 10.50.1.101:45464;branch=z9hG4bK-
<br><br>T 2008/10/13 16:15:38.621949 10.50.1.101:1572 -&gt; 10.50.4.40:5070 [AP]
<br>d8754z-697cf1172b7bf515-1---d8754z-;rport.
<br>Max-Forwards: 70.
<br>Contact: &lt;sip:tolyp@10.50.1.101:1572;transport=TCP&gt;.
<br>To: "tolyp"&lt;sip:tolyp@webley&gt;.
<br>From: "tolyp"&lt;sip:tolyp@webley&gt;;tag=ca65f37d.
<br>Call-ID: YmFlNjUxMzEwM2Q4Nzk0MWRhZGUxZmQwMDA5NmE4Nzc..
<br>CSeq: 1 PUBLISH.
<br>Expires: 3600.
<br>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO.
<br>Content-Type: application/pidf+xml.
<br>User-Agent: Bria release 2.4 stamp 49274.
<br>Event: presence.
<br>Content-Length: 441.
<br>.
<br>&lt;?xml version='1.0' encoding='UTF-8'?&gt;&lt;presence
xmlns='urn:ietf:params:xml:ns:pidf'
xmlns:dm='urn:ietf:params:xml:ns:pidf:data-model'
xmlns:rpid='urn:ietf:params:xml:ns:pidf:rpid'
xmlns:c='urn:ietf:params:xml:ns:pidf:cipid'
xmlns:lt='urn:ietf:params:xml:ns:location-type'
entity='sip:tolyp@webley'&gt;&lt;tuple
id='t5a055764'&gt;&lt;status&gt;&lt;basic&gt;open&lt;/basic&gt;&lt;/status&gt;&lt;/tuple&gt;&lt;dm:person
id='p5e347748'&gt;&lt;dm:note&gt;Available&lt;/dm:note&gt;&lt;/dm:person&gt;&lt;/presence&gt;
<br><br>Here is the code from parser/parse_event.c
<br><br>&nbsp; &nbsp; &nbsp; &nbsp; if ((_e-&gt;text.len == PRES_STR_LEN) &amp;&amp; 
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; !strncasecmp(PRES_STR, tmp.s, _e-&gt;text.len)) {
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _e-&gt;parsed = EVENT_PRESENCE;
<br>&nbsp; &nbsp; &nbsp; &nbsp; } else if ((_e-&gt;text.len == PRES_XCAP_CHANGE_STR_LEN) &amp;&amp; 
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;!strncasecmp(PRES_XCAP_CHANGE_STR, tmp.s, _e-&gt;text.len)) {
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _e-&gt;parsed = EVENT_XCAP_CHANGE;
<br>&nbsp; &nbsp; &nbsp; &nbsp; } else if ((_e-&gt;text.len == PRES_WINFO_STR_LEN) &amp;&amp; 
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;!strncasecmp(PRES_WINFO_STR, tmp.s, _e-&gt;text.len)) {
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _e-&gt;parsed = EVENT_PRESENCE_WINFO;
<br>&nbsp; &nbsp; &nbsp; &nbsp; } else if ((_e-&gt;text.len == PRES_SIP_PROFILE_STR_LEN) &amp;&amp; 
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;!strncasecmp(PRES_SIP_PROFILE_STR, tmp.s, _e-&gt;text.len)) {
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _e-&gt;parsed = EVENT_SIP_PROFILE;
<br>&nbsp; &nbsp; &nbsp; &nbsp; } else if ((_e-&gt;text.len == DIALOG_STR_LEN) &amp;&amp; 
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;!strncasecmp(DIALOG_STR, tmp.s, _e-&gt;text.len)) {
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _e-&gt;parsed = EVENT_DIALOG;
<br>&nbsp; &nbsp; &nbsp; &nbsp; } else if ((_e-&gt;text.len == MWI_STR_LEN) &amp;&amp; 
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;!strncasecmp(MWI_STR, tmp.s, _e-&gt;text.len)) {
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _e-&gt;parsed = EVENT_MWI;
<br>&nbsp; &nbsp; &nbsp; &nbsp; } else {
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _e-&gt;parsed = EVENT_OTHER;
<br>&nbsp; &nbsp; &nbsp; &nbsp; }
<br>&nbsp; &nbsp; &nbsp; &nbsp; if( (*end)== ';')
<br>&nbsp; &nbsp; &nbsp; &nbsp; {
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; str params_str;
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; params_str.s= end+1;
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end= skip_token(params_str.s, tmp.len- _e-&gt;text.len- 1);
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; params_str.len= end- params_str.s;
<br><br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (parse_params(&amp;params_str, CLASS_ANY, &amp;phooks, &amp;_e-&gt;params)&lt;0)
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return -1;
<br>&nbsp; &nbsp; &nbsp; &nbsp; }
<br>&nbsp; &nbsp; &nbsp; &nbsp; else
<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; _e-&gt;params= NULL;
<br><br>It detects presence event correctly, but then if( (*end)== ';') does not find any semicolon
<br>and here is the result:
<br>10/13 16:34:57 13030 err ERROR:presence:handle_publish: &lt;publish.c: 508&gt; Missing or unsupported event header field value
<br>10/13 16:34:57 13030 err ERROR:presence:handle_publish: &lt;publish.c: 511&gt; &nbsp; &nbsp; &nbsp; &nbsp;event=[presence]
<br><br>What semicolon it is looking? If I do (*end)== ' ') it still can't parse. Is Bria message has incorrect format?
<br>What was the format of message the parser was written for?
<br><br>Thanks a lot,
<br>Toly
<br /><hr />See how Windows connects the people, information, and fun that are part of your life. <a href='http://clk.atdmt.com/MRT/go/msnnkwxp1020093175mrt/direct/01/' target='_new'>See Now</a></body>
</html>