Logo Search packages:      
Sourcecode: sofia-sip version File versions  Download package

SOFIAPUBFUN int nea_server_add_irq ( nea_server_t nes,
nta_leg_t leg,
sip_contact_t const *  local_target,
nta_incoming_t irq,
sip_t const *  sip 

Add a new subscriber from subscribe transaction to an existing notifier.

Process incoming request

Definition at line 1483 of file nea_server.c.

References sip_addr_s::a_tag, sip_contact_s::m_url, nea_sub_process_incoming(), nea_server_s::nes_agent, nea_server_s::nes_eventity_uri, nea_server_s::nes_home, nea_server_s::nes_leg, nea_sub_s::s_from, nea_sub_s::s_leg, nea_sub_s::s_local, sip_s::sip_call_id, sip_s::sip_contact, sip_contact_dup(), sip_s::sip_from, sip_from_dup(), sip_s::sip_record_route, sip_s::sip_to, SIPTAG_CALL_ID, SIPTAG_FROM, SIPTAG_TO, TAG_NULL, and URLTAG_URL.

  nea_sub_t *s = NULL;
  s = nea_sub_create(nes);

  s->s_from = sip_from_dup(nes->nes_home, sip->sip_from);

  if (local_target == NULL)
    local_target = nes->nes_eventity_uri;

  s->s_local = sip_contact_dup(nes->nes_home, local_target);

  if (leg == NULL || leg == nes->nes_leg) {
    url_t target[1];
    *target = *local_target->m_url;

    s->s_leg = nta_leg_tcreate(nes->nes_agent, nea_sub_process_incoming, s, 
                         URLTAG_URL((url_string_t *)target),
  else {
    nta_leg_bind(s->s_leg = leg, nea_sub_process_incoming, s);
  if (s->s_leg) {
    if (sip->sip_to->a_tag == NULL) {
      nta_leg_tag(s->s_leg, NULL);
      nta_incoming_tag(irq, nta_leg_get_tag(s->s_leg));
    nta_leg_server_route(s->s_leg, sip->sip_record_route, sip->sip_contact);

    return nea_sub_process_incoming(s, s->s_leg, irq, sip);
  else {
    return 500;

Generated by  Doxygen 1.6.0   Back to index