Revision
15126
Author
anthm
Date
2009-10-08 21:09:49 -0500 (Thu, 08 Oct 2009)

Log Message

sense att xfer in valet

Modified Paths

Diff

Modified: freeswitch/trunk/src/mod/applications/mod_valet_parking/mod_valet_parking.c (15125 => 15126)


--- freeswitch/trunk/src/mod/applications/mod_valet_parking/mod_valet_parking.c	2009-10-09 00:52:25 UTC (rev 15125)
+++ freeswitch/trunk/src/mod/applications/mod_valet_parking/mod_valet_parking.c	2009-10-09 02:09:49 UTC (rev 15126)
@@ -97,6 +97,7 @@
 		switch_status_t status;
 		switch_input_args_t args = { 0 };
 		char dbuf[10];
+		char *dest;
 
 		lot = valet_find_lot(lot_name);
 		switch_assert(lot);
@@ -152,7 +153,12 @@
 			switch_mutex_unlock(lot->mutex);
 			return;
 		}
-			
+
+
+		dest = switch_core_session_sprintf(session, "valet_park:%s %s", lot_name, ext);
+		switch_channel_set_variable(channel, "inline_destination", dest);
+
+		
 		if (!(tmp = switch_channel_get_variable(channel, "valet_hold_music"))) {
 			tmp = switch_channel_get_variable(channel, "hold_music");
 		}

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (15125 => 15126)


--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	2009-10-09 00:52:25 UTC (rev 15125)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	2009-10-09 02:09:49 UTC (rev 15126)
@@ -4374,6 +4374,7 @@
 
 								if (t_session) {
 									switch_channel_t *t_channel = switch_core_session_get_channel(t_session);
+									const char *idest = switch_channel_get_variable(hup_channel, "inline_destination");
 									ext = switch_channel_get_variable(hup_channel, "destination_number");
 
 									if (!switch_strlen_zero(full_ref_by)) {
@@ -4383,8 +4384,13 @@
 									if (!switch_strlen_zero(full_ref_to)) {
 										switch_channel_set_variable(t_channel, SOFIA_REFER_TO_VARIABLE, full_ref_to);
 									}
-
-									switch_ivr_session_transfer(t_session, ext, NULL, NULL);
+									
+									if (idest) {
+										switch_ivr_session_transfer(t_session, idest, "inline", NULL);
+									} else {
+										switch_ivr_session_transfer(t_session, ext, NULL, NULL);
+									}
+									
 									nua_notify(tech_pvt->nh,
 											   NUTAG_NEWSUB(1),
 											   SIPTAG_CONTENT_TYPE_STR("message/sipfrag"),