TUTORIAL CallWho Ready for Testing

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Overview: For those using AsteriDex, we have a new add-on that I think you'll really use. Here's how it works. Ideally, you assign a button on your phone to extension 412. When the button is pressed or 412 is dialed, CallWho will prompt the user to enter the first three letters of the person they wish to call. This represents the first three letters of an entry in the AsteriDex phonebook. If only one entry exists, the call will be placed. If more than one matching entry exists, a list of the matching entries will be read (up to 9) using Cepstral or Flite. The user picks the one they want, and the call is placed.

Prerequisites:
You must already have AsteriDex 4 installed (install script is available here) as well as either Flite or Cepstral (install tutorial is available here). The software defaults to Cepstral. To change it, edit extensions_custom.conf dialplan for 412 and reverse the commented and uncommented lines. Edit nv-callwho.php in /var/lib/asterisk/agi-bin and change the $ttspick entry from one to zero.

Installation: Log into your server as root and issue the following commands:

cd /root
wget http://bestof.nerdvittles.com/applications/asteridex4/callwho.pbx
chmod +x callwho.pbx
./callwho.pbx

After the install completes, use your web browser and point it to the real IP address of your server with the following:

http://192.168.0.22/asteridex4/dialcode.php

This will populate the dialcodes in your AsteriDex database with 3-digit codes for each name entry. As you add new entries, don't forget to add new dialcodes or run this app again. It will only run as an AsteriDex admin. ** IT WILL ERASE ANY DATA YOU ALREADY HAVE IN THE dialcode FIELD THROUGHOUT YOUR DATABASE! **

Now dial 412 from any phone on your system. If it doesn't work, add a Misc Destination in FreePBX for CallWho at extension 412 and try again.

Feedback appreciated!!
 

mds

New Member
Joined
May 21, 2008
Messages
1
Reaction score
0
This worked great after one modification:

The install puts dialcode.php into /var/www/html/asteridex while the current asteridex4 instructions install into /var/www/html/asteridex4 (by default & before hardening).

Since dialcode.php uses config.inc.php it wasn't able to run until I moved it to the asteridex4 directory and pointed my web browser to the new location.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Fixed. I found it, too... and then forgot to change it. :crazy: Thanks.
 

wifinetguy

Member
Joined
Jan 8, 2008
Messages
93
Reaction score
0
I've installed and made the change noted above for the directory. Then ran the dialcode.php and it ran fine. However, when I enter 412 and Allison asks me for the the first 3 digits of the person I want to call, the call ends abruptly after entering the 3 digits. Here's the console output:

-- Executing [412@from-internal:1] Answer("SIP/4001-09cc74b8", "") in new stack
-- Executing [412@from-internal:2] Wait("SIP/4001-09cc74b8", "1") in new stack
-- Executing [412@from-internal:3] Set("SIP/4001-09cc74b8", "TIMEOUT(digit)=7") in new stack
-- Digit timeout set to 7
-- Executing [412@from-internal:4] Set("SIP/4001-09cc74b8", "TIMEOUT(response)=10") in new stack
-- Response timeout set to 10
-- Executing [412@from-internal:5] Swift("SIP/4001-09cc74b8", ""At the beep enter the first three letters of the name of the person you wish to call."") in new stack
-- Executing [412@from-internal:6] Read("SIP/4001-09cc74b8", "DIALCODE|beep|3") in new stack
-- Accepting a maximum of 3 digits.
-- <SIP/4001-09cc74b8> Playing 'beep' (language 'en')
-- User entered '747'
-- Executing [412@from-internal:7] NoOp("SIP/4001-09cc74b8", "Name lookup: 747") in new stack
-- Executing [412@from-internal:8] AGI("SIP/4001-09cc74b8", "nv-callwho.php|747") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/nv-callwho.php
-- AGI Script nv-callwho.php completed, returning 0
-- Executing [412@from-internal:9] NoOp("SIP/4001-09cc74b8", "Number to call: ") in new stack
-- Executing [412@from-internal:10] GotoIf("SIP/4001-09cc74b8", "0?12") in new stack
-- Executing [412@from-internal:11] Goto("SIP/4001-09cc74b8", "outbound-allroutes||1") in new stack
-- Goto (outbound-allroutes,412,1)
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Sounds like there's a problem with callwho.php in /var/lib/asterisk/agi-bin. Did you use our callwho.pbx installer? You might wanna check permissions and ownership on the callwho.php file. Also look and be sure it's there and not corrupted.
 

wifinetguy

Member
Joined
Jan 8, 2008
Messages
93
Reaction score
0
I just followed the installation steps in the first post of this thread.
 

wifinetguy

Member
Joined
Jan 8, 2008
Messages
93
Reaction score
0
Sorry for the delay in getting back to this. Had actual work to do. ;-)

