Hi,
I am working in my sandboax environment to subscribe to incoming call to my extension. Since I later want to graduate this to looking at multiple extensions in the company I am looking at this event filter for my subscription:
/restapi/v1.0/account/~/extension/[extension_id]/presence
but since I am wanting to pull in detailed information about each individual call (specifically the session id) I am needing to scribe to the event with this filter:
/restapi/v1.0/account/~/extension/[extension_id]/presence?detailedTelephonyState=true
I can get the subscription to work when I don't filter to get the detailed information, but when I provide the detailedTelephonyState=true I get an error when receiving the notification. The error I get is "ValueError: Extra data:..."
How can I get my subscription to work and get the detailed telephony state?
The code I am using is:
def on_message(msg): print(msg) #PowerBI(msg) def pubnub(): s = sdk.create_subscription() s.add_events(['/restapi/v1.0/account/~/extension/[extension_id]/presence?detailedTelephonyState=true']) s.on(Events.notification, on_message) s.register() print(s.subscription()) while True: sleep(0.1) try: try: import Pubnub t = Thread(target=pubnub) t.start() except ImportError as e: print("No Pubnub SDK, skipping Pubnub test") except KeyboardInterrupt: pass pubnub()