I have a client who needs an application for there field techs to call
in when they arrive on site and when they leave. The logic behind it
seems pretty simple. I am going to write something in AGI to capture
some DTMF tones and update this data into MySQL to run some reports
from.
But here's my initial problem. I have started to create a simple AGI
script to capture the CallerID, but I keep on receiving unknown's for
the callerid.
I can get the callerid if I call from an internal extension. But if I
call from an outside line it comes up unknown. And if I were to call a
internal extension the callerid comes up on the phone.
Any pointers....
<script>
use Asterisk::AGI;
$AGI = new Asterisk::AGI;
my %input = $AGI->ReadParse();
print STDERR "AGI Environment Dump:\n";
foreach $i (sort keys %input) {
print STDERR " -- $i = $input{$i}\n";
}
if (my $callerid = $input{'callerid'}) {
$AGI->say_digits($callerid);
}
exit;
</script>
<results>
== CDR updated on Zap/1-1
-- Executing Answer("Zap/1-1", "") in new stack
-- Executing AGI("Zap/1-1", "agi-test2.agi") in new
stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/agi-test2.agi
AGI Environment Dump:
-- accountcode =
-- callerid = unknown
-- channel = Zap/1-1
-- context = default
-- dnid = unknown
-- enhanced = 0.0
-- extension = 5100
-- language = en
-- priority = 2
-- rdnis = unknown
-- request = agi-test2.agi
-- type = Zap
-- uniqueid = 1069890052.6
-- AGI Script agi-test2.agi completed, returning 0
-- Executing Hangup("Zap/1-1", "") in new stack
== Spawn extension (default, 5100, 3) exited non-zero on 'Zap/1-1'
-- Hungup 'Zap/1-1'
</results>
Thanks,
-gcc
I think I figured out my callerid issue... For some reason the callerid
is not getting passed anymore... This is controlled by the PhoneCompany
- Yes?
-gcc
-----Original Message-----
From: asterisk-users-admin@lists.digium.com
[mailto:asterisk-users-admin@lists.digium.com] On Behalf Of PBX
Posted At: Wednesday, November 26, 2003 7:22 PM
Posted To: Asterisk User Group
Conversation: AGI - CallerID ??
Subject: [Asterisk-Users] AGI - CallerID ??
I have a client who needs an application for there field techs to call
in when they arrive on site and when they leave. The logic behind it
seems pretty simple. I am going to write something in AGI to capture
some DTMF tones and update this data into MySQL to run some reports
from.
But here's my initial problem. I have started to create a simple AGI
script to capture the CallerID, but I keep on receiving unknown's for
the callerid.
I can get the callerid if I call from an internal extension. But if I
call from an outside line it comes up unknown. And if I were to call a
internal extension the callerid comes up on the phone.
Any pointers....
<script>
use Asterisk::AGI;
$AGI = new Asterisk::AGI;
my %input = $AGI->ReadParse();
print STDERR "AGI Environment Dump:\n";
foreach $i (sort keys %input) {
print STDERR " -- $i = $input{$i}\n";
}
if (my $callerid = $input{'callerid'}) {
$AGI->say_digits($callerid);
}
exit;
</script>
<results>
== CDR updated on Zap/1-1
-- Executing Answer("Zap/1-1", "") in new stack
-- Executing AGI("Zap/1-1", "agi-test2.agi") in new
stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/agi-test2.agi
AGI Environment Dump:
-- accountcode =
-- callerid = unknown
-- channel = Zap/1-1
-- context = default
-- dnid = unknown
-- enhanced = 0.0
-- extension = 5100
-- language = en
-- priority = 2
-- rdnis = unknown
-- request = agi-test2.agi
-- type = Zap
-- uniqueid = 1069890052.6
-- AGI Script agi-test2.agi completed, returning 0
-- Executing Hangup("Zap/1-1", "") in new stack
== Spawn extension (default, 5100, 3) exited non-zero on 'Zap/1-1'
-- Hungup 'Zap/1-1'
</results>
Thanks,
-gcc
_______________________________________________
Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
Have you tried Exten => s,1,Wait(2) Exten => s,2,Answer Exten => s,3,AGI....> -----Original Message----- > From: asterisk-users-admin@lists.digium.com [mailto:asterisk-users- > admin@lists.digium.com] On Behalf Of PBX > Sent: Wednesday, November 26, 2003 7:22 PM > To: asterisk-users@lists.digium.com > Subject: [Asterisk-Users] AGI - CallerID ?? > > I have a client who needs an application for there field techs to call > in when they arrive on site and when they leave. The logic behind it > seems pretty simple. I am going to write something in AGI to capture > some DTMF tones and update this data into MySQL to run some reports > from. > > But here's my initial problem. I have started to create a simple AGI > script to capture the CallerID, but I keep on receiving unknown's for > the callerid. > > I can get the callerid if I call from an internal extension. But if I > call from an outside line it comes up unknown. And if I were to calla> internal extension the callerid comes up on the phone. > > Any pointers.... > > > <script> > > use Asterisk::AGI; > > $AGI = new Asterisk::AGI; > > my %input = $AGI->ReadParse(); > > > print STDERR "AGI Environment Dump:\n"; > foreach $i (sort keys %input) { > print STDERR " -- $i = $input{$i}\n"; > } > > if (my $callerid = $input{'callerid'}) { > $AGI->say_digits($callerid); > } > > exit; > > </script> > > > <results> > > == CDR updated on Zap/1-1 > -- Executing Answer("Zap/1-1", "") in new stack > -- Executing AGI("Zap/1-1", "agi-test2.agi") in new stack > -- Launched AGI Script /var/lib/asterisk/agi-bin/agi-test2.agi > AGI Environment Dump: > -- accountcode > -- callerid = unknown > -- channel = Zap/1-1 > -- context = default > -- dnid = unknown > -- enhanced = 0.0 > -- extension = 5100 > -- language = en > -- priority = 2 > -- rdnis = unknown > -- request = agi-test2.agi > -- type = Zap > -- uniqueid = 1069890052.6 > -- AGI Script agi-test2.agi completed, returning 0 > -- Executing Hangup("Zap/1-1", "") in new stack > == Spawn extension (default, 5100, 3) exited non-zero on 'Zap/1-1' > -- Hungup 'Zap/1-1' > > </results> > > > Thanks, > > -gcc > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users
I called the Phone company they have messed up the line.. They are working to resolve it.. But I am trying to figure out how to collect the DTMF tones in AGI (STDIN). The application keeps hanging up on me, before I can enter any keys. I have tried adding the wait_for_digit.. But I am not having any luck... -gcc -----Original Message----- From: asterisk-users-admin@lists.digium.com [mailto:asterisk-users-admin@lists.digium.com] On Behalf Of Andrew Joakimsen Posted At: Wednesday, November 26, 2003 7:54 PM Posted To: Asterisk User Group Conversation: [Asterisk-Users] AGI - CallerID ?? Subject: RE: [Asterisk-Users] AGI - CallerID ?? Or that asterisk is answering too soon to get the callerid, it is transmitted between the 1st and 2nd ring. Plug in a normal phone to the line, call it and see if it gets the caller id.> -----Original Message----- > From: asterisk-users-admin@lists.digium.com [mailto:asterisk-users- > admin@lists.digium.com] On Behalf Of PBX > Sent: Wednesday, November 26, 2003 7:42 PM > To: asterisk-users@lists.digium.com > Subject: RE: [Asterisk-Users] AGI - CallerID ?? > > pamAssassin 2.55 (1.174.2.19-2003-05-19-exp) > > I think I figured out my callerid issue... For some reason thecallerid> is not getting passed anymore... This is controlled by thePhoneCompany> - Yes? > > -gcc > > -----Original Message----- > From: asterisk-users-admin@lists.digium.com > [mailto:asterisk-users-admin@lists.digium.com] On Behalf Of PBX Posted> At: Wednesday, November 26, 2003 7:22 PM Posted To: Asterisk User > Group > Conversation: AGI - CallerID ?? > Subject: [Asterisk-Users] AGI - CallerID ?? > > > I have a client who needs an application for there field techs to call> in when they arrive on site and when they leave. The logic behind it > seems pretty simple. I am going to write something in AGI to capture > some DTMF tones and update this data into MySQL to run some reports > from. > > But here's my initial problem. I have started to create a simple AGI > script to capture the CallerID, but I keep on receiving unknown's for > the callerid. > > I can get the callerid if I call from an internal extension. But if I> call from an outside line it comes up unknown. And if I were to calla> internal extension the callerid comes up on the phone. > > Any pointers.... > > > <script> > > use Asterisk::AGI; > > $AGI = new Asterisk::AGI; > > my %input = $AGI->ReadParse(); > > > print STDERR "AGI Environment Dump:\n"; > foreach $i (sort keys %input) { > print STDERR " -- $i = $input{$i}\n"; > } > > if (my $callerid = $input{'callerid'}) { > $AGI->say_digits($callerid); > } > > exit; > > </script> > > > <results> > > == CDR updated on Zap/1-1 > -- Executing Answer("Zap/1-1", "") in new stack > -- Executing AGI("Zap/1-1", "agi-test2.agi") in new stack > -- Launched AGI Script /var/lib/asterisk/agi-bin/agi-test2.agi > AGI Environment Dump: > -- accountcode > -- callerid = unknown > -- channel = Zap/1-1 > -- context = default > -- dnid = unknown > -- enhanced = 0.0 > -- extension = 5100 > -- language = en > -- priority = 2 > -- rdnis = unknown > -- request = agi-test2.agi > -- type = Zap > -- uniqueid = 1069890052.6 > -- AGI Script agi-test2.agi completed, returning 0 > -- Executing Hangup("Zap/1-1", "") in new stack > == Spawn extension (default, 5100, 3) exited non-zero on 'Zap/1-1' > -- Hungup 'Zap/1-1' > > </results> > > > Thanks, > > -gcc > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users_______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users