Auto-open the URL exclude

Asked by Mostar

Hello,

I'm using "Auto-open the URL". It all work fine except this scenario:
When I initiate a call using click2dial the PBX first call to my extension and then Firefox new tab is open with my #NUM# in the URL.

Since it's not real incoming call, I would like it to be ignore.
Is it possible by some kind of configuration?

If not, please direct to the area in the code, I would like pach small fix.

Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
Asterisk Click2Dial Firefox Extension Edit question
Assignee:
No assignee Edit question
Solved by:
Mostar
Solved:
Last query:
Last reply:
Revision history for this message
Mostar (ra2323) said :
#1

I will answer myself. in asteriskext.js search for:
case "asterisk-ext-click":
and replase the case code to:

     case "asterisk-ext-click":
      AsteriskExt.logmessage(1, "Call from:"+obj.CallerIDNum);
      if( (obj.CallerIDNum != 123456789) && (obj.CallerIDNum != 234567890)) {
      // Not our self
       AsteriskExt.logmessage(1, "Not our self");
       var url = AsteriskExt.ps.getCharPref("extensions.asterisk.callpopup-url");
       url = url.replace( /#NUM#/g , obj.CallerIDNum );
       AsteriskExt.openAndReuseOneTabPerAttribute("number", obj.CallerIDNum, url);
      } else {
       AsteriskExt.logmessage(1, "Our self");
      }
      break;

in the above code 123456789 & 234567890 are phone num we want to exclude

Mostar