aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_sms.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-10-02 00:58:31 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-10-02 00:58:31 +0000
commit6868babd229a635c5fd89c7b284025a92e0a3f9d (patch)
tree25a4ee6dff29d18acfdfbbc42485333db7aa5311 /apps/app_sms.c
parentb201da1a3eb1cae654cdd3fe89ef8f9e55dd0b83 (diff)
Huge callerid rework (might break H.323, others)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3874 f38db490-d61c-443f-a65b-d21fe96a405b
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;