Asterisk - The Open Source Telephony Project  18.5.0
Data Fields
extension_child_dialstring Struct Reference

Data regarding an extension monitor's child's dialstrings. More...

Collaboration diagram for extension_child_dialstring:
Collaboration graph
[legend]

Data Fields

char device_name [AST_CHANNEL_NAME]
 The name of the device being dialed. More...
 
int is_valid
 Is this structure valid for use in CC_INTERFACES? More...
 
struct {
   struct extension_child_dialstring *   next
 
next
 
char original_dialstring [AST_CHANNEL_NAME]
 the original dialstring used to call a particular device More...
 

Detailed Description

Data regarding an extension monitor's child's dialstrings.

In developing CCSS, we had most aspects of its operation finished, but there was one looming problem that we had failed to get right. In our design document, we stated that when a CC recall occurs, all endpoints that had been dialed originally would be called back. Unfortunately, our implementation only allowed for devices which had active monitors to inhabit the CC_INTERFACES channel variable, thus making the automated recall only call monitored devices.

Devices that were not CC-capable, or devices which failed CC at some point during the process would not make it into the CC_INTERFACES channel variable. This struct is meant as a remedy for the problem.

Definition at line 1760 of file ccss.c.

Field Documentation

◆ device_name

char device_name[AST_CHANNEL_NAME]

The name of the device being dialed.

This serves mainly as a key when searching for a particular dialstring. For instance, let's say that we have called device SIP/400@somepeer. This device offers call completion, but then due to some unforeseen circumstance, this device backs out and makes CC unavailable. When that happens, we need to find the dialstring that corresponds to that device, and we use the stored device name as a way to find it.

Note
There is one particular case where the device name stored here will be empty. This is the case where we fail to request a channel, but we still can make use of generic call completion. In such a case, since we never were able to request the channel, we can't find what its device name is. In this case, however, it is not important because the dialstring is guaranteed to be the same both here and in the device monitor.

Definition at line 1795 of file ccss.c.

Referenced by ast_cc_extension_monitor_add_dialstring(), and cc_extension_monitor_change_is_valid().

◆ is_valid

int is_valid

Is this structure valid for use in CC_INTERFACES?

When this structure is first created, all information stored here is planned to be used, so we set the is_valid flag. However, if a device offers call completion, it will potentially have its own dialstring to use for the recall, so we find this structure and clear the is_valid flag. By clearing the is_valid flag, we won't try to populate the CC_INTERFACES variable with the dialstring stored in this struct. Now, if later, the device which had offered CC should fail, perhaps due to a timer expiration, then we need to re-set the is_valid flag. This way, we still will end up placing a call to the device again, and the dialstring used will be the same as was originally used.

Definition at line 1810 of file ccss.c.

Referenced by ast_cc_extension_monitor_add_dialstring(), build_cc_interfaces_chanvar(), and cc_extension_monitor_change_is_valid().

◆ next [1/2]

◆ next [2/2]

struct { ... } next

◆ original_dialstring

char original_dialstring[AST_CHANNEL_NAME]

the original dialstring used to call a particular device

When someone dials a particular endpoint, the dialstring used in the dialplan is copied into this buffer. What's important here is that this is the ORIGINAL dialstring, not the dialstring saved on a device monitor. The dialstring on a device monitor is what should be used when recalling that device. The two dialstrings may not be the same.

By keeping a copy of the original dialstring used, we can fall back to using it if the device either does not ever offer CC or if the device at some point fails for some reason, such as a timer expiration.

Definition at line 1776 of file ccss.c.

Referenced by ast_cc_extension_monitor_add_dialstring(), and build_cc_interfaces_chanvar().


The documentation for this struct was generated from the following file: