TIPS AsteriDex not dialing extension

bobkoure

Member
Joined
May 22, 2013
Messages
173
Reaction score
20
I'm trying to setup AsteriDex in IncrediblePBX (on CentOS7)
With IncrediblePBX, it's mostly already setup, you just need to make changes in extensions_custom.conf in asterisk and config.inc.php in asteridex
I've done this, following the how-to Ward posted http://bestof.nerdvittles.com/applications/asteridex4/

My issue is that when I click on a person to dial in the AsteriDex web page I get a pop-up box (title looks like 172.16.51.4/asteridex4/callboth.php?SEQ=654221*IN=*&OUT=[number I clicked on).
The rest of the box is blank.

in config.inc.php, I changed $defaultExt="SIP/102" (teh extension at my desk)
in extensions_custom.conf I changed [custom-callboth]
Code:
[custom-callboth]
; see extensions_additional.conf for trunk-number mapping
; ("dialout-trunk,16" means dial out on trunk 16, which here is voipms)
; OUT_16 = SIP/voipms
; OUT_2 = SIP/OBITRUNK1
; OUT_15 = SIP/vitel-outbound
exten => _1NXXNXXXXXX,1,Wait(1)
exten => _1NXXNXXXXXX,2,Background(pls-wait-connect-call)
exten => _1NXXNXXXXXX,3,Macro(dialout-trunk,16,${EXTEN},)
exten => _1NXXNXXXXXX,4,Macro(dialout-trunk,2,${EXTEN},)
exten => _1NXXNXXXXXX,5,Macro(dialout-trunk,15,${EXTEN},)
exten => _1NXXNXXXXXX,6,Macro(outisbusy) ; No available circuits
exten => _NXXNXXXXXX,1,Wait(1)
exten => _NXXNXXXXXX,2,Background(pls-wait-connect-call)
exten => _NXXNXXXXXX,3,Macro(dialout-trunk,16,${EXTEN},)
exten => _NXXNXXXXXX,4,Macro(dialout-trunk,2,${EXTEN},)
exten => _NXXNXXXXXX,5,Macro(dialout-trunk,15,${EXTEN},)
exten => _NXXNXXXXXX,6,Macro(outisbusy) ; No available circuits

I pretty much cribbed this from my RasPi, which had been working fine - only the trunk numbers are different, of course.

I'm hoping I just missed something obvious.
Any ideas?
 
Joined
Feb 13, 2011
Messages
330
Reaction score
12
Hi guys

Same problem here Astride not dialing the extension in a brand new installation , any ideas ?
What will be the last [custom-callboth] configuration ?

Thanks
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Edit $defaultExt in /var/www/html/asteridex4/config.inc.php to change extensions.

In /etc/asterisk/extensions_custom.conf, the [custom-callboth] context should look like this:
Code:
[custom-callboth]
exten => _1NXXNXXXXXX,1,Wait(1)
exten => _1NXXNXXXXXX,n,Background(pls-wait-connect-call)
exten => _1NXXNXXXXXX,n,Goto(outbound-allroutes,${EXTEN},1)
exten => _NXXNXXXXXX,1,Wait(1)
exten => _NXXNXXXXXX,n,Background(pls-wait-connect-call)
exten => _NXXNXXXXXX,n,Goto(outbound-allroutes,${EXTEN},1)
 
Joined
Feb 13, 2011
Messages
330
Reaction score
12
Hi Ward thanks for you answer, in effect /var/www/html/asteridex4/config.inc.php shows:

$INtrunk="SIP" ;
$defaultExt="SIP/701";
$LDprefix="1" ;

$CallerID="7189484858" ;

and [custom-callboth]

[custom-callboth]
exten => _1NXXNXXXXXX,1,Wait(1)
exten => _1NXXNXXXXXX,n,Background(pls-wait-connect-call)
exten => _1NXXNXXXXXX,n,Goto(outbound-allroutes,${EXTEN},1)
exten => _NXXNXXXXXX,1,Wait(1)
exten => _NXXNXXXXXX,n,Background(pls-wait-connect-call)

exten => _NXXNXXXXXX,n,Goto(outbound-allroutes,${EXTEN},1)


But still don't work , I got no activity on the machine, I get a pop-up box (title looks like 192.168.1.162/asteridex4/callboth.php?SEQ=654221*IN=*&OUT=[number I clicked on).
The rest of the box is blank.


Thanks !!!
 

Ian Crockford

New Member
Joined
Aug 27, 2015
Messages
2
Reaction score
1
Hi

I know exactly what you are reporting, and had the same problem myself (for ages). Finally, just yesterday, I decided to try and get to the bottom of it, and it transpired that the callboth.php script was calling a function by reference. This PHP functionality is no longer supported, and so I made the following changes to the callboth.php script. About 3/4 of the way down there is a line that says:

$fp = fsockopen ("localhost", 5038, &$errno, &$errstr, 20);

Simply remove the ampersands from the variables, and everything started working much better.... So the amended line looks like:

$fp = fsockopen ("localhost", 5038, $errno, $errstr, 20);

Whilst I was there, I also tweaked a line a few lines down:

fputs ($fp, "Timeout: 30\r\n\r\n");

and changed the 30 to 20. I have my extensions diverting to voicemail after 22 seconds, so adjusting this timeout value meant that if I didn't pick up the ringing extension that this script called, it times out, rather than diverting to VM and then that, dialling the outbound number.

I *think* that's the only changes I made. But please do report back with your success. Oh, I did just make sure that the sequence numbers matched in callboth.php and index.php (otherwise, you'll never get anywhere).

