summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJonathan Rose <jrose@digium.com>2013-07-04 18:46:56 +0000
committerJonathan Rose <jrose@digium.com>2013-07-04 18:46:56 +0000
commit93ed5ef0ffdffc342ef2e0670b9cf51686027401 (patch)
tree71e36bba6f8e575ed9aa542f4183f33cb816fce2 /include
parentfb03bf9b39ad1f8b8bb50077cc54457edd8d6d9a (diff)
res_parking: Replace Parker snapshots with ParkerDialString
This process also involved a large amount of rework regarding how to redial the Parker when a channel leaves a parking lot due to timeout. An attended transfer channel variable has been added to attended transfers to extensions that will eventually park (but haven't at the time of transfer) as well. This resolves one of the two BUGBUG comments remaining in res_parking. (issues ASTERISK-21877) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2638/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/channel.h8
-rw-r--r--include/asterisk/parking.h8
2 files changed, 12 insertions, 4 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h
index d61494141..2e7468418 100644
--- a/include/asterisk/channel.h
+++ b/include/asterisk/channel.h
@@ -4375,5 +4375,13 @@ int ast_channel_forward_endpoint(struct ast_channel *chan, struct ast_endpoint *
*/
const char *ast_channel_oldest_linkedid(const char *a, const char *b);
+/*!
+ * \brief Removes the trailing identifiers from a channel name string
+ * \since 12.0.0
+ *
+ * \param channel_name string that you wish to turn into a dial string.
+ * This string will be edited in place.
+ */
+void ast_channel_name_to_dial_string(char *channel_name);
#endif /* _ASTERISK_CHANNEL_H */
diff --git a/include/asterisk/parking.h b/include/asterisk/parking.h
index c4019d9cb..dd8a67bf2 100644
--- a/include/asterisk/parking.h
+++ b/include/asterisk/parking.h
@@ -45,14 +45,14 @@ enum ast_parked_call_event_type {
*/
struct ast_parked_call_payload {
struct ast_channel_snapshot *parkee; /*!< Snapshot of the channel that is parked */
- struct ast_channel_snapshot *parker; /*!< Snapshot of the channel that parked the call */
- struct ast_channel_snapshot *retriever; /*!< Snapshot of the channel that retrieved the call */
+ struct ast_channel_snapshot *retriever; /*!< Snapshot of the channel that retrieved the call (may be NULL) */
enum ast_parked_call_event_type event_type; /*!< Reason for issuing the parked call message */
long unsigned int timeout; /*!< Time remaining before the call times out (seconds ) */
long unsigned int duration; /*!< How long the parkee has been parked (seconds) */
unsigned int parkingspace; /*!< Which Parking Space the parkee occupies */
AST_DECLARE_STRING_FIELDS(
AST_STRING_FIELD(parkinglot); /*!< Name of the parking lot used to park the parkee */
+ AST_STRING_FIELD(parker_dial_string); /*!< The device string used for call control on parking timeout */
);
};
@@ -64,7 +64,7 @@ struct ast_exten;
*
* \param event_type What kind of parked call event is happening
* \param parkee_snapshot channel snapshot of the parkee
- * \param parker_snapshot channel snapshot of the parker
+ * \param parker_dial_string dialstring used when the call times out
* \param retriever_snapshot channel snapshot of the retriever (NULL allowed)
* \param parkinglot name of the parking lot where the parked call is parked
* \param parkingspace what numerical parking space the parked call is parked in
@@ -75,7 +75,7 @@ struct ast_exten;
* \retval reference to a newly created parked call payload
*/
struct ast_parked_call_payload *ast_parked_call_payload_create(enum ast_parked_call_event_type event_type,
- struct ast_channel_snapshot *parkee_snapshot, struct ast_channel_snapshot *parker_snapshot,
+ struct ast_channel_snapshot *parkee_snapshot, const char *parker_dial_string,
struct ast_channel_snapshot *retriever_snapshot, const char *parkinglot,
unsigned int parkingspace, unsigned long int timeout, unsigned long int duration);