Anyway, the file nv-callwho.php is there and doing a "more" on it doesn't show any corruption. As for permissions and ownership:

-rwxrwxr-x 1 asterisk asterisk 6691 May 8 14:01 nv-callwho.php
 

dad311

Guru
Joined
Jan 13, 2008
Messages
604
Reaction score
2
I just installed the FONmail script. I tried to use the AnyWho (412) but Asterisk hangs up on me after prompting for the three numbers. Below is my console output, any ideas????

-- Executing [412@from-internal:2] Wait("SIP/202-085370b8", "1") in new stack
-- Executing [412@from-internal:3] Set("SIP/202-085370b8", "TIMEOUT(digit)=7") in new stack
-- Digit timeout set to 7
-- Executing [412@from-internal:4] Set("SIP/202-085370b8", "TIMEOUT(response)=10") in new stack
-- Response timeout set to 10
-- Executing [412@from-internal:5] Flite("SIP/202-085370b8", ""At the beep enter the first three letters of the name of the person you wish to contact."") in new stack
== Parsing '/etc/asterisk/flite.conf': Found
-- <SIP/202-085370b8> Playing '/tmp/flite_buf_3Xni4C' (language 'en')
-- Executing [412@from-internal:6] Goto("SIP/202-085370b8", "s|11") in new stack
-- Goto (from-internal,s,11)
== Auto fallthrough, channel 'SIP/202-085370b8' status is 'UNKNOWN'
-- Executing [h@from-internal:1] Macro("SIP/202-085370b8", "hangupcall") in new stack
-- Executing [s@macro-hangupcall:1] ResetCDR("SIP/202-085370b8", "w") in new stack
-- Executing [s@macro-hangupcall:2] NoCDR("SIP/202-085370b8", "") in new stack
-- Executing [s@macro-hangupcall:3] GotoIf("SIP/202-085370b8", "1?skiprg") in new stack
-- Goto (macro-hangupcall,s,6)
-- Executing [s@macro-hangupcall:6] GotoIf("SIP/202-085370b8", "1?skipblkvm") in new stack
-- Goto (macro-hangupcall,s,9)
-- Executing [s@macro-hangupcall:9] GotoIf("SIP/202-085370b8", "1?theend") in new stack
-- Goto (macro-hangupcall,s,11)
-- Executing [s@macro-hangupcall:11] Hangup("SIP/202-085370b8", "") in new stack
== Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'SIP/202-085370b8' in macro 'hangupcall'
== Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'SIP/202-085370b8'
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Ooops!

Last minute "improvement" left a line missing. Just replace the existing 412 context in extensions_custom.conf with the following and then asterisk -rx "dialplan reload"...

Code:
exten => 412,1,Answer
exten => 412,2,Wait(1)
exten => 412,3,Set(TIMEOUT(digit)=7)
exten => 412,4,Set(TIMEOUT(response)=10)
exten => 412,5,GotoIf($[${STAT(e,/usr/bin/swift)}]?8)
exten => 412,6,Flite("At the beep enter the first three letters of the name of the person you wish to contact.")
exten => 412,7,Goto(s,9)
exten => 412,8,Swift("At the beep enter the first three letters of the name of the person you wish to contact.")
exten => 412,9,Read(DIALCODE,beep,3)
exten => 412,10,NoOp(Name lookup: ${DIALCODE})
exten => 412,11,AGI(nv-callwho.php,${DIALCODE})
exten => 412,12,NoOp(Number to call: ${NUM2CALL})
exten => 412,13,GotoIf($["foo${NUM2CALL}" = "foo0"]?15)
exten => 412,14,Goto(outbound-allroutes,${NUM2CALL},1)
exten => 412,15,Wait(1)
exten => 412,16,Hangup
 

kevinb

New Member
Joined
Feb 8, 2008
Messages
34
Reaction score
0
Won't work

Just installed callwho and FONmail this evening. FONmail is working but callwho is giving me the same hang up problem after asking for the first 3 letters of the name. This is my PIAF output when i run it:

