"Contact" header missing in the PUBLISH request

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>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);
> 
> (...)



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux