captain_perreiro

Untitled

Oct 2nd, 2013
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def onDial(protocol,event):
  2. """ Функция слушат определенные номера из переменной extensions и при звонке на них выполняет действия... """
  3. if 'destination' in event:
  4. destination=event['destination']
  5. for s in extensions.keys():
  6. if destination.startswith(s):
  7. cid=event['calleridnum']
  8. cidname=event['calleridname']
  9. channel=event['channel']
  10. extname=extensions[s]
  11. if (cidname == "Пономарев"):
  12. protocol.setVar(channel, "uniqueid", "test")
Advertisement
Add Comment
Please, Sign In to add comment