add some events and more data to core DB

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1115 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Brian West committed 2006-04-11 14:55:14 +00:00
1 parent 72820b56f2
commit 628e59a3ae
6 files changed
+89 -20

No files matched your search

+16 -4
View File
@@ -1086,6 +1086,7 @@ static switch_status exosip_create_call(eXosip_event_t * event)
osip_from_t *from;
char *displayname, *username;
osip_header_t *tedious;
char *val;
switch_core_session_add_stream(session, NULL);
if ((tech_pvt = (struct private_object *) switch_core_session_alloc(session, sizeof(struct private_object))) != 0) {
@@ -1112,10 +1113,21 @@ static switch_status exosip_create_call(eXosip_event_t * event)
switch_core_session_destroy(&session);
return SWITCH_STATUS_MEMERR;
}
if (!(displayname = osip_from_get_displayname(from))) {
displayname = event->request->from->url->username;
if (!displayname) {
displayname = "n/a";
if (!(val = osip_from_get_displayname(from))) {
val = event->request->from->url->username;
if (!val) {
val = "n/a";
}
}
displayname = switch_core_session_strdup(session, val);
if (*displayname == '"') {
char *p;
displayname++;
if ((p = strchr(displayname, '"'))) {
*p = '\0';
}
}