summaryrefslogtreecommitdiff
path: root/apps/app_sms.c
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2004-10-02 00:58:31 +0000
committerMark Spencer <markster@digium.com>2004-10-02 00:58:31 +0000
commit04fc29c8b2e7db9b66a138f47412770867819f7f (patch)
tree25a4ee6dff29d18acfdfbbc42485333db7aa5311 /apps/app_sms.c
parent9b926b1d644c49c0e8bbe7cbc02aeb60ccc3c8ef (diff)
Huge callerid rework (might break H.323, others)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3874 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_sms.c')
-rwxr-xr-xapps/app_sms.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/apps/app_sms.c b/apps/app_sms.c
index a7b55bd46..3a4d5392e 100755
--- a/apps/app_sms.c
+++ b/apps/app_sms.c
@@ -1050,17 +1050,8 @@ sms_exec(struct ast_channel *chan, void *data)
return -1;
}
- if (chan->callerid) {
- /* get caller ID. Used as originating address on sc side receives */
- char temp[256], *name, *num;
- strncpy (temp, chan->callerid, sizeof(temp) - 1);
- ast_callerid_parse (temp, &name, &num);
- if (!num)
- num = temp;
- ast_shrink_phone_number (num);
- if (strlen (num) < sizeof (h.cli))
- strncpy(h.cli, num, sizeof(h.cli) - 1);
- }
+ if (chan->cid.cid_num)
+ strncpy(h.cli, chan->cid.cid_num, sizeof(h.cli) - 1);
{
char *d = data, *p, answer = 0;