[Asterisk-Users] AGI - CallerID ??

Andrew Joakimsen andrew at envisionstudio.net
Wed Nov 26 17:54:07 MST 2003


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 at lists.digium.com [mailto:asterisk-users-
> admin at lists.digium.com] On Behalf Of PBX
> Sent: Wednesday, November 26, 2003 7:42 PM
> To: asterisk-users at 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 the
callerid
> is not getting passed anymore... This is controlled by the
PhoneCompany
> - Yes?
> 
> -gcc
> 
> -----Original Message-----
> From: asterisk-users-admin at lists.digium.com
> [mailto:asterisk-users-admin at 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 at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list