My problem is that SIP server I'm currently using (FreeSWITCH, the latest build from its Git repository) is requiring it to be there. Would it be a problem to add it there? I was looking into their source code and it seems to be much bigger problem to adjust it on their side. Not only that, if client doesn't subscribe to 'message-summary' event previously, FreeSWITCH will respond with 404 (not found) to that same PUBLISH request. And thank you for a really quick reply :) Regards, - Silvije On 12/12/11 17:48 PM, shawn at voipswitch.com wrote: > From RFC 3903: > > The PUBLISH request MAY contain a Contact header field, but including > one in a PUBLISH request has no meaning in the event publication > context and will be ignored by the ESC. > > Regards, > Shawn > > On Mon, 12 Dec 2011 17:34:59 +0100, Silvije Kalabi? > <silvije.kalabic at fiveminutes.eu> wrote: >> Hello, >> >> Did you notice that "Contact" header is missing in the PUBLISH request? >> >> What do you think about this as a fix: >> >> >> >> static pj_status_t send_publish(int acc_id, pj_bool_t active) >> { >> pjsua_acc_config *acc_cfg =&pjsua_var.acc[acc_id].cfg; >> pjsua_acc *acc =&pjsua_var.acc[acc_id]; >> pjsip_pres_status pres_status; >> pjsip_tx_data *tdata; >> pj_status_t status; >> /* missing in PUBLISH request */ >> pjsip_contact_hdr* contact = NULL; >> >> /* Create PUBLISH request */ >> if (active) { >> char *bpos; >> pj_str_t entity; >> >> status = pjsip_publishc_publish(acc->publish_sess, PJ_TRUE,&tdata); >> if (status != PJ_SUCCESS) { >> pjsua_perror(THIS_FILE, "Error creating PUBLISH request", status); >> goto on_error; >> } >> >> /* missing in PUBLISH request */ >> contact = pjsip_contact_hdr_create(tdata->pool); >> contact->uri = pjsip_parse_uri( tdata->pool, acc->contact.ptr, >> acc->contact.slen, PJSIP_PARSE_URI_AS_NAMEADDR); >> pjsip_msg_add_hdr(tdata->msg, contact); >> >> (...) > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip at lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org