Verbosity was 3 and is now 6
-- Executing [412@from-internal:1] Answer("SIP/500-096e5bb0", "") in new sta
ck
-- Executing [412@from-internal:2] Wait("SIP/500-096e5bb0", "1") in new stac
k
-- Executing [412@from-internal:3] Set("SIP/500-096e5bb0", "TIMEOUT(digit)="
) in new stack
-- Digit timeout set to 7
-- Executing [412@from-internal:4] Set("SIP/500-096e5bb0", "TIMEOUT(response
)=10") in new stack
-- Response timeout set to 10
-- Executing [412@from-internal:5] GotoIf("SIP/500-096e5bb0", "0?8;40m") in
new stack
-- Executing [412@from-internal:6] Flite("SIP/500-096e5bb0", ""At the beep e
nter the first three letters of the name of the person you wish to contact."") i
n new stack
== Parsing '/etc/asterisk/flite.conf': Found
-- <SIP/500-096e5bb0> Playing '/tmp/flite_buf_cJjxnh' (language 'en')
-- Executing [412@from-internal:7] Goto("SIP/500-096e5bb0", "s|9") in new st
ack
-- Goto (from-internal,s,9)
== Auto fallthrough, channel 'SIP/500-096e5bb0' status is 'UNKNOWN'
-- Executing [h@from-internal:1] Macro("SIP/500-096e5bb0", "hangupcall") in
new stack
-- Executing [s@macro-hangupcall:1] ResetCDR("SIP/500-096e5bb0", "w") in new
stack
-- Executing [s@macro-hangupcall:2] NoCDR("SIP/500-096e5bb0", "") in new sta
ck
-- Executing [s@macro-hangupcall:3] GotoIf("SIP/500-096e5bb0", "1?skiprg") i
n new stack
-- Goto (macro-hangupcall,s,6)
-- Executing [s@macro-hangupcall:6] GotoIf("SIP/500-096e5bb0", "1?skipblkvm"
) in new stack
-- Goto (macro-hangupcall,s,9)
-- Executing [s@macro-hangupcall:9] GotoIf("SIP/500-096e5bb0", "1?theend") i
n new stack
-- Goto (macro-hangupcall,s,11)
-- Executing [s@macro-hangupcall:11] Hangup("SIP/500-096e5bb0", "") in new s
tack
== Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'SIP/500-096e5
bb0' in macro 'hangupcall'
== Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'SIP/500-096e5
bb0'

I followed the instructions to update the extensions config file but what was already in there looks identical. Any ideas?

Kevin
 

kevinb

New Member
Joined
Feb 8, 2008
Messages
34
Reaction score
0
This is fixed. Turned out to be that I didn't have the "Allison Engine" installed. ;) Since it defaults to using this for TTS as soon as I installed Ally the app sprang to life and worked properly. Guess it just needed her soothing voice. ;)
 
Joined
Feb 13, 2011
Messages
330
Reaction score
12
There seems to be a problem with call who in the incredible pbx 2.0.

After i call 412 i get the prompt to enter 3 numbers after i enter the 3 numbers i dont hear nothing else , only silence and "after the beep" no matching entry was found bye bye.

Here is the log

-- Executing [412@from-internal:10] NoOp("SIP/701-00000006", "Name lookup: 238") in new stack
-- Executing [412@from-internal:11] AGI("SIP/701-00000006", "nv-callwho.php,238") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/nv-callwho.php
-- AGI Script Executing Application: (flite) Options: (After the beep, press 1 for Beto (cell): press 2 for Betzi Cochabamba (cell): press 3 for Betzi Cochabamba (work): press 4 for Betzi Teran (cell): press 5 for Betzi Teran (home): press 6 for Betzi Teran (work): )
== Parsing '/etc/asterisk/flite.conf': == Found
-- <SIP/701-00000006> Playing '/tmp/Flite_412658172.slin' (language 'en')
-- <SIP/701-00000006> Playing 'beep.gsm' (language 'en')
-- AGI Script Executing Application: (flite) Options: (No matching entry was found. Goodbye)
== Parsing '/etc/asterisk/flite.conf': == Found
-- <SIP/701-00000006> Playing '/tmp/Flite_1143980749.slin' (language 'en')
-- <SIP/701-00000006>AGI Script nv-callwho.php completed, returning 0
-- Executing [412@from-internal:12] NoOp("SIP/701-00000006", "Number to call: 0") in new stack
-- Executing [412@from-internal:13] GotoIf("SIP/701-00000006", "1?15") in new stack
-- Goto (from-internal,412,15)
-- Executing [412@from-internal:15] Wait("SIP/701-00000006", "1") in new stack
-- Executing [412@from-internal:16] Hangup("SIP/701-00000006", "") in new stack
== Spawn extension (from-internal, 412, 16) exited non-zero on 'SIP/701-00000006'
-- Executing [h@from-internal:1] Macro("SIP/701-00000006", "hangupcall") in new stack
-- Executing [s@macro-hangupcall:1] GotoIf("SIP/701-00000006", "1?skiprg") in new stack
-- Goto (macro-hangupcall,s,4)
-- Executing [s@macro-hangupcall:4] GotoIf("SIP/701-00000006", "1?skipblkvm") in new stack
-- Goto (macro-hangupcall,s,7)
-- Executing [s@macro-hangupcall:7] GotoIf("SIP/701-00000006", "1?theend") in new stack
-- Goto (macro-hangupcall,s,9)
-- Executing [s@macro-hangupcall:9] Hangup("SIP/701-00000006", "") in new stack
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on 'SIP/701-00000006' in macro 'hangupcall'
== Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/701-00000006'



