Ejemplo n.º 1
0
def landingCall(to,mediaName,mediaTxt,displayNum,playTimes,respUrl,userData,maxCallTime,speed,volume,pitch,bgsound):

    
    #初始化REST SDK
    rest = REST(serverIP,serverPort,softVersion)
    rest.setAccount(accountSid,accountToken)
    rest.setAppId(appId)
    
    result = rest.landingCall(to,mediaName,mediaTxt,displayNum,playTimes,respUrl,userData,maxCallTime,speed,volume,pitch,bgsound)
    for k,v in result.iteritems(): 
        
        if k=='LandingCall' :
                for k,s in v.iteritems(): 
                    print '%s:%s' % (k, s)
        else:
            print '%s:%s' % (k, v)
   
   
#landingCall('被叫号码','语音文件名称','文本内容','显示的主叫号码','循环播放次数','外呼通知状态通知回调地址','用户私有数据','最大通话时长','发音速度','音量','音调','背景音编号')

# to = '15750798687'
# mediaName = "myMic.wav"
# mediaTxt = ""
# respUrl = ""
# userData = ""
# maxCallTime = ""
# speed = ""
# volume = ""
# pitch = ""
# bgsound = ""
# displayNum = ""
# playTimes = 3
# landingCall(to,mediaName,mediaTxt,displayNum,playTimes,respUrl,userData,maxCallTime,speed,volume,pitch,bgsound)
def landingCall(to):

    rest = REST(serverIP, serverPort, softVersion)
    rest.setAccount(accountSid, accountToken)
    rest.setAppId(appId)

    mediaTxt = ''
    playTimes = 2
    respUrl = ''
    userData = ''
    maxCallTime = ''
    speed = ''
    volume = ''
    pitch = ''
    bgsound = ''

    result = rest.landingCall(to, mediaName, mediaTxt, displayNum, playTimes,
                              respUrl, userData, maxCallTime, speed, volume,
                              pitch, bgsound)
    for k, v in result.iteritems():

        if k == 'LandingCall':
            for k, s in v.iteritems():
                print '%s:%s' % (k, s)
        else:
            print '%s:%s' % (k, v)
Ejemplo n.º 3
0
def landingCall(to,mediaName,mediaTxt,displayNum,playTimes,respUrl,userData,maxCallTime,speed,volume,pitch,bgsound):

    
    #初始化REST SDK
    rest = REST(serverIP,serverPort,softVersion)
    rest.setAccount(accountSid,accountToken)
    rest.setAppId(appId)
    
    result = rest.landingCall(to,mediaName,mediaTxt,displayNum,playTimes,respUrl,userData,maxCallTime,speed,volume,pitch,bgsound)
    for k,v in result.iteritems(): 
        
        if k=='LandingCall' :
                for k,s in v.iteritems(): 
                    print '%s:%s' % (k, s)
        else:
            print '%s:%s' % (k, v)
   
   
#landingCall('被叫号码','语音文件名称','文本内容','显示的主叫号码','循环播放次数','外呼通知状态通知回调地址','用户私有数据','最大通话时长','发音速度','音量','音调','背景音编号')
Ejemplo n.º 4
0
def landingCall(to):

    rest = REST(serverIP,serverPort,softVersion)
    rest.setAccount(accountSid,accountToken)
    rest.setAppId(appId)

    mediaTxt    = ''
    playTimes   = 2
    respUrl     = ''
    userData    = ''
    maxCallTime = ''
    speed       = ''
    volume      = ''
    pitch       = ''
    bgsound     = ''

    result = rest.landingCall(to,mediaName,mediaTxt,displayNum,playTimes,respUrl,userData,maxCallTime,speed,volume,pitch,bgsound)
    for k,v in result.iteritems():

        if k=='LandingCall' :
                for k,s in v.iteritems():
                    print '%s:%s' % (k, s)
        else:
            print '%s:%s' % (k, v)