i would like to call an agi script when a call is comming in, not when it
is ansered or hung up on.
background: when my phone is in one room, i am in another and
the doors are closed, then i can not hear the phone.
i have set up an agi script to display a message on my TV screen (digital vid)
when someone is calling.
the problem ist, that the agi script is being called after the person has
hung up or the call has been answered. that is too late tough
has anyone got an idea what i need to use, to make the script get called
as soon as the callerID is known ?
this is what i got:
[quote][the-rest]
exten => 12345,1,agi,incommingCalls.agi ;show a line on the vdr to show that someone is calling
exten => 12345,2,WaitExten(15)
exten => 12345,3,Answer()
exten => 12345,4,Playback(vm-MartinDefaultVoicemail)
exten => 12345,5,VoiceMail(s12345)
exten => 12345,6,Hangup()
(have swapped my num with 12345)[/quote]
this i would expect to call the script as soon as the call is signalled, then
wait for 15s and then let the voicemail take over. it does not though.
i have also tried other commands like ringing, but no go.
there must be a way, because if i use “asterisk -cvvvv”, then
a message about an incomming call is shown, before the phone rings.
I would like to know how as well because I would like to do a screen pop on a PC. The CALLERID is defenitely known at that stage, so I cannot understand why it would not execute your script. Are you sure your script is marked as executable? Is it displaying it on the Asterisk console executing or is there an error maybe?
Let me know in any case if you find a solution please. I will do a bit of research too - it is on my list I will just move it up a bit
The CALLERID is defenitely known at that stage
yes.
comes up before the first ring.
Are you sure your script is marked as executable?
it is working already, only that the script gets called when the caller hangs
up. i would expect(would like) it to get called as soon as the call comes in,
so before the first ring.
Is it displaying it on the Asterisk console executing or is there an error maybe?
see above
it is on my list I will just move it up a bit
sounds good. are you one of the developers ? if so, can you also have
a look at the “ex-girlfriend logic” ? it aint working either.
if you need some special debugging with changes in the code, let me
know, i am also a developer.
Make sure you have the latest version ( 1.0.9 ) of Asterisk. I guesss there was a logic error in 1.0.8 with the “ex-girlfriend logic”. It is supposed to be fixed in the newest version. This topic talks about it more.
In your setup, the behaviour to the caller is like this?
no.
asterisk does not pick up the phone, unless the wait of 15s is done.
after 15s it answers the line, plays the message and lets the user talk
to the voicemail.
!!!
!!! i found the problem!! !!!
!!!
it is not a logic problem in the extensions.conf, it seems like a problem
in the hfc driver.
apparently it looses sync and it puts out sooooooooooooo much logging,
that the load is 99,7% just for syslogd and klogd.
therefor the script does not get enough time to execute.
this is what messages sais:
[quote]Aug 4 08:33:39 ra kernel: zaphfc: sync lost, pci performance too low. you might have some cpu throrformance too low. you might have some cpu throrformance too low. you might have some cpu throtteling enabled.
Aug 4 08:33:39 ra kernel: zaphfc: sync lost, pci performance too low. you might have some cpu throtteling enabled.
Aug 4 08:34:09 ra last message repeated 245647 times
Aug 4 08:35:02 ra last message repeated 419312 times
[/quote]
i find it a bit strange, to log the same errors every microsec. wouldn’t
1/sec do ??
the card does not share an irq and this comp is not throttled. it is just a
duron 600 with 512mb ram.
!!!
!!!
!!!
got to do some research on this, but it screems for another posting
ok, got it to work with the system call in extensions.conf
it also eliminates the agi script
[the-rest]
exten => 12345,1,System(svdrpsend.pl -d 192.168.2.100 MESG "Martin: Anruf von ${CALLERID}") ;show a line on the vdr to show that someone is calling
exten => 12345,2,WaitExten(15)
exten => 12345,3,Answer()
exten => 12345,4,Playback(vm-MartinDefaultVoicemail)
exten => 12345,5,VoiceMail(s12345)
exten => 12345,6,Hangup()