Now a request:

My only gripe with this excellent Asteridex is that when I click on a contact to dial, my desk phone rings with a caller ID and caller name set to "Anonymous". I soooo wish that displayed the outgoing number/name of the person I was wanting to call, rather than anonymous. It just makes so much more sense to display the person I'm wanting to call, rather than an unknown caller (ie, Asteridex).

Ian
 

ou812

Guru
Joined
Oct 18, 2007
Messages
479
Reaction score
79
Ian@
I tried your mod from above "remove the ampersands" but it did not work for me, but can you be more specific on what you mean by "I did just make sure that the sequence numbers matched in callboth.php and index.php"

gary
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
ou812 For the time being, the easy workaround is to manually set where the incoming call should ring in line 52 or so of /var/www/html/asteridex4/callboth.php:

For Asterisk 11:
Code:
$IN = "SIP/701";

For Asterisk 13:
Code:
$IN = "PJSIP/701";
 

Ian Crockford

New Member
Joined
Aug 27, 2015
Messages
2
Reaction score
1
Sure. What I meant by sequence numbers was to ensure the following two numbers were the same:

In callboth.php, there's a section commented "You can add any error detection logic desired below. Right now, it is minimal.", and within that, there's the line

if ($SEQ<>"nnnnnn") :

Take a note of that number, as you'll need to make sure the same number is used in index.php...

So, in index.php, there's a long line near the end of the file which starts with

echo "<A HREF=\javascript:void(window.open('.callboth.php?SEQ=nnnnnn...

Make sure the number being assigned to SEQ is the same as the number you previously noted. If not, modify it.

This is a basic attempt of some form of security, trying to ensure that the callboth.php code is called only from index.php. It's basic, but better than nothing. But the point is, if these two numbers don't match, then the callboth.php script will terminate early. On my Raspberry PI installation, these numbers were different (Asterisk 11), which prevented the script from running - but then I also encountered the passing-by-reference error outlined in my previous post.

But, oh I do wish my extension would use the callerID/name of the person I'm trying to call when it rings prior to connecting the call... {sigh}

Ian
 

Members online

No members online now.

Forum statistics

Threads
25,782
Messages
167,509
Members
19,203
Latest member
frapu
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top