From 216dce139c613aba2691c2579180c93174e509d8 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 5 Oct 2011 12:49:47 -0500 Subject: [PATCH 1/4] revert this it might annoy ppl with no transcoding --- src/switch_ivr.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/switch_ivr.c b/src/switch_ivr.c index 85ffa00b8a..19d3c102a1 100644 --- a/src/switch_ivr.c +++ b/src/switch_ivr.c @@ -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); From 86efff6c1fcba926f3c2ee889da57031e180d9ab Mon Sep 17 00:00:00 2001 From: Brian West Date: Wed, 5 Oct 2011 20:39:08 -0500 Subject: [PATCH 2/4] missed a check_Decode --- src/mod/endpoints/mod_sofia/sofia.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index c2b344cdf7..f3ab8c48ef 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -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); } From 7d6747c9ef4e8e98dbf0b9ee36c407770bec4eae Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 5 Oct 2011 13:54:47 -0500 Subject: [PATCH 3/4] update --- scripts/perl/tonegen/rtttl2tgml.pl | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/perl/tonegen/rtttl2tgml.pl b/scripts/perl/tonegen/rtttl2tgml.pl index 820e36cc4e..a8a3ed0632 100644 --- a/scripts/perl/tonegen/rtttl2tgml.pl +++ b/scripts/perl/tonegen/rtttl2tgml.pl @@ -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 = ; +} 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; } From b2d2353ce915fabe0729218adfd266a6dad388ed Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 5 Oct 2011 13:55:16 -0500 Subject: [PATCH 4/4] FS-3596 --resolve --- src/mod/endpoints/mod_sofia/sofia_reg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mod/endpoints/mod_sofia/sofia_reg.c b/src/mod/endpoints/mod_sofia/sofia_reg.c index bccae9293f..4978815f98 100644 --- a/src/mod/endpoints/mod_sofia/sofia_reg.c +++ b/src/mod/endpoints/mod_sofia/sofia_reg.c @@ -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;