[svn-commits] rmudgett: branch rmudgett/parking r330822 - /team/rmudgett/parking/main/
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Aug 3 13:35:23 CDT 2011
Author: rmudgett
Date: Wed Aug 3 13:35:19 2011
New Revision: 330822
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=330822
Log:
Add connected line updates when retrieving a parked call.
Modified:
team/rmudgett/parking/main/features.c
Modified: team/rmudgett/parking/main/features.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/parking/main/features.c?view=diff&rev=330822&r1=330821&r2=330822
==============================================================================
--- team/rmudgett/parking/main/features.c (original)
+++ team/rmudgett/parking/main/features.c Wed Aug 3 13:35:19 2011
@@ -4638,7 +4638,30 @@
}
AST_LIST_UNLOCK(&parkinglot->parkings);
-/* BUGBUG we need to update connected line for this connection. */
+ if (peer) {
+ /* Update connected line between retrieving call and parked call. */
+ struct ast_party_connected_line connected;
+
+ ast_party_connected_line_init(&connected);
+
+ /* Send our caller-id to peer. */
+ ast_channel_lock(chan);
+ ast_connected_line_copy_from_caller(&connected, &chan->caller);
+ ast_channel_unlock(chan);
+ connected.source = AST_CONNECTED_LINE_UPDATE_SOURCE_ANSWER;
+ ast_channel_queue_connected_line_update(chan, &connected, NULL);
+
+ /* Get caller-id from peer. */
+ ast_channel_lock(peer);
+ ast_connected_line_copy_from_caller(&connected, &peer->caller);
+ ast_channel_unlock(peer);
+ connected.source = AST_CONNECTED_LINE_UPDATE_SOURCE_ANSWER;
+ if (ast_channel_connected_line_macro(peer, chan, &connected, 0, 0)) {
+ ast_channel_update_connected_line(chan, &connected, NULL);
+ }
+
+ ast_party_connected_line_free(&connected);
+ }
/* JK02: it helps to answer the channel if not already up */
if (chan->_state != AST_STATE_UP) {
More information about the svn-commits
mailing list