diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-08-07 05:35:45 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-08-07 05:35:45 +0000 |
commit | 169b53505ac9b89e1212b48e06a89570593003dc (patch) | |
tree | 8a2569d40e5aaf1cc5c8aa014e70dd28f7bbedce /res | |
parent | 80c651f140ec58fbff5cfca8c966117c3704bd91 (diff) |
Make parking resume properly when in macro
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1270 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rwxr-xr-x | res/res_parking.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/res/res_parking.c b/res/res_parking.c index 13bdbaf6b..821dcee79 100755 --- a/res/res_parking.c +++ b/res/res_parking.c @@ -137,9 +137,18 @@ int ast_park_call(struct ast_channel *chan, struct ast_channel *peer, int timeou *extout = x; /* Remember what had been dialed, so that if the parking expires, we try to come back to the same place */ - strncpy(pu->context, chan->context, sizeof(pu->context)-1); - strncpy(pu->exten, chan->exten, sizeof(pu->exten)-1); - pu->priority = chan->priority; + if (strlen(chan->macrocontext)) + strncpy(pu->context, chan->macrocontext, sizeof(pu->context)-1); + else + strncpy(pu->context, chan->context, sizeof(pu->context)-1); + if (strlen(chan->macroexten)) + strncpy(pu->exten, chan->macroexten, sizeof(pu->exten)-1); + else + strncpy(pu->exten, chan->exten, sizeof(pu->exten)-1); + if (chan->macropriority) + pu->priority = chan->macropriority; + else + pu->priority = chan->priority; pu->next = parkinglot; parkinglot = pu; ast_pthread_mutex_unlock(&parking_lock); |