Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (16129 => 16130)
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c 2010-01-03 20:17:38 UTC (rev 16129)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c 2010-01-03 21:10:34 UTC (rev 16130)
@@ -143,9 +143,12 @@
if (s_event != NULL) {
switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "event-package", sip->sip_event->o_type);
switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "event-id", sip->sip_event->o_id);
+
+ if (sip->sip_contact && sip->sip_contact->m_url) {
+ switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "contact", "%s@%s",
+ sip->sip_contact->m_url->url_user, sip->sip_contact->m_url->url_host);
+ }
- switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "contact", "%s@%s",
- sip->sip_contact->m_url->url_user, sip->sip_contact->m_url->url_host);
switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "from", "%s@%s",
sip->sip_from->a_url->url_user, sip->sip_from->a_url->url_host);
switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "from-tag", sip->sip_from->a_tag);