[Freeswitch-svn] [commit] r4414 - freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr
Freeswitch SVN
mishehu at freeswitch.org
Wed Feb 28 17:22:48 EST 2007
Author: mishehu
Date: Wed Feb 28 17:22:47 2007
New Revision: 4414
Modified:
freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/basecdr.cpp
Log:
Refactored basecdr.cpp just a little, changes for switch_strlen_zero() test out fine.
Modified: freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/basecdr.cpp
==============================================================================
--- freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/basecdr.cpp (original)
+++ freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/basecdr.cpp Wed Feb 28 17:22:47 2007
@@ -103,39 +103,32 @@
if(!switch_strlen_zero(newchannel->callerprofile->network_addr))
strncpy(network_addr,newchannel->callerprofile->network_addr,strlen(newchannel->callerprofile->network_addr));
- }
-
- //switch_caller_profile_t *originateprofile = switch_channel_get_originator_caller_profile(newchannel->channel->callerprofile);
- // Were we the receiver of the call?
- if(newchannel->callerprofile->originator_caller_profile)
- {
- originated = 0;
- if(!switch_strlen_zero(newchannel->callerprofile->originator_caller_profile->uuid))
- strncpy(destuuid,newchannel->callerprofile->originator_caller_profile->uuid,strlen(newchannel->callerprofile->originator_caller_profile->uuid));
- if(newchannel->callerprofile)
+ // Were we the receiver of the call?
+ if(newchannel->callerprofile->originator_caller_profile)
{
+ originated = 0;
+ if(!switch_strlen_zero(newchannel->callerprofile->originator_caller_profile->uuid))
+ strncpy(destuuid,newchannel->callerprofile->originator_caller_profile->uuid,strlen(newchannel->callerprofile->originator_caller_profile->uuid));
+
if(!switch_strlen_zero(newchannel->callerprofile->destination_number))
strncpy(src,newchannel->callerprofile->destination_number,strlen(newchannel->callerprofile->destination_number));
if(!switch_strlen_zero(newchannel->callerprofile->caller_id_number))
strncpy(dst,newchannel->callerprofile->caller_id_number,strlen(newchannel->callerprofile->caller_id_number));
}
- }
- else
- {
- //originateprofile = switch_channel_get_originatee_profile(newchannel->channel->callerprofile);
- // Or were we maybe we were the caller?
- if(newchannel->callerprofile->originatee_caller_profile)
+ else
{
- if (newchannel->callerprofile)
+ //originateprofile = switch_channel_get_originatee_profile(newchannel->channel->callerprofile);
+ // Or were we maybe we were the caller?
+ if(newchannel->callerprofile->originatee_caller_profile)
{
if(!switch_strlen_zero(newchannel->callerprofile->caller_id_number))
strncpy(src,newchannel->callerprofile->caller_id_number,strlen(newchannel->callerprofile->caller_id_number));
if(!switch_strlen_zero(newchannel->callerprofile->destination_number))
strncpy(dst,newchannel->callerprofile->destination_number,strlen(newchannel->callerprofile->destination_number));
+ if(!switch_strlen_zero(newchannel->callerprofile->originatee_caller_profile->chan_name))
+ strncpy(dstchannel,newchannel->callerprofile->originatee_caller_profile->chan_name,strlen(newchannel->callerprofile->originatee_caller_profile->chan_name));
}
- if(!switch_strlen_zero(newchannel->callerprofile->originatee_caller_profile->chan_name))
- strncpy(dstchannel,newchannel->callerprofile->originatee_caller_profile->chan_name,strlen(newchannel->callerprofile->originatee_caller_profile->chan_name));
}
}
More information about the Freeswitch-svn
mailing list