From: Matthew A. N. <mni...@di...> - 2006-01-13 00:42:32
|
Pyst raises an ASTSIGHUPHangup exception when your "emitter" hangs up. You can catch this exception, but once you get the SIGHUP, asterisk is no longer responding. Try using DeadAGI to execute your application instead of AGI. FERNANDO VILLARROEL wrote: > 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 > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > _______________________________________________ > Pyst-users mailing list > Pys...@li... > https://lists.sourceforge.net/lists/listinfo/pyst-users -- Matthew A. Nicholson Digium |