summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlle Johansson <oej@edvina.net>2007-11-25 19:33:33 +0000
committerOlle Johansson <oej@edvina.net>2007-11-25 19:33:33 +0000
commit595961655a3567f38426de824f20d04d4ee713af (patch)
tree714382b5f2c9c7c0d60d0c5cc5bc67cc1935c01c
parentf1de129e5f0e5cbf92b9d4e06a4d7eec19ebbcdc (diff)
Try to get channel.h and channel.c aligned in regards to ast_set_callerid as well
as change name of variables to follow the rest of the naming. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89564 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--include/asterisk/channel.h25
-rw-r--r--main/channel.c14
2 files changed, 27 insertions, 12 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h
index 68206f6a3..6b864ecf8 100644
--- a/include/asterisk/channel.h
+++ b/include/asterisk/channel.h
@@ -712,16 +712,30 @@ struct ast_channel *ast_request(const char *type, int format, void *data, int *s
* \param data data to pass to the channel requester
* \param timeout maximum amount of time to wait for an answer
* \param reason why unsuccessful (if unsuccessful)
- * \param cidnum Caller-ID Number
- * \param cidname Caller-ID Name
+ * \param cid_num Caller-ID Number
+ * \param cid_name Caller-ID Name (ascii)
* \return Returns an ast_channel on success or no answer, NULL on failure. Check the value of chan->_state
* to know if the call was answered or not.
*/
struct ast_channel *ast_request_and_dial(const char *type, int format, void *data,
- int timeout, int *reason, const char *cidnum, const char *cidname);
+ int timeout, int *reason, const char *cid_num, const char *cid_name);
+/*!
+ * \brief Request a channel of a given type, with data as optional information used
+ * by the low level module and attempt to place a call on it
+ * \param type type of channel to request
+ * \param format requested channel format
+ * \param data data to pass to the channel requester
+ * \param timeout maximum amount of time to wait for an answer
+ * \param reason why unsuccessful (if unsuccessful)
+ * \param cid_num Caller-ID Number
+ * \param cid_name Caller-ID Name (ascii)
+ * \param oh Outgoing helper
+ * \return Returns an ast_channel on success or no answer, NULL on failure. Check the value of chan->_state
+ * to know if the call was answered or not.
+ */
struct ast_channel *__ast_request_and_dial(const char *type, int format, void *data,
- int timeout, int *reason, const char *cidnum, const char *cidname, struct outgoing_helper *oh);
+ int timeout, int *reason, const char *cid_num, const char *cid_name, struct outgoing_helper *oh);
/*!\brief Register a channel technology (a new channel driver)
* Called by a channel module to register the kind of channels it supports.
@@ -1200,7 +1214,8 @@ int ast_activate_generator(struct ast_channel *chan, struct ast_generator *gen,
/*! Deactivate an active generator */
void ast_deactivate_generator(struct ast_channel *chan);
-void ast_set_callerid(struct ast_channel *chan, const char *cidnum, const char *cidname, const char *ani);
+/*! Set caller ID number, name and ANI */
+void ast_set_callerid(struct ast_channel *chan, const char *cid_num, const char *cid_name, const char *cid_ani);
/*! Set the file descriptor on the channel */
void ast_channel_set_fd(struct ast_channel *chan, int which, int fd);
diff --git a/main/channel.c b/main/channel.c
index 8e16b733e..13968e483 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -3755,22 +3755,22 @@ int ast_do_masquerade(struct ast_channel *original)
return 0;
}
-void ast_set_callerid(struct ast_channel *chan, const char *callerid, const char *calleridname, const char *ani)
+void ast_set_callerid(struct ast_channel *chan, const char *cid_num, const char *cid_name, const char *cid_ani)
{
- if (callerid) {
+ if (cid_num) {
if (chan->cid.cid_num)
ast_free(chan->cid.cid_num);
- chan->cid.cid_num = ast_strdup(callerid);
+ chan->cid.cid_num = ast_strdup(cid_num);
}
- if (calleridname) {
+ if (cid_name) {
if (chan->cid.cid_name)
ast_free(chan->cid.cid_name);
- chan->cid.cid_name = ast_strdup(calleridname);
+ chan->cid.cid_name = ast_strdup(cid_name);
}
- if (ani) {
+ if (cid_ani) {
if (chan->cid.cid_ani)
ast_free(chan->cid.cid_ani);
- chan->cid.cid_ani = ast_strdup(ani);
+ chan->cid.cid_ani = ast_strdup(cid_ani);
}
if (chan->cdr)
ast_cdr_setcid(chan->cdr, chan);