Is there a way to change the voice to Allison ???
 

randy7376

Defnyddiwr Gweithredol
Joined
Sep 29, 2010
Messages
864
Reaction score
144
While I've not used any of the Cepstral voices, there appears to be a place to change it.

In FreePBX, go to Tools -> PHPAGI Config -> Cepstral config. It has an option for Cepstra voice and swift path.

Perhaps someone more knowledgeable will chime in...
 
Joined
Feb 13, 2011
Messages
330
Reaction score
12
While I've not used any of the Cepstral voices, there appears to be a place to change it.

In FreePBX, go to Tools -> PHPAGI Config -> Cepstral config. It has an option for Cepstra voice and swift path.

Perhaps someone more knowledgeable will chime in...


Changed there but no success

Seems to be a problem with this part related to AGI Script

Launched AGI Script /var/lib/asterisk/agi-bin/nv-callwho.php
-- AGI Script Executing Application: (flite) Options: (After the beep, press 1 for Beto (cell): press 2 for Betzi Cochabamba (cell): press 3 for Betzi Cochabamba (work): press 4 for Betzi Teran (cell): press 5 for Betzi Teran (home): press 6 for Betzi Teran (work): )
== Parsing '/etc/asterisk/flite.conf': == Found
-- <SIP/701-00000010> Playing '/tmp/Flite_1521589595.slin' (language 'en')
-- <SIP/701-00000010> Playing 'beep.gsm' (language 'en')


Thanks !!!
 

rossiv

Guru
Joined
Oct 26, 2008
Messages
2,624
Reaction score
139
If you want to go from Flite to Cepstral, do this:
Code:
vi /var/lib/asterisk/agi-bin/nv-callwho.php
Change "$ttspick = 0;" to "$ttspick = 1;"

Also, I assume in your Asteridex you have the names listed as "Beto (cell)" with the parentheses. That doesn't mix with Asterisk dialplan. Change that to just "Beto Cell".
 
Joined
Feb 13, 2011
Messages
330
Reaction score
12
Hi Rossiv

That changed to Allison thanks....

but didnt solve the problem regarding the reading of the names, my numbers were imported using the outlook.php from ward and that is how are they imported ...


Welcome to AsteriDex -- The Poor Man's Rolodex

Review entries carefully. Then click the button below to sync your Outlook contacts with your AsteriDex database. NOTE: All
entries will be synchronized with your AsteriDex database as three separate entries: Name (home), Name (work), and Name (cell).


Do you think that is causing the problem ?

Thanks in advance
 

steve54301

Guru
Joined
Jun 7, 2008
Messages
135
Reaction score
18
I noticed that dial codes seem limited to 5 digits. Is there an easy way to increase this?
 
Joined
Feb 13, 2011
Messages
330
Reaction score
12
Last minute "improvement" left a line missing. Just replace the existing 412 context in extensions_custom.conf with the following and then asterisk -rx "dialplan reload"...

Code:
exten => 412,1,Answer
exten => 412,2,Wait(1)
exten => 412,3,Set(TIMEOUT(digit)=7)
exten => 412,4,Set(TIMEOUT(response)=10)
exten => 412,5,GotoIf($[${STAT(e,/usr/bin/swift)}]?8)
exten => 412,6,Flite("At the beep enter the first three letters of the name of the person you wish to contact.")
exten => 412,7,Goto(s,9)
exten => 412,8,Swift("At the beep enter the first three letters of the name of the person you wish to contact.")
exten => 412,9,Read(DIALCODE,beep,3)
exten => 412,10,NoOp(Name lookup: ${DIALCODE})
exten => 412,11,AGI(nv-callwho.php,${DIALCODE})
exten => 412,12,NoOp(Number to call: ${NUM2CALL})
exten => 412,13,GotoIf($["foo${NUM2CALL}" = "foo0"]?15)
exten => 412,14,Goto(outbound-allroutes,${NUM2CALL},1)
exten => 412,15,Wait(1)
exten => 412,16,Hangup


Hi

After two installations of piaf and incredible , I noticed that callwho wasnt working as it supposed to be ....
So Martin a friend of mine discovered that this was causing the problem just want to share with you guys and let me know if this is good or no....

originally the callwho.php script was with this line
$msg = $msg . chr(34) . "After the beep, ";

so we changed to :

$msg = $msg . chr(34) . "After the beep. ";

and everything is working fine now

Cheers...
 

mardosas

New Member
Joined
Mar 25, 2016
Messages
16
Reaction score
3
Hi,

I would like to download but it's forbidden:

You don't have permission to access /applications/asteridex4/callwho.pbx on this server.

Is there a way to download the callwho.pbx?
 
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