|
From: FERNANDO V. <fvi...@ya...> - 2006-01-12 18:43:19
|
Hello I do not speak ingles, but she will try to
explain my problem.
I am doing script AGI with pyst, but I have the
following problem:
When a user generates a call and this is answered, if
the case that the short emitter occurs or cancels the
call first that the receiver, in that minute if
treatment to rescue the time that lasts the call
(ANSWEREDTIME) not it I can do since my script sends
an exception.
b=AGI()
answeredtime=b.get_variable("ANSWEREDTIME")
the exception is the following one:
COMMAND: EXEC Dial SIP/4671|45|rt
-- AGI Script Executing Application: (Dial)
Options: (SIP/4671|45|rt)
-- Called 4671
-- SIP/4671-5772 is ringing
== Spawn extension (042SB, 4671, 1) exited non-zero
on 'SIP/4670-5e58'
Traceback (most recent call last):
File "/var/lib/asterisk/agi-bin/prueba1.py", line
48, in ?
answeredtime=b.get_variable("DIALEDTIME")
File "/var/lib/asterisk/agi-bin/agi.py", line 536,
in get_variable
result = self.execute('GET VARIABLE',
self._quote(name))
File "/var/lib/asterisk/agi-bin/agi.py", line 98, in
execute
self.test_hangup()
File "/var/lib/asterisk/agi-bin/agi.py", line 95, in
test_hangup
raise AGISIGHUPHangup("Received SIGHUP from
Asterisk")
agi.AGISIGHUPHangup: Received SIGHUP from Asterisk
But if the call cancels the first receiver, in that
case I do not have problems.
Then somebody can say to me like calculating the
duration of the call if it is that a ANSWER takes
place and if the emitter hangs or cancels the first
call that the receiver?
Fernando Villarroel.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
|