[Home]

Summary:ASTERISK-06552: [patch]] flash zap trunk from softphone or IP handsets
Reporter:Marc-andre Poupier (mapoupier)Labels:
Date Opened:2006-03-15 06:08:20.000-0600Date Closed:2011-06-07 14:02:49
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Resources/res_features
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) map_flash2.patch
( 1) map-flash5.patch
Description:I wanted the ability to execute the Flash application on a zap channel from any Softphone or IP Phones.

This patch add a detect context to features.conf, the new context when you call a feature that uses it will try to find which of the chan or peer is the Zap and send the appropriate channel to the Flash application.


So my coworker don't need to know whether they received or placed the original call to call the flash from 2 different feature either they are the callee or caller.


****** ADDITIONAL INFORMATION ******

My features.conf contain something like:
zapflash => **,detect,Flash,()

My Extensions.conf looks like this:
[globals]
DYNAMIC_FEATURES=>zapflash

[guardian]
[…]
exten => _9NXXNXXXXXX,1,Dial(Zap/1/${EXTEN:1},,wW)

[incoming]
exten => s,1,Answer()
exten => s,n,Wait(2)
exten => s,n,Dial(SIP/221,,wW)
exten => s,n,Playback(pls-wait-connect-call)
exten => s,n,Flash()
exten => s,n,SendDTMF(mycellphonenumberhere)
exten => s,n,Wait(5)
exten => s,n,Hangup()
[…]

Comments:By: Andrey S Pankov (casper) 2006-03-19 14:07:44.000-0600

You need a disclaimer on file with Digium for them to even look at your patch.

By: Marc-andre Poupier (mapoupier) 2006-03-20 02:43:35.000-0600

Is there a general disclamer that I need to use?

By: Andrey S Pankov (casper) 2006-03-20 12:30:46.000-0600

In order to keep copyright clean, contributed code needs to be disclaimed. Disclaimers can be found at http://www.digium.com/disclaim.changes [^] or http://www.digium.com/disclaimer.txt [^] (both documents are fine, just whichever you are more comfortable with) and should be faxed to +1-256-864-0464 and/or snail mailed to:

Disclaimers
Digium
150 West Park Loop Suite 100
Huntsville, AL 35806
USA

Either is fine, just choose the one that makes you most comfortable. Thanks!

By: Serge Vecher (serge-v) 2006-05-03 15:40:58

mapoupier: how is that disclaimer coming?

By: Marc-andre Poupier (mapoupier) 2006-05-03 16:48:32

the new file does have the disclaimer...

By: Serge Vecher (serge-v) 2006-05-04 08:59:32

1) could you please fax the disclaimer to Digium?
2) please review the coding-guidelines: indentation levels are separated by tabs.

Thanks.

By: Serge Vecher (serge-v) 2006-05-26 11:39:58

mapoupier: please update the patch and fax the disclaimer. Thank you.

By: Serge Vecher (serge-v) 2006-06-05 20:21:48

mapoupier: last try ....

By: Marc-andre Poupier (mapoupier) 2006-06-05 21:05:22

I faxed the disclaimer at least 4times so far don't tell me you didn't get it...

By: Andrey S Pankov (casper) 2006-06-06 13:00:28

Please update sample configuration file as well... Thanks!

By: Serge Vecher (serge-v) 2006-06-06 13:07:05

mapoupier: thanks for updating the patch. I don't work for Digium, so I don't know whether you've sent it or not.

By: Andrey S Pankov (casper) 2006-07-09 08:41:19

vechers: and again formatting is BAD :(
if(!strcasecmp(chan->tech->type, "Zap"))
else if(!strcasecmp(peer->tech->type, "Zap"))
ast_set_flag(feature,AST_FEATURE_FLAG_DETECT);

By: Serge Vecher (serge-v) 2006-07-10 09:12:26

ok, I must have done it in the early bugtracking days ;)

By: Marc-andre Poupier (mapoupier) 2006-07-10 09:37:43

I don't get it what is still not correctly formated?

and why does it still says that you don't have the disclaimer on file?

By: Serge Vecher (serge-v) 2006-07-10 09:55:47

mapopier, as casper noted, the following block has bad formatting:
+ if(!strcasecmp(chan->tech->type, "Zap"))
+ work = chan;
+ else if(!strcasecmp(peer->tech->type, "Zap"))
needs to be:
+ if (!strcasecmp(chan->tech->type, "Zap"))
+ work = chan;
+ else if (!strcasecmp(peer->tech->type, "Zap"))
2. This line needs to use tabs for indentation, not spaces
+#define AST_FEATURE_FLAG_DETECT         (1 << 3)
3. I will not bother you with the following line
+ ast_set_flag(feature,AST_FEATURE_FLAG_DETECT); "
because surrounding code is full of it, so you are just consistent with what's there already. That code will need a separate white-space only patch later.

Thank you!

By: jmls (jmls) 2006-11-01 05:13:13.000-0600

mapoupier, would you be able to upload a patch against trunk that has the formatting changes requested ? Many thanks.

By: Marc-andre Poupier (mapoupier) 2006-11-01 05:33:52.000-0600

I will work on it this week, i'll get back to you this weekend ...

have Digium found my Disclaimer yet? should i send it again? can i send to somebody attention so they can confirm they actually got it?

By: Olle Johansson (oej) 2007-02-16 07:55:22.000-0600

Where are we with this bug report?

By: Marc-andre Poupier (mapoupier) 2007-02-22 19:35:16.000-0600

I'll post an update patch this weekend...

By: Marc-andre Poupier (mapoupier) 2007-02-23 17:24:11.000-0600

here is the latest patch against current svn...

thanks

MAP

By: Marc-andre Poupier (mapoupier) 2007-02-24 20:55:23.000-0600

Disregard #4 I had a typo in the description and I was missing a \n in my log function... sorry about that...

By: Marc-andre Poupier (mapoupier) 2007-05-09 17:58:24

guys are we doing anything with this?

MAP

By: Jason Parker (jparker) 2007-07-31 16:06:27

This could be done with some very simple dialplan logic and two feature maps.  I don't see why we need logic specific to a channel type.

In the zap incoming context, you set DYNAMIC_FEATURES to zapincoming (which does a Flash() on the caller), and on the outgoing context, you set DYNAMIC_FEATURES to zapoutgoing (which does a Flash() on the callee).

Closing.