#!/usr/bin/python import time import sys import getopt args = getopt.getopt(sys.argv[1:], 'callerid', 'serviceno') callerid=args[1][0] print callerid serviceno=args[1][1] print serviceno import os rundead = "/var/lib/asterisk/agi-bin/callback/callback_dead.sh" os.spawnl(os.P_NOWAIT,rundead,'',callerid,serviceno)