]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
on a transfer lets update the rdnis to the old number
authorKen Rice <krice@freeswitch.org>
Wed, 16 Jan 2008 22:13:36 +0000 (22:13 +0000)
committerKen Rice <krice@freeswitch.org>
Wed, 16 Jan 2008 22:13:36 +0000 (22:13 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7259 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_ivr.c

index 1155d8c7d6900a8befb0ab77bb22d2c822f830e8..005fc73f91d57ba8408553dda279fa320f4660f5 100644 (file)
@@ -28,6 +28,7 @@
  * Neal Horman <neal at wanlink dot com>
  * Matt Klein <mklein@nmedia.net>
  * Michael Jerris <mike@jerris.com>
+ * Ken Rice <krice at suspicious dot org>
  *
  * switch_ivr.c -- IVR Library
  *
@@ -916,9 +917,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_session_transfer(switch_core_session_
                
                new_profile = switch_caller_profile_clone(session, profile);
 
-               new_profile->dialplan = switch_core_strdup(profile->pool, dialplan);
-               new_profile->context = switch_core_strdup(profile->pool, context);
-               new_profile->destination_number = switch_core_strdup(profile->pool, extension);
+               new_profile->dialplan = switch_core_strdup(new_profile->pool, dialplan);
+               new_profile->context = switch_core_strdup(new_profile->pool, context);
+               new_profile->destination_number = switch_core_strdup(new_profile->pool, extension);
+               new_profile->rdnis = switch_core_strdup(new_profile->pool, profile->destination_number);
 
                switch_channel_set_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE, NULL);