Conditional clauses: Only start script on incoming calls.
This commit is contained in:
		
							parent
							
								
									3a32e64719
								
							
						
					
					
						commit
						114e9c3e49
					
				| 
						 | 
					@ -15,10 +15,17 @@ def watch_disconnect(monitor, event_queue, func, tams, healthcheck_interval=10):
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            # do event processing here:
 | 
					            # do event processing here:
 | 
				
			||||||
            print(event)
 | 
					            print(event)
 | 
				
			||||||
            if 'DISCONNECT' in event:
 | 
					            if 'DISCONNECT;0' in event:
 | 
				
			||||||
                print("Anruf beendet. Jetzt den AB checken.\n")
 | 
					                print("Incoming call stopped. Check the TAM.\n")
 | 
				
			||||||
                func(tams)
 | 
					                func(tams)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            elif 'DISCONNECT;1' in event:
 | 
				
			||||||
 | 
					                print("Outgoing call stopped. Do nothing.\n")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            else:
 | 
				
			||||||
 | 
					                print("Unknown event.\n")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def endedCall(func, tams, fritz_ip='192.168.1.1'):
 | 
					def endedCall(func, tams, fritz_ip='192.168.1.1'):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue