mirror of https://github.com/sipwise/sems.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
760 B
31 lines
760 B
# (outgoing) ivr b2bua example
|
|
#
|
|
#
|
|
from log import *
|
|
from ivr import *
|
|
|
|
class IvrDialog(IvrDialogBase):
|
|
|
|
def onSessionStart(self):
|
|
|
|
info("starting b2bua app ...")
|
|
self.setNoRelayonly()
|
|
self.audio_msg = IvrAudioFile()
|
|
self.audio_msg.open("/home/stefan/sub_nautilus.wav", AUDIO_READ)
|
|
self.setTimer(1, 10)
|
|
self.enqueue(self.audio_msg,None)
|
|
|
|
def onEmptyQueue(self):
|
|
return
|
|
|
|
def onTimer(self, timerid):
|
|
self.disconnectMedia()
|
|
debug('hello kitty')
|
|
self.connectCallee(self.dialog.local_party,self.dialog.local_uri, \
|
|
self.dialog.remote_party,self.dialog.remote_uri,)
|
|
return
|
|
|
|
def onBye(self):
|
|
|
|
self.stopSession()
|