[YMCS/YDMP Free Trial Program]Yealink would like to offer Free Trial Program of Yealink device management service for our current eligible customers. You can see the details below.
https://www.yealink.com/ydmp-freetrial-2020


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
V73 Remote Control Forwarding T41
Author Message
raphael Offline
Junior Member
**

Posts: 25
Joined: Mar 2014
Reputation: 0
Post: #1
V73 Remote Control Forwarding T41
We have installations with T41 and T46. Because the T41 has no forwarding key I made a small python script to Control to set that on the T41.

The problem is that the script is not working anymore on V73. Is there a better way to do that on V73 or any hint what can I do?

Thank you

def set_forward(phoneip, status=0, number='', password='admin'):
"""
Used to enable and disable the always forward settings.
We connect to the phone like a webbrowser and send the key/values via POST

phoneip = ip address of the yealink phone
status = 0=off 1=on
number = destination phone number
password = admin password for the web ui
"""
import cookielib, urllib2, urllib
cj = cookielib.CookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
opener.addheaders.append(('User-agent', 'Mozilla/4.0'))
referer = 'http://%s/servlet?p=login&q=loginForm&jumpto=status' % phoneip
opener.addheaders.append(('Referer', referer))
login_values = {'username' : 'admin',
'pwd' : password,
'acc' : '',
'jumpto' : 'status'
}
login_data = urllib.urlencode(login_values)
# do the first login
url = 'http://%s/servlet?p=login&q=login' % phoneip
resp = opener.open(url, login_data)

"""
values = {'ForwardMode': '0',
'AlwaysForwardSwitch': status,
'AlwaysForwardTarget': number,
'AlwaysForwardOnCode': '',
'AlwaysForwardOffCode': '*754',
'BusyForwardSwitch': '0',
'BusyForwardTarget': '',
'BusyForwardOnCode': '',
'BusyForwardOffCode': '',
'NoAnswerForwardSwitch': '0',
'NoAnswerForwardDelayTime': '2',
'NoAnswerForwardTarget': '',
'NoAnswerForwardOnCode': '',
'NoAnswerForwardOffCode': '',
'DNDEmergencySwitch': '0',
'DNDEmergencyNumberList': '',
'DndMode': '0',
'DndStatus': '0',
'DndOnCode': '',
'DndOffCode': ''}"""
values = {'ForwardMode': '0',
'AlwaysForwardSwitch': status
}
if number != '':
values['AlwaysForwardTarget'] = number
data = urllib.urlencode(values)
# send cmd
url = 'http://%s/servlet?p=features-forward&q=write&fwd=0&dnd=0' % phoneip
resp = opener.open(url, data)
02-27-2015 01:43 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
Post Reply 


Messages In This Thread
V73 Remote Control Forwarding T41 - raphael - 02-27-2015 01:43 AM

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Remote Phone Book has stoped connecting smithgt 2 4,079 04-26-2023 01:15 AM
Last Post: smithgt
  V73 - Remote Control fabgoa 5 18,899 02-18-2015 11:44 PM
Last Post: CWR

Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us   Yealink   Return to Top   Return to Content   Lite (Archive) Mode   RSS Syndication