Merge branch 'master' of ssh://git.freeswitch.org:222/freeswitch

This commit is contained in:
Joao Mesquita 2011-10-05 19:13:21 -03:00
commit e46332127c
4 changed files with 17 additions and 8 deletions

View File

@ -18,8 +18,19 @@ our $NOTES = {
my $file = shift or die "no file\n";
my $rtttl;
my $cr = "\n";
my $rtttl = `cat $file`;
if ($file eq "-nocr") {
$cr = "";
$file = shift;
}
if ($file eq "-") {
$rtttl = <STDIN>;
} else {
$rtttl = `cat $file`;
}
$rtttl =~ s/\n//g;
@ -53,7 +64,7 @@ foreach (@{$all}) {
#print STDERR "$_->[0] $_->[1] $_->[2] $_->[3]\n";
print "%($ms, 0, $NOTES->{$_->[1]}->[$_->[2]]);\n";
print "%($ms,0,$NOTES->{$_->[1]}->[$_->[2]]);" . $cr;
}

View File

@ -8129,6 +8129,7 @@ void sofia_info_send_sipfrag(switch_core_session_t *aleg, switch_core_session_t
if (zstr(acp->caller_id_name)) {
snprintf(message, sizeof(message), "P-Asserted-Identity: \"%s\" <%s>", acp->caller_id_number, acp->caller_id_number);
} else {
check_decode(acp->caller_id_name, aleg);
snprintf(message, sizeof(message), "P-Asserted-Identity: \"%s\" <%s>", acp->caller_id_name, acp->caller_id_number);
}

View File

@ -72,7 +72,7 @@ static void sofia_reg_kill_reg(sofia_gateway_t *gateway_ptr)
nua_handle_bind(gateway_ptr->nh, NULL);
}
if (gateway_ptr->state != REG_STATE_REGED) {
if (gateway_ptr->state != REG_STATE_REGED && gateway_ptr->state != REG_STATE_UNREGISTER) {
if (gateway_ptr->nh) {
nua_handle_destroy(gateway_ptr->nh);
gateway_ptr->nh = NULL;

View File

@ -138,7 +138,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_sleep(switch_core_session_t *session,
unsigned char *abuf = NULL;
switch_codec_implementation_t imp = { 0 };
switch_codec_t codec = { 0 };
int sval = -1;
int sval = 0;
const char *var;
/*
@ -192,7 +192,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_sleep(switch_core_session_t *session,
write_frame.codec = &codec;
switch_zmalloc(abuf, SWITCH_RECOMMENDED_BUFFER_SIZE);
memset(abuf, 255, SWITCH_RECOMMENDED_BUFFER_SIZE);
write_frame.data = abuf;
write_frame.buflen = SWITCH_RECOMMENDED_BUFFER_SIZE;
write_frame.datalen = imp.decoded_bytes_per_packet;
@ -295,9 +294,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_sleep(switch_core_session_t *session,
}
if (sval && write_frame.datalen) {
if (sval > 0) {
switch_generate_sln_silence((int16_t *) write_frame.data, write_frame.samples, sval);
}
switch_generate_sln_silence((int16_t *) write_frame.data, write_frame.samples, sval);
switch_core_session_write_frame(session, &write_frame, SWITCH_IO_FLAG_NONE, 0);
} else {
switch_core_session_write_frame(session, &cng_frame, SWITCH_IO_FLAG_NONE, 0);