summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
Diffstat (limited to 'res')
-rw-r--r--res/res_ari_applications.c6
-rw-r--r--res/res_ari_asterisk.c26
-rw-r--r--res/res_ari_bridges.c16
-rw-r--r--res/res_ari_channels.c34
-rw-r--r--res/res_ari_device_states.c4
-rw-r--r--res/res_ari_endpoints.c10
-rw-r--r--res/res_ari_events.c6
-rw-r--r--res/res_ari_mailboxes.c4
-rw-r--r--res/res_ari_playbacks.c6
-rw-r--r--res/res_ari_recordings.c18
-rw-r--r--res/res_ari_sounds.c4
-rw-r--r--res/res_format_attr_g729.c76
-rw-r--r--res/res_pjsip.c26
-rw-r--r--res/res_pjsip/pjsip_configuration.c27
14 files changed, 196 insertions, 67 deletions
diff --git a/res/res_ari_applications.c b/res/res_ari_applications.c
index e81d16498..dd868a602 100644
--- a/res/res_ari_applications.c
+++ b/res/res_ari_applications.c
@@ -496,7 +496,7 @@ fin: __attribute__((unused))
return;
}
-/*! \brief REST handler for /api-docs/applications.{format} */
+/*! \brief REST handler for /api-docs/applications.json */
static struct stasis_rest_handlers applications_applicationName_subscription = {
.path_segment = "subscription",
.callbacks = {
@@ -506,7 +506,7 @@ static struct stasis_rest_handlers applications_applicationName_subscription = {
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/applications.{format} */
+/*! \brief REST handler for /api-docs/applications.json */
static struct stasis_rest_handlers applications_applicationName = {
.path_segment = "applicationName",
.is_wildcard = 1,
@@ -516,7 +516,7 @@ static struct stasis_rest_handlers applications_applicationName = {
.num_children = 1,
.children = { &applications_applicationName_subscription, }
};
-/*! \brief REST handler for /api-docs/applications.{format} */
+/*! \brief REST handler for /api-docs/applications.json */
static struct stasis_rest_handlers applications = {
.path_segment = "applications",
.callbacks = {
diff --git a/res/res_ari_asterisk.c b/res/res_ari_asterisk.c
index fe6e3d363..b52a2a722 100644
--- a/res/res_ari_asterisk.c
+++ b/res/res_ari_asterisk.c
@@ -1178,7 +1178,7 @@ fin: __attribute__((unused))
return;
}
-/*! \brief REST handler for /api-docs/asterisk.{format} */
+/*! \brief REST handler for /api-docs/asterisk.json */
static struct stasis_rest_handlers asterisk_config_dynamic_configClass_objectType_id = {
.path_segment = "id",
.is_wildcard = 1,
@@ -1190,7 +1190,7 @@ static struct stasis_rest_handlers asterisk_config_dynamic_configClass_objectTyp
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/asterisk.{format} */
+/*! \brief REST handler for /api-docs/asterisk.json */
static struct stasis_rest_handlers asterisk_config_dynamic_configClass_objectType = {
.path_segment = "objectType",
.is_wildcard = 1,
@@ -1199,7 +1199,7 @@ static struct stasis_rest_handlers asterisk_config_dynamic_configClass_objectTyp
.num_children = 1,
.children = { &asterisk_config_dynamic_configClass_objectType_id, }
};
-/*! \brief REST handler for /api-docs/asterisk.{format} */
+/*! \brief REST handler for /api-docs/asterisk.json */
static struct stasis_rest_handlers asterisk_config_dynamic_configClass = {
.path_segment = "configClass",
.is_wildcard = 1,
@@ -1208,7 +1208,7 @@ static struct stasis_rest_handlers asterisk_config_dynamic_configClass = {
.num_children = 1,
.children = { &asterisk_config_dynamic_configClass_objectType, }
};
-/*! \brief REST handler for /api-docs/asterisk.{format} */
+/*! \brief REST handler for /api-docs/asterisk.json */
static struct stasis_rest_handlers asterisk_config_dynamic = {
.path_segment = "dynamic",
.callbacks = {
@@ -1216,7 +1216,7 @@ static struct stasis_rest_handlers asterisk_config_dynamic = {
.num_children = 1,
.children = { &asterisk_config_dynamic_configClass, }
};
-/*! \brief REST handler for /api-docs/asterisk.{format} */
+/*! \brief REST handler for /api-docs/asterisk.json */
static struct stasis_rest_handlers asterisk_config = {
.path_segment = "config",
.callbacks = {
@@ -1224,7 +1224,7 @@ static struct stasis_rest_handlers asterisk_config = {
.num_children = 1,
.children = { &asterisk_config_dynamic, }
};
-/*! \brief REST handler for /api-docs/asterisk.{format} */
+/*! \brief REST handler for /api-docs/asterisk.json */
static struct stasis_rest_handlers asterisk_info = {
.path_segment = "info",
.callbacks = {
@@ -1233,7 +1233,7 @@ static struct stasis_rest_handlers asterisk_info = {
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/asterisk.{format} */
+/*! \brief REST handler for /api-docs/asterisk.json */
static struct stasis_rest_handlers asterisk_modules_moduleName = {
.path_segment = "moduleName",
.is_wildcard = 1,
@@ -1246,7 +1246,7 @@ static struct stasis_rest_handlers asterisk_modules_moduleName = {
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/asterisk.{format} */
+/*! \brief REST handler for /api-docs/asterisk.json */
static struct stasis_rest_handlers asterisk_modules = {
.path_segment = "modules",
.callbacks = {
@@ -1255,7 +1255,7 @@ static struct stasis_rest_handlers asterisk_modules = {
.num_children = 1,
.children = { &asterisk_modules_moduleName, }
};
-/*! \brief REST handler for /api-docs/asterisk.{format} */
+/*! \brief REST handler for /api-docs/asterisk.json */
static struct stasis_rest_handlers asterisk_logging_logChannelName_rotate = {
.path_segment = "rotate",
.callbacks = {
@@ -1264,7 +1264,7 @@ static struct stasis_rest_handlers asterisk_logging_logChannelName_rotate = {
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/asterisk.{format} */
+/*! \brief REST handler for /api-docs/asterisk.json */
static struct stasis_rest_handlers asterisk_logging_logChannelName = {
.path_segment = "logChannelName",
.is_wildcard = 1,
@@ -1275,7 +1275,7 @@ static struct stasis_rest_handlers asterisk_logging_logChannelName = {
.num_children = 1,
.children = { &asterisk_logging_logChannelName_rotate, }
};
-/*! \brief REST handler for /api-docs/asterisk.{format} */
+/*! \brief REST handler for /api-docs/asterisk.json */
static struct stasis_rest_handlers asterisk_logging = {
.path_segment = "logging",
.callbacks = {
@@ -1284,7 +1284,7 @@ static struct stasis_rest_handlers asterisk_logging = {
.num_children = 1,
.children = { &asterisk_logging_logChannelName, }
};
-/*! \brief REST handler for /api-docs/asterisk.{format} */
+/*! \brief REST handler for /api-docs/asterisk.json */
static struct stasis_rest_handlers asterisk_variable = {
.path_segment = "variable",
.callbacks = {
@@ -1294,7 +1294,7 @@ static struct stasis_rest_handlers asterisk_variable = {
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/asterisk.{format} */
+/*! \brief REST handler for /api-docs/asterisk.json */
static struct stasis_rest_handlers asterisk = {
.path_segment = "asterisk",
.callbacks = {
diff --git a/res/res_ari_bridges.c b/res/res_ari_bridges.c
index 860ff1dc0..889d42213 100644
--- a/res/res_ari_bridges.c
+++ b/res/res_ari_bridges.c
@@ -1318,7 +1318,7 @@ fin: __attribute__((unused))
return;
}
-/*! \brief REST handler for /api-docs/bridges.{format} */
+/*! \brief REST handler for /api-docs/bridges.json */
static struct stasis_rest_handlers bridges_bridgeId_addChannel = {
.path_segment = "addChannel",
.callbacks = {
@@ -1327,7 +1327,7 @@ static struct stasis_rest_handlers bridges_bridgeId_addChannel = {
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/bridges.{format} */
+/*! \brief REST handler for /api-docs/bridges.json */
static struct stasis_rest_handlers bridges_bridgeId_removeChannel = {
.path_segment = "removeChannel",
.callbacks = {
@@ -1336,7 +1336,7 @@ static struct stasis_rest_handlers bridges_bridgeId_removeChannel = {
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/bridges.{format} */
+/*! \brief REST handler for /api-docs/bridges.json */
static struct stasis_rest_handlers bridges_bridgeId_moh = {
.path_segment = "moh",
.callbacks = {
@@ -1346,7 +1346,7 @@ static struct stasis_rest_handlers bridges_bridgeId_moh = {
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/bridges.{format} */
+/*! \brief REST handler for /api-docs/bridges.json */
static struct stasis_rest_handlers bridges_bridgeId_play_playbackId = {
.path_segment = "playbackId",
.is_wildcard = 1,
@@ -1356,7 +1356,7 @@ static struct stasis_rest_handlers bridges_bridgeId_play_playbackId = {
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/bridges.{format} */
+/*! \brief REST handler for /api-docs/bridges.json */
static struct stasis_rest_handlers bridges_bridgeId_play = {
.path_segment = "play",
.callbacks = {
@@ -1365,7 +1365,7 @@ static struct stasis_rest_handlers bridges_bridgeId_play = {
.num_children = 1,
.children = { &bridges_bridgeId_play_playbackId, }
};
-/*! \brief REST handler for /api-docs/bridges.{format} */
+/*! \brief REST handler for /api-docs/bridges.json */
static struct stasis_rest_handlers bridges_bridgeId_record = {
.path_segment = "record",
.callbacks = {
@@ -1374,7 +1374,7 @@ static struct stasis_rest_handlers bridges_bridgeId_record = {
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/bridges.{format} */
+/*! \brief REST handler for /api-docs/bridges.json */
static struct stasis_rest_handlers bridges_bridgeId = {
.path_segment = "bridgeId",
.is_wildcard = 1,
@@ -1386,7 +1386,7 @@ static struct stasis_rest_handlers bridges_bridgeId = {
.num_children = 5,
.children = { &bridges_bridgeId_addChannel,&bridges_bridgeId_removeChannel,&bridges_bridgeId_moh,&bridges_bridgeId_play,&bridges_bridgeId_record, }
};
-/*! \brief REST handler for /api-docs/bridges.{format} */
+/*! \brief REST handler for /api-docs/bridges.json */
static struct stasis_rest_handlers bridges = {
.path_segment = "bridges",
.callbacks = {
diff --git a/res/res_ari_channels.c b/res/res_ari_channels.c
index a14a9c8cb..9dc19cc86 100644
--- a/res/res_ari_channels.c
+++ b/res/res_ari_channels.c
@@ -2567,7 +2567,7 @@ fin: __attribute__((unused))
return;
}
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
static struct stasis_rest_handlers channels_channelId_continue = {
.path_segment = "continue",
.callbacks = {
@@ -2576,7 +2576,7 @@ static struct stasis_rest_handlers channels_channelId_continue = {
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
static struct stasis_rest_handlers channels_channelId_redirect = {
.path_segment = "redirect",
.callbacks = {
@@ -2585,7 +2585,7 @@ static struct stasis_rest_handlers channels_channelId_redirect = {
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
static struct stasis_rest_handlers channels_channelId_answer = {
.path_segment = "answer",
.callbacks = {
@@ -2594,7 +2594,7 @@ static struct stasis_rest_handlers channels_channelId_answer = {
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
static struct stasis_rest_handlers channels_channelId_ring = {
.path_segment = "ring",
.callbacks = {
@@ -2604,7 +2604,7 @@ static struct stasis_rest_handlers channels_channelId_ring = {
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
static struct stasis_rest_handlers channels_channelId_dtmf = {
.path_segment = "dtmf",
.callbacks = {
@@ -2613,7 +2613,7 @@ static struct stasis_rest_handlers channels_channelId_dtmf = {
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
static struct stasis_rest_handlers channels_channelId_mute = {
.path_segment = "mute",
.callbacks = {
@@ -2623,7 +2623,7 @@ static struct stasis_rest_handlers channels_channelId_mute = {
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
static struct stasis_rest_handlers channels_channelId_hold = {
.path_segment = "hold",
.callbacks = {
@@ -2633,7 +2633,7 @@ static struct stasis_rest_handlers channels_channelId_hold = {
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
static struct stasis_rest_handlers channels_channelId_moh = {
.path_segment = "moh",
.callbacks = {
@@ -2643,7 +2643,7 @@ static struct stasis_rest_handlers channels_channelId_moh = {
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
static struct stasis_rest_handlers channels_channelId_silence = {
.path_segment = "silence",
.callbacks = {
@@ -2653,7 +2653,7 @@ static struct stasis_rest_handlers channels_channelId_silence = {
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
static struct stasis_rest_handlers channels_channelId_play_playbackId = {
.path_segment = "playbackId",
.is_wildcard = 1,
@@ -2663,7 +2663,7 @@ static struct stasis_rest_handlers channels_channelId_play_playbackId = {
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
static struct stasis_rest_handlers channels_channelId_play = {
.path_segment = "play",
.callbacks = {
@@ -2672,7 +2672,7 @@ static struct stasis_rest_handlers channels_channelId_play = {
.num_children = 1,
.children = { &channels_channelId_play_playbackId, }
};
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
static struct stasis_rest_handlers channels_channelId_record = {
.path_segment = "record",
.callbacks = {
@@ -2681,7 +2681,7 @@ static struct stasis_rest_handlers channels_channelId_record = {
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
static struct stasis_rest_handlers channels_channelId_variable = {
.path_segment = "variable",
.callbacks = {
@@ -2691,7 +2691,7 @@ static struct stasis_rest_handlers channels_channelId_variable = {
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
static struct stasis_rest_handlers channels_channelId_snoop_snoopId = {
.path_segment = "snoopId",
.is_wildcard = 1,
@@ -2701,7 +2701,7 @@ static struct stasis_rest_handlers channels_channelId_snoop_snoopId = {
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
static struct stasis_rest_handlers channels_channelId_snoop = {
.path_segment = "snoop",
.callbacks = {
@@ -2710,7 +2710,7 @@ static struct stasis_rest_handlers channels_channelId_snoop = {
.num_children = 1,
.children = { &channels_channelId_snoop_snoopId, }
};
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
static struct stasis_rest_handlers channels_channelId = {
.path_segment = "channelId",
.is_wildcard = 1,
@@ -2722,7 +2722,7 @@ static struct stasis_rest_handlers channels_channelId = {
.num_children = 13,
.children = { &channels_channelId_continue,&channels_channelId_redirect,&channels_channelId_answer,&channels_channelId_ring,&channels_channelId_dtmf,&channels_channelId_mute,&channels_channelId_hold,&channels_channelId_moh,&channels_channelId_silence,&channels_channelId_play,&channels_channelId_record,&channels_channelId_variable,&channels_channelId_snoop, }
};
-/*! \brief REST handler for /api-docs/channels.{format} */
+/*! \brief REST handler for /api-docs/channels.json */
static struct stasis_rest_handlers channels = {
.path_segment = "channels",
.callbacks = {
diff --git a/res/res_ari_device_states.c b/res/res_ari_device_states.c
index f15e3da78..6d5d19f58 100644
--- a/res/res_ari_device_states.c
+++ b/res/res_ari_device_states.c
@@ -320,7 +320,7 @@ fin: __attribute__((unused))
return;
}
-/*! \brief REST handler for /api-docs/deviceStates.{format} */
+/*! \brief REST handler for /api-docs/deviceStates.json */
static struct stasis_rest_handlers deviceStates_deviceName = {
.path_segment = "deviceName",
.is_wildcard = 1,
@@ -332,7 +332,7 @@ static struct stasis_rest_handlers deviceStates_deviceName = {
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/deviceStates.{format} */
+/*! \brief REST handler for /api-docs/deviceStates.json */
static struct stasis_rest_handlers deviceStates = {
.path_segment = "deviceStates",
.callbacks = {
diff --git a/res/res_ari_endpoints.c b/res/res_ari_endpoints.c
index 4d54ff3bd..e3ade435d 100644
--- a/res/res_ari_endpoints.c
+++ b/res/res_ari_endpoints.c
@@ -434,7 +434,7 @@ fin: __attribute__((unused))
return;
}
-/*! \brief REST handler for /api-docs/endpoints.{format} */
+/*! \brief REST handler for /api-docs/endpoints.json */
static struct stasis_rest_handlers endpoints_sendMessage = {
.path_segment = "sendMessage",
.callbacks = {
@@ -443,7 +443,7 @@ static struct stasis_rest_handlers endpoints_sendMessage = {
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/endpoints.{format} */
+/*! \brief REST handler for /api-docs/endpoints.json */
static struct stasis_rest_handlers endpoints_tech_resource_sendMessage = {
.path_segment = "sendMessage",
.callbacks = {
@@ -452,7 +452,7 @@ static struct stasis_rest_handlers endpoints_tech_resource_sendMessage = {
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/endpoints.{format} */
+/*! \brief REST handler for /api-docs/endpoints.json */
static struct stasis_rest_handlers endpoints_tech_resource = {
.path_segment = "resource",
.is_wildcard = 1,
@@ -462,7 +462,7 @@ static struct stasis_rest_handlers endpoints_tech_resource = {
.num_children = 1,
.children = { &endpoints_tech_resource_sendMessage, }
};
-/*! \brief REST handler for /api-docs/endpoints.{format} */
+/*! \brief REST handler for /api-docs/endpoints.json */
static struct stasis_rest_handlers endpoints_tech = {
.path_segment = "tech",
.is_wildcard = 1,
@@ -472,7 +472,7 @@ static struct stasis_rest_handlers endpoints_tech = {
.num_children = 1,
.children = { &endpoints_tech_resource, }
};
-/*! \brief REST handler for /api-docs/endpoints.{format} */
+/*! \brief REST handler for /api-docs/endpoints.json */
static struct stasis_rest_handlers endpoints = {
.path_segment = "endpoints",
.callbacks = {
diff --git a/res/res_ari_events.c b/res/res_ari_events.c
index 65bd38d5b..e85db4c45 100644
--- a/res/res_ari_events.c
+++ b/res/res_ari_events.c
@@ -407,7 +407,7 @@ fin: __attribute__((unused))
return;
}
-/*! \brief REST handler for /api-docs/events.{format} */
+/*! \brief REST handler for /api-docs/events.json */
static struct stasis_rest_handlers events_user_eventName = {
.path_segment = "eventName",
.is_wildcard = 1,
@@ -417,7 +417,7 @@ static struct stasis_rest_handlers events_user_eventName = {
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/events.{format} */
+/*! \brief REST handler for /api-docs/events.json */
static struct stasis_rest_handlers events_user = {
.path_segment = "user",
.callbacks = {
@@ -425,7 +425,7 @@ static struct stasis_rest_handlers events_user = {
.num_children = 1,
.children = { &events_user_eventName, }
};
-/*! \brief REST handler for /api-docs/events.{format} */
+/*! \brief REST handler for /api-docs/events.json */
static struct stasis_rest_handlers events = {
.path_segment = "events",
.callbacks = {
diff --git a/res/res_ari_mailboxes.c b/res/res_ari_mailboxes.c
index 2b3404f2b..6ed16a84e 100644
--- a/res/res_ari_mailboxes.c
+++ b/res/res_ari_mailboxes.c
@@ -326,7 +326,7 @@ fin: __attribute__((unused))
return;
}
-/*! \brief REST handler for /api-docs/mailboxes.{format} */
+/*! \brief REST handler for /api-docs/mailboxes.json */
static struct stasis_rest_handlers mailboxes_mailboxName = {
.path_segment = "mailboxName",
.is_wildcard = 1,
@@ -338,7 +338,7 @@ static struct stasis_rest_handlers mailboxes_mailboxName = {
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/mailboxes.{format} */
+/*! \brief REST handler for /api-docs/mailboxes.json */
static struct stasis_rest_handlers mailboxes = {
.path_segment = "mailboxes",
.callbacks = {
diff --git a/res/res_ari_playbacks.c b/res/res_ari_playbacks.c
index de38ad86d..233603303 100644
--- a/res/res_ari_playbacks.c
+++ b/res/res_ari_playbacks.c
@@ -270,7 +270,7 @@ fin: __attribute__((unused))
return;
}
-/*! \brief REST handler for /api-docs/playbacks.{format} */
+/*! \brief REST handler for /api-docs/playbacks.json */
static struct stasis_rest_handlers playbacks_playbackId_control = {
.path_segment = "control",
.callbacks = {
@@ -279,7 +279,7 @@ static struct stasis_rest_handlers playbacks_playbackId_control = {
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/playbacks.{format} */
+/*! \brief REST handler for /api-docs/playbacks.json */
static struct stasis_rest_handlers playbacks_playbackId = {
.path_segment = "playbackId",
.is_wildcard = 1,
@@ -290,7 +290,7 @@ static struct stasis_rest_handlers playbacks_playbackId = {
.num_children = 1,
.children = { &playbacks_playbackId_control, }
};
-/*! \brief REST handler for /api-docs/playbacks.{format} */
+/*! \brief REST handler for /api-docs/playbacks.json */
static struct stasis_rest_handlers playbacks = {
.path_segment = "playbacks",
.callbacks = {
diff --git a/res/res_ari_recordings.c b/res/res_ari_recordings.c
index dede53c48..04ce0ac97 100644
--- a/res/res_ari_recordings.c
+++ b/res/res_ari_recordings.c
@@ -737,7 +737,7 @@ fin: __attribute__((unused))
return;
}
-/*! \brief REST handler for /api-docs/recordings.{format} */
+/*! \brief REST handler for /api-docs/recordings.json */
static struct stasis_rest_handlers recordings_stored_recordingName_copy = {
.path_segment = "copy",
.callbacks = {
@@ -746,7 +746,7 @@ static struct stasis_rest_handlers recordings_stored_recordingName_copy = {
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/recordings.{format} */
+/*! \brief REST handler for /api-docs/recordings.json */
static struct stasis_rest_handlers recordings_stored_recordingName = {
.path_segment = "recordingName",
.is_wildcard = 1,
@@ -757,7 +757,7 @@ static struct stasis_rest_handlers recordings_stored_recordingName = {
.num_children = 1,
.children = { &recordings_stored_recordingName_copy, }
};
-/*! \brief REST handler for /api-docs/recordings.{format} */
+/*! \brief REST handler for /api-docs/recordings.json */
static struct stasis_rest_handlers recordings_stored = {
.path_segment = "stored",
.callbacks = {
@@ -766,7 +766,7 @@ static struct stasis_rest_handlers recordings_stored = {
.num_children = 1,
.children = { &recordings_stored_recordingName, }
};
-/*! \brief REST handler for /api-docs/recordings.{format} */
+/*! \brief REST handler for /api-docs/recordings.json */
static struct stasis_rest_handlers recordings_live_recordingName_stop = {
.path_segment = "stop",
.callbacks = {
@@ -775,7 +775,7 @@ static struct stasis_rest_handlers recordings_live_recordingName_stop = {
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/recordings.{format} */
+/*! \brief REST handler for /api-docs/recordings.json */
static struct stasis_rest_handlers recordings_live_recordingName_pause = {
.path_segment = "pause",
.callbacks = {
@@ -785,7 +785,7 @@ static struct stasis_rest_handlers recordings_live_recordingName_pause = {
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/recordings.{format} */
+/*! \brief REST handler for /api-docs/recordings.json */
static struct stasis_rest_handlers recordings_live_recordingName_mute = {
.path_segment = "mute",
.callbacks = {
@@ -795,7 +795,7 @@ static struct stasis_rest_handlers recordings_live_recordingName_mute = {
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/recordings.{format} */
+/*! \brief REST handler for /api-docs/recordings.json */
static struct stasis_rest_handlers recordings_live_recordingName = {
.path_segment = "recordingName",
.is_wildcard = 1,
@@ -806,7 +806,7 @@ static struct stasis_rest_handlers recordings_live_recordingName = {
.num_children = 3,
.children = { &recordings_live_recordingName_stop,&recordings_live_recordingName_pause,&recordings_live_recordingName_mute, }
};
-/*! \brief REST handler for /api-docs/recordings.{format} */
+/*! \brief REST handler for /api-docs/recordings.json */
static struct stasis_rest_handlers recordings_live = {
.path_segment = "live",
.callbacks = {
@@ -814,7 +814,7 @@ static struct stasis_rest_handlers recordings_live = {
.num_children = 1,
.children = { &recordings_live_recordingName, }
};
-/*! \brief REST handler for /api-docs/recordings.{format} */
+/*! \brief REST handler for /api-docs/recordings.json */
static struct stasis_rest_handlers recordings = {
.path_segment = "recordings",
.callbacks = {
diff --git a/res/res_ari_sounds.c b/res/res_ari_sounds.c
index c53330d54..935025dec 100644
--- a/res/res_ari_sounds.c
+++ b/res/res_ari_sounds.c
@@ -208,7 +208,7 @@ fin: __attribute__((unused))
return;
}
-/*! \brief REST handler for /api-docs/sounds.{format} */
+/*! \brief REST handler for /api-docs/sounds.json */
static struct stasis_rest_handlers sounds_soundId = {
.path_segment = "soundId",
.is_wildcard = 1,
@@ -218,7 +218,7 @@ static struct stasis_rest_handlers sounds_soundId = {
.num_children = 0,
.children = { }
};
-/*! \brief REST handler for /api-docs/sounds.{format} */
+/*! \brief REST handler for /api-docs/sounds.json */
static struct stasis_rest_handlers sounds = {
.path_segment = "sounds",
.callbacks = {
diff --git a/res/res_format_attr_g729.c b/res/res_format_attr_g729.c
new file mode 100644
index 000000000..5ba4920d9
--- /dev/null
+++ b/res/res_format_attr_g729.c
@@ -0,0 +1,76 @@
+/*
+ * Asterisk -- An open source telephony toolkit.
+ *
+ * Copyright (C) 2016, Digium, Inc.
+ *
+ * Jason Parker <jparker@sangoma.com>
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
+ */
+
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
+#include "asterisk.h"
+
+ASTERISK_REGISTER_FILE()
+
+#include "asterisk/module.h"
+#include "asterisk/format.h"
+
+/* Destroy is a required callback and must exist */
+static void g729_destroy(struct ast_format *format)
+{
+}
+
+/* Clone is a required callback and must exist */
+static int g729_clone(const struct ast_format *src, struct ast_format *dst)
+{
+ return 0;
+}
+
+static void g729_generate_sdp_fmtp(const struct ast_format *format, unsigned int payload, struct ast_str **str)
+{
+ /*
+ * According to the rfc the joint annexb format parameter should be set to 'yes'
+ * or 'no' based on the answerer (rfc7261 - 3.3). However, Asterisk being a B2BUA
+ * makes things tricky. So for now Asterisk will set annexb=no.
+ */
+ ast_str_append(str, 0, "a=fmtp:%u annexb=no\r\n", payload);
+}
+
+static struct ast_format_interface g729_interface = {
+ .format_destroy = g729_destroy,
+ .format_clone = g729_clone,
+ .format_generate_sdp_fmtp = g729_generate_sdp_fmtp,
+};
+
+static int load_module(void)
+{
+ if (ast_format_interface_register("g729", &g729_interface)) {
+ return AST_MODULE_LOAD_DECLINE;
+ }
+
+ return AST_MODULE_LOAD_SUCCESS;
+}
+
+static int unload_module(void)
+{
+ return 0;
+}
+
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "G.729 Format Attribute Module",
+ .support_level = AST_MODULE_SUPPORT_CORE,
+ .load = load_module,
+ .unload = unload_module,
+ .load_pri = AST_MODPRI_CHANNEL_DEPEND,
+);
diff --git a/res/res_pjsip.c b/res/res_pjsip.c
index aafb3a211..96c07d501 100644
--- a/res/res_pjsip.c
+++ b/res/res_pjsip.c
@@ -913,6 +913,12 @@
then the <replaceable>context</replaceable> setting is used.
</para></description>
</configOption>
+ <configOption name="contact_user" default="">
+ <synopsis>Force the user on the outgoing Contact header to this value.</synopsis>
+ <description><para>
+ On outbound requests, force the user portion of the Contact header to this value.
+ </para></description>
+ </configOption>
</configObject>
<configObject name="auth">
<synopsis>Authentication type</synopsis>
@@ -2869,8 +2875,16 @@ pjsip_dialog *ast_sip_create_dialog_uac(const struct ast_sip_endpoint *endpoint,
/* Update the dialog with the new local URI, we do it afterwards so we can use the dialog pool for construction */
pj_strdup_with_null(dlg->pool, &dlg->local.info_str, &local_uri);
dlg->local.info->uri = pjsip_parse_uri(dlg->pool, dlg->local.info_str.ptr, dlg->local.info_str.slen, 0);
+
dlg->local.contact = pjsip_parse_hdr(dlg->pool, &HCONTACT, local_uri.ptr, local_uri.slen, NULL);
+ if (!ast_strlen_zero(endpoint->contact_user)) {
+ pjsip_sip_uri *sip_uri;
+
+ sip_uri = pjsip_uri_get_uri(dlg->local.contact->uri);
+ pj_strdup2(dlg->pool, &sip_uri->user, endpoint->contact_user);
+ }
+
/* If a request user has been specified and we are permitted to change it, do so */
if (!ast_strlen_zero(request_user)) {
pjsip_sip_uri *sip_uri;
@@ -3172,6 +3186,18 @@ static int create_out_of_dialog_request(const pjsip_method *method, struct ast_s
return -1;
}
+ if (endpoint && !ast_strlen_zero(endpoint->contact_user)){
+ pjsip_contact_hdr *contact_hdr;
+ pjsip_sip_uri *contact_uri;
+ static const pj_str_t HCONTACT = { "Contact", 7 };
+
+ contact_hdr = pjsip_msg_find_hdr_by_name((*tdata)->msg, &HCONTACT, NULL);
+ if (contact_hdr) {
+ contact_uri = pjsip_uri_get_uri(contact_hdr->uri);
+ pj_strdup2(pool, &contact_uri->user, endpoint->contact_user);
+ }
+ }
+
/* Add the user=phone parameter if applicable */
ast_sip_add_usereqphone(endpoint, (*tdata)->pool, (*tdata)->msg->line.req.uri);
diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c
index 9e757e230..c3012c4b2 100644
--- a/res/res_pjsip/pjsip_configuration.c
+++ b/res/res_pjsip/pjsip_configuration.c
@@ -1211,6 +1211,31 @@ static int voicemail_extension_to_str(const void *obj, const intptr_t *args, cha
return 0;
}
+static int contact_user_handler(const struct aco_option *opt,
+ struct ast_variable *var, void *obj)
+{
+ struct ast_sip_endpoint *endpoint = obj;
+
+ endpoint->contact_user = ast_strdup(var->value);
+ if (!endpoint->contact_user) {
+ return -1;
+ }
+
+ return 0;
+}
+
+static int contact_user_to_str(const void *obj, const intptr_t *args, char **buf)
+{
+ const struct ast_sip_endpoint *endpoint = obj;
+
+ *buf = ast_strdup(endpoint->contact_user);
+ if (!(*buf)) {
+ return -1;
+ }
+
+ return 0;
+}
+
static void *sip_nat_hook_alloc(const char *name)
{
return ast_sorcery_generic_alloc(sizeof(struct ast_sip_nat_hook), NULL);
@@ -1907,6 +1932,7 @@ int ast_res_pjsip_initialize_configuration(const struct ast_module_info *ast_mod
ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "contact_permit", "", endpoint_acl_handler, NULL, NULL, 0, 0);
ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "contact_acl", "", endpoint_acl_handler, contact_acl_to_str, NULL, 0, 0);
ast_sorcery_object_field_register(sip_sorcery, "endpoint", "subscribe_context", "", OPT_CHAR_ARRAY_T, 0, CHARFLDSET(struct ast_sip_endpoint, subscription.context));
+ ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "contact_user", "", contact_user_handler, contact_user_to_str, NULL, 0, 0);
if (ast_sip_initialize_sorcery_transport()) {
ast_log(LOG_ERROR, "Failed to register SIP transport support with sorcery\n");
@@ -2038,6 +2064,7 @@ static void endpoint_destructor(void* obj)
ao2_cleanup(endpoint->persistent);
ast_variables_destroy(endpoint->channel_vars);
AST_VECTOR_FREE(&endpoint->ident_method_order);
+ ast_free(endpoint->contact_user);
}
static int init_subscription_configuration(struct ast_sip_endpoint_subscription_configuration *subscription)