Modified: freeswitch/branches/gmaruzz/mod_gsmopen/gsmopen_protocol.cpp (15268 => 15269)
--- freeswitch/branches/gmaruzz/mod_gsmopen/gsmopen_protocol.cpp 2009-10-29 13:55:09 UTC (rev 15268)
+++ freeswitch/branches/gmaruzz/mod_gsmopen/gsmopen_protocol.cpp 2009-10-29 14:19:50 UTC (rev 15269)
@@ -1470,10 +1470,11 @@
strncpy(sms_body, content2, sizeof(sms_body));
DEBUGA_GSMOPEN("body=%s\n", GSMOPEN_P_LOG, sms_body);
strncpy(tech_pvt->sms_body, sms_body, sizeof(tech_pvt->sms_body));
- strncpy(tech_pvt->sms_sender, "ciapa", sizeof(tech_pvt->sms_sender));
strncpy(tech_pvt->sms_sender, sms->address().toString().c_str(), sizeof(tech_pvt->sms_sender));
- strncpy(tech_pvt->sms_date, "cucu", sizeof(tech_pvt->sms_date));
strncpy(tech_pvt->sms_date, sms->serviceCentreTimestamp().toString().c_str(), sizeof(tech_pvt->sms_date));
+ strncpy(tech_pvt->sms_datacodingscheme, sms->dataCodingScheme().toString().c_str(), sizeof(tech_pvt->sms_datacodingscheme));
+ strncpy(tech_pvt->sms_servicecentreaddress, sms->serviceCentreAddress().toString().c_str(), sizeof(tech_pvt->sms_servicecentreaddress));
+ tech_pvt->sms_messagetype = sms->messageType();
//messagetype = sms->messageType();
//servicecentreaddress = sms->serviceCentreAddress();
//servicecentretimestamp = sms->serviceCentreTimestamp();
@@ -1565,9 +1566,7 @@
struct timeval call_incoming_timeout;
gettimeofday(&call_incoming_timeout, NULL);
call_incoming_timeout.tv_sec -= 10;
- DEBUGA_GSMOPEN
- ("CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld, call_incoming_timeout.tv_sec=%ld\n",
- GSMOPEN_P_LOG, tech_pvt->call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
+ // DEBUGA_GSMOPEN ("CALLFLOW_CALL_INCOMING call_incoming_time.tv_sec=%ld, call_incoming_timeout.tv_sec=%ld\n", GSMOPEN_P_LOG, tech_pvt->call_incoming_time.tv_sec, call_incoming_timeout.tv_sec);
if (call_incoming_timeout.tv_sec > tech_pvt->ringtime.tv_sec) {
ERRORA("Ringing stopped and I have not answered. Why?\n", GSMOPEN_P_LOG);
DEBUGA_GSMOPEN
@@ -2124,7 +2123,7 @@
switch_channel_t *channel = NULL;
if (option_debug) {
- DEBUGA_PBX("ENTERING FUNC\n", GSMOPEN_P_LOG);
+ //DEBUGA_PBX("ENTERING FUNC\n", GSMOPEN_P_LOG);
}
session = switch_core_session_locate(tech_pvt->session_uuid_str);
Modified: freeswitch/branches/gmaruzz/mod_gsmopen/mod_gsmopen.cpp (15268 => 15269)
--- freeswitch/branches/gmaruzz/mod_gsmopen/mod_gsmopen.cpp 2009-10-29 13:55:09 UTC (rev 15268)
+++ freeswitch/branches/gmaruzz/mod_gsmopen/mod_gsmopen.cpp 2009-10-29 14:19:50 UTC (rev 15269)
@@ -909,7 +909,7 @@
WARNINGA("%s CHANNEL got SWITCH_MESSAGE_INDICATE_AUDIO_SYNC\n", GSMOPEN_P_LOG, switch_channel_get_name(channel));
while ((samples = alsa_read(tech_pvt, tmp_buffer, tech_pvt->read_codec.implementation->samples_per_packet * 4)) > 160) {
- WARNINGA("read %d samples\n", GSMOPEN_P_LOG, samples);
+ //WARNINGA("read %d samples\n", GSMOPEN_P_LOG, samples);
}
switch_core_timer_sync(&tech_pvt->timer_read);
switch_core_timer_sync(&tech_pvt->timer_write);
@@ -2379,7 +2379,7 @@
switch_sleep(1000000);
} else if (tech_pvt->controldevprotocol != PROTOCOL_NO_SERIAL && tech_pvt->interface_state == GSMOPEN_STATE_RING
&& tech_pvt->phone_callflow != CALLFLOW_CALL_HANGUP_REQUESTED) {
- WARNINGA("INCOMING RING\n", GSMOPEN_P_LOG);
+ //WARNINGA("INCOMING RING\n", GSMOPEN_P_LOG);
gsmopen_ring(tech_pvt);
@@ -2522,9 +2522,12 @@
//switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "hint", tech_pvt->chatmessages[which].from_dispname);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "from", tech_pvt->sms_sender);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "date", tech_pvt->sms_date);
- switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "subject", "SIMPLE MESSAGE");
+ switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "datacodingscheme", tech_pvt->sms_datacodingscheme);
+ switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "servicecentreaddress", tech_pvt->sms_servicecentreaddress);
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "messagetype", "%d", tech_pvt->sms_messagetype);
//switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "chatname", tech_pvt->chatmessages[which].chatname);
//switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "id", tech_pvt->chatmessages[which].id);
+ switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "subject", "SIMPLE MESSAGE");
switch_event_add_body(event, "%s", tech_pvt->sms_body);
if (session) {
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "during-call", "true");
@@ -2551,6 +2554,9 @@
//switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "from", tech_pvt->chatmessages[which].from_handle);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "from", tech_pvt->sms_sender);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "date", tech_pvt->sms_date);
+ switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "datacodingscheme", tech_pvt->sms_datacodingscheme);
+ switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "servicecentreaddress", tech_pvt->sms_servicecentreaddress);
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "messagetype", "%d", tech_pvt->sms_messagetype);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "subject", "SIMPLE MESSAGE");
//switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "chatname", tech_pvt->chatmessages[which].chatname);
//switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "id", tech_pvt->chatmessages[which].id);