AGI-BIN:ImportError: No module named asterisk

Hello To All,

i have install asterisk version 1.4.44 and using python for agi scripts in that i have created one user “9999” than i trying to call while executing this i am getting below errors.
is there any dependancy to be installed to get this working?

[quote] – Launched AGI Script /var/lib/asterisk/agi-bin/incident/SetCommonVariables.py
Traceback (most recent call last):
File “/var/lib/asterisk/agi-bin/incident/SetCommonVariables.py”, line 5, in
from asterisk import agitb
ImportError: No module named asterisk
– AGI Script incident/SetCommonVariables.py completed, returning 0
– Executing [s@IncidentInitiation:4] Goto(“SIP/9999-00000000”, “CheckAuthorization|1”) in new stack
– Goto (IncidentInitiation,CheckAuthorization,1)
– Executing [CheckAuthorization@IncidentInitiation:1] AGI(“SIP/9999-00000000”, “incident/CheckAuthorization.py”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/incident/CheckAuthorization.py
Traceback (most recent call last):
File “/var/lib/asterisk/agi-bin/incident/CheckAuthorization.py”, line 7, in
from asterisk import agitb[/quote]

I am new to python and asterisk, any help and idea will be appreciable

Thanks
Hendip

All versions before 1.8 are obsolete.

You will need to obtain and install a suitable python class library, maybe the one at code.google.com/p/py-asterisk/

[quote=“david55”]All versions before 1.8 are obsolete.

You will need to obtain and install a suitable python class library, maybe the one at code.google.com/p/py-asterisk/[/quote]

Hello David55,
Thanks for your kindly reply
I try from your given link. In that i run this command “python setup.py install” but now it given new error during running script. error is:-

That package is not supported here.

Firstly it is never acceptable to PM people who answer on forums like this with requests for free help. I know that one of the experts on this list once responded to such a request by stating that their standard fee was £50 an hour.

If you are new to python, switch to PHP as a lot more people use PHP class libraries. However you will still need to understand how to use the object oriented features in your chosen language before starting on this project. Support for that library is provided at sourceforge.net/p/phpagi/discussion/366892 Don’t expect sympathy for questions about basic use of the host language.

Also remember to start over with a currently supported version of Asterisk.