<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 -> 10.50.4.40:5070 [AP]
<br>d8754z-697cf1172b7bf515-1---d8754z-;rport.
<br>Max-Forwards: 70.
<br>Contact: <sip:tolyp@10.50.1.101:1572;transport=TCP>.
<br>To: "tolyp"<sip:tolyp@webley>.
<br>From: "tolyp"<sip:tolyp@webley>;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><?xml version='1.0' encoding='UTF-8'?><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'><tuple
id='t5a055764'><status><basic>open</basic></status></tuple><dm:person
id='p5e347748'><dm:note>Available</dm:note></dm:person></presence>
<br><br>Here is the code from parser/parse_event.c
<br><br> if ((_e->text.len == PRES_STR_LEN) &&
<br> !strncasecmp(PRES_STR, tmp.s, _e->text.len)) {
<br> _e->parsed = EVENT_PRESENCE;
<br> } else if ((_e->text.len == PRES_XCAP_CHANGE_STR_LEN) &&
<br> !strncasecmp(PRES_XCAP_CHANGE_STR, tmp.s, _e->text.len)) {
<br> _e->parsed = EVENT_XCAP_CHANGE;
<br> } else if ((_e->text.len == PRES_WINFO_STR_LEN) &&
<br> !strncasecmp(PRES_WINFO_STR, tmp.s, _e->text.len)) {
<br> _e->parsed = EVENT_PRESENCE_WINFO;
<br> } else if ((_e->text.len == PRES_SIP_PROFILE_STR_LEN) &&
<br> !strncasecmp(PRES_SIP_PROFILE_STR, tmp.s, _e->text.len)) {
<br> _e->parsed = EVENT_SIP_PROFILE;
<br> } else if ((_e->text.len == DIALOG_STR_LEN) &&
<br> !strncasecmp(DIALOG_STR, tmp.s, _e->text.len)) {
<br> _e->parsed = EVENT_DIALOG;
<br> } else if ((_e->text.len == MWI_STR_LEN) &&
<br> !strncasecmp(MWI_STR, tmp.s, _e->text.len)) {
<br> _e->parsed = EVENT_MWI;
<br> } else {
<br> _e->parsed = EVENT_OTHER;
<br> }
<br> if( (*end)== ';')
<br> {
<br> str params_str;
<br> params_str.s= end+1;
<br> end= skip_token(params_str.s, tmp.len- _e->text.len- 1);
<br>
<br> params_str.len= end- params_str.s;
<br><br> if (parse_params(&params_str, CLASS_ANY, &phooks, &_e->params)<0)
<br> return -1;
<br> }
<br> else
<br> _e->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: <publish.c: 508> Missing or unsupported event header field value
<br>10/13 16:34:57 13030 err ERROR:presence:handle_publish: <publish.c: 511> 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>