[Home]

Summary:ASTERISK-03821: [patch] Parking - Allow user to assign a macro when the call times out
Reporter:mmckernan (mmckernan)Labels:
Date Opened:2005-03-31 07:51:53.000-0600Date Closed:2011-06-07 14:05:24
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/NewFeature
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) park-macro.patch
( 1) park-macro-v2.patch
( 2) park-macro-v3.patch
Description:When a call is timed out from a parking location, the person who receives the call back has no idea where the call came from. This patch enables the user (through the use of the parameter of return-macro in features.conf) to assign a macro for when the call is returned. This can be used to do any number of magic things. The parking location is passed to the macro via ${ARG1}. Applications like SayDigits in the macro definition can then do the magic.
Comments:By: Olle Johansson (oej) 2005-03-31 08:03:51.000-0600

Is this patch disclaimed? (Please read the bug tracker instructions).

By: mmckernan (mmckernan) 2005-03-31 08:09:50.000-0600

This patch is disclaimed. A fax has already been sent with a disclaimer for ASTERISK-3688.

By: Olle Johansson (oej) 2005-03-31 08:46:15.000-0600

Thank you. You need to add that info to every bug you file, since there's no database for us bug marshals.

By: mmckernan (mmckernan) 2005-04-01 17:36:51.000-0600

Maybe an idea that when we send in a disclaimer form to add a karma point to indicate we have? That way you guys know when we have disclaimed?

By: nick (nick) 2005-04-01 20:45:27.000-0600

In the "Additional Information" field, if you write "Disclaimer on File" or even "DOF", we'll see it every time...

Nick

By: nick (nick) 2005-04-01 20:52:26.000-0600

As for your actual patch, please use ast_strlen_zero() instead of strlen().

Nick

By: mmckernan (mmckernan) 2005-04-02 01:39:33.000-0600

I had coded a patch for bug 3777, it had a buffer overflow problem :'(. However markster fixed it and applied it to CVS.

I have re-checked out the tree, and based on the code he re-did for bug ASTERISK-3688 I formed the patch for this. His inital patch included strlen, however I will rewrite it and fix it up.

By: mmckernan (mmckernan) 2005-04-02 01:45:34.000-0600

Hmm, I retract my last comments regarding strlen and ast_strlen_zero.

I have had a really long day and I am not reading properly.

Markster's patch modification from ASTERISK-3688 has nothing to do with my brainwave of the use of strlen on this patch. My horrible mistate. Sorry all.

By: nick (nick) 2005-04-02 10:00:58.000-0600

ast_strlen_zero() returns true if the string is zero length. So while the code you've written probably works right, this function is more commonly used as if(!ast_strlen_zero())...

Nick

By: Michael Jerris (mikej) 2005-05-02 11:09:46

1 month checkup... is this going anywhere?

By: Russell Bryant (russell) 2005-05-24 06:41:34

"When a call is timed out from a parking location, the person who receives the call back has no idea where the call came from."

This is probably a result of new call parking timeout behavior in CVS HEAD, that IMHO, should be optional, and not even the default behavior.

In 1.0, when a parked call times out, it falls back to the s extension in the context from which the call was parked.  Now, in CVS HEAD, it will fall back to the channel name from which the call was parked.  Obviously, that isn't going to work as expected in all cases.

I think that having this new option is fine, too, but I would really like to see this other issue addressed as well.

By: Russell Bryant (russell) 2005-05-24 06:47:54

Code comments:

1) return_macro should be initialized to "" so that the string length is actually zero when not specified in the config file

2) "if(ast_strlen_zero(return_macro) > 0)"
 --  There is no need to check if it is > 0.  Everywhere else in the code, we just do "if (ast_strlen_zero(return_macro))"

3) I have some tiny formatting nitpicks.  There should be a space after the "if" and after each comma in the application arguments.

Thanks!

By: mmckernan (mmckernan) 2005-05-25 05:29:35

Re-did patch, with drumkilla's requests.

Used in production for day or so, seems to work well now.

Disclaimer on file.

By: mmckernan (mmckernan) 2005-06-20 09:08:23

Hi,

Have you had a chance to re-review the new patch provided as per your requests for coding style etc?

Thanks

Mat

By: Russell Bryant (russell) 2005-06-21 09:38:32

It looks good, except for the text in the sample configuration.

"Macro that is run when the call is returned to the parked caller if the park times out before someone picks it up."

Nothing is actually returned to the parked caller, it is the parked caller that is returned.  :)  It could be something like ... "Macro that is run when the parked caller is returned to the channel that parked the call if the parking timeout is reached."

By: Michael Jerris (mikej) 2005-07-25 21:54:11

over a month without updates.  Suspending this bug.  Reopen if you can update based on commnets, then this needs testing comments before it can go in.