[Freeswitch-svn] [commit] r5988 - freeswitch/trunk/src/mod/endpoints/mod_sofia
Freeswitch SVN
anthm at freeswitch.org
Thu Oct 18 23:27:03 EDT 2007
Author: anthm
Date: Thu Oct 18 23:27:03 2007
New Revision: 5988
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c
Log:
fix sql
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Thu Oct 18 23:27:03 2007
@@ -979,8 +979,8 @@
switch_time_exp_t tm;
- if (argv[5]) {
- switch_time_t etime = atoi(argv[5]);
+ if (argv[6]) {
+ switch_time_t etime = atoi(argv[6]);
switch_size_t retsize;
switch_time_exp_lt(&tm, switch_time_from_sec(etime));
@@ -989,11 +989,12 @@
cb->stream->write_function(cb->stream,
+ "Call-ID \t%s\n"
"User \t%s@%s\n"
"Contact \t%s\n"
"Status \t%s(%s) EXP(%s)\n\n",
- switch_str_nil(argv[0]), switch_str_nil(argv[1]), switch_str_nil(argv[2]),
- switch_str_nil(argv[3]), switch_str_nil(argv[4]), exp_buf);
+ switch_str_nil(argv[0]), switch_str_nil(argv[1]), switch_str_nil(argv[2]), switch_str_nil(argv[3]),
+ switch_str_nil(argv[4]), switch_str_nil(argv[5]), exp_buf);
return 0;
}
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c Thu Oct 18 23:27:03 2007
@@ -156,8 +156,8 @@
char *contact;
char to[128] = "";
- snprintf(to, sizeof(to), "%s@%s", argv[0], argv[1]);
- contact = sofia_glue_get_url_from_contact(argv[2], 1);
+ snprintf(to, sizeof(to), "%s@%s", argv[1], argv[2]);
+ contact = sofia_glue_get_url_from_contact(argv[3], 1);
nh = nua_handle(profile->nua, NULL, SIPTAG_FROM_STR(profile->url), SIPTAG_TO_STR(to), NUTAG_URL(contact), SIPTAG_CONTACT_STR(profile->url), TAG_END());
@@ -176,10 +176,11 @@
if (argc >= 3) {
if (switch_event_create_subclass(&s_event, SWITCH_EVENT_CUSTOM, MY_EVENT_EXPIRE) == SWITCH_STATUS_SUCCESS) {
switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "profile-name", "%s", argv[0]);
- switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "user", "%s", argv[1]);
- switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "host", "%s", argv[2]);
- switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "contact", "%s", argv[3]);
- switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "expires", "%s", argv[4]);
+ switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "call-id", "%s", argv[1]);
+ switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "user", "%s", argv[2]);
+ switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "host", "%s", argv[3]);
+ switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "contact", "%s", argv[4]);
+ switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "expires", "%s", argv[5]);
switch_event_fire(&s_event);
}
}
More information about the Freeswitch-svn
mailing list