Warning: Can't synchronize with repository "(default)" (No changeset 96d22ec3fa3ef6de3ea8dc0d7d398adc9aa071cf in the repository). Look in the Trac log for more information.

Ticket #462 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

GetCallForwarding unhandled exception in response callback: 1

Reported by: michael Owned by: mickey
Priority: major Milestone: cornucopia-0.10
Component: framework/ogsmd Version: milestone5.5
Keywords: GetCallForwarding Cc:

Description

Hi,

i was playing with the fso GetCallForwarding? and get an

2009.08.06 19:10:22.894 ogsmd.channel        ERROR    (ignoring) unhandled exception in response callback: 1
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/framework/subsystems/ogsmd/gsm/channel.py", line 428, in handleResponseToRequest
    ok_cb( reqstring.strip(), response )
  File "/usr/lib/python2.6/site-packages/framework/subsystems/ogsmd/modems/abstract/mediator.py", line 1371, in
+responseFromChannel
    result[ const.CALL_FORWARDING_CLASS[class_] ] = ( enabled, const.phonebookTupleToNumber( number, ntype ), seconds )
  File "/usr/lib/python2.6/site-packages/framework/subsystems/ogsmd/helpers.py", line 66, in __getitem__
    return self._d[key]
KeyError: 1

when call forward is enabled.

greets
Michael

###reproducible

##CallForward disable
$ mickeyterm
AT+CCFC=0,0
AT+CCFC=0,0
OK
AT+CCFC=0,2
AT+CCFC=0,2
+CCFC: 0,7

OK

$ mdbus -s org.freesmartphone.ogsmd /org/freesmartphone/GSM/Device \
org.freesmartphone.GSM.Network.GetCallForwarding 'unconditional'

$ tail -f /var/log/frameworkd.log
2009.08.06 19:02:12.151 ogsmd.channel        DEBUG    <MiscChannel via /dev/pts/0>: sending 13 bytes: 'AT+CCFC=0,2\r\n'
2009.08.06 19:02:12.169 odeviced.idlenotifier DEBUG    active = False
2009.08.06 19:02:12.192 ogsmd.channel        DEBUG    <UnsolicitedResponseChannel via /dev/pts/1>: got 11 bytes: '%CSSN:
+1,0,'
2009.08.06 19:02:12.230 ogsmd.channel        DEBUG    <UnsolicitedResponseChannel via /dev/pts/1>: got 28 bytes:
+'A10B02010A02010E3003040121\r\n'
2009.08.06 19:02:13.8 odeviced.idlenotifier DEBUG    active = False
2009.08.06 19:02:14.8 odeviced.idlenotifier DEBUG    active = False
2009.08.06 19:02:14.599 ogsmd.channel        DEBUG    <UnsolicitedResponseChannel via /dev/pts/1>: got 14 bytes: '\r\n%CPRI:
+1,2\r\n'
2009.08.06 19:02:14.611 ogsmd.device         INFO     org.freesmartphone.GSM.Network.CypherStatus: enabled: unknown
2009.08.06 19:02:15.8 odeviced.idlenotifier DEBUG    active = False
2009.08.06 19:02:15.774 ogsmd.channel        DEBUG    <UnsolicitedResponseChannel via /dev/pts/1>: got 11 bytes: '%CSSN:
+0,2,'
2009.08.06 19:02:15.806 ogsmd.channel        DEBUG    <MiscChannel via /dev/pts/0>: got 20 bytes: '\r\n+CCFC:
+0,7\r\n\r\nOK\r\n'
2009.08.06 19:02:15.821 ogsmd.channel        DEBUG    <MiscChannel via /dev/pts/0>: COMPLETED 'AT+CCFC=0,2' => ['+CCFC: 0,7',
+'OK']
2009.08.06 19:02:15.898 ogsmd.channel        DEBUG    <UnsolicitedResponseChannel via /dev/pts/1>: got 60 bytes:
+'A21B02010A301602010EA311300F830110840106850791946714397247\r\n'


##CallForward enable
$ mickeyterm
AT+CCFC=0,3,"0123456789",145
AT+CCFC=0,3,"0123456789",145
OK
AT+CCFC=0,2
AT+CCFC=0,2
+CCFC: 1,1,"0123456789",145

OK

$ mdbus -s org.freesmartphone.ogsmd /org/freesmartphone/GSM/Device \
org.freesmartphone.GSM.Network.GetCallForwarding 'unconditional'

$ tail -f /var/log/frameworkd.log
2009.08.06 19:10:19.431 ogsmd.channel        DEBUG    <MiscChannel via /dev/pts/0>: sending 13 bytes: 'AT+CCFC=0,2\r\n'
2009.08.06 19:10:19.450 odeviced.idlenotifier DEBUG    active = False
2009.08.06 19:10:19.471 ogsmd.channel        DEBUG    <UnsolicitedResponseChannel via /dev/pts/1>: got 11 bytes: '%CSSN:
+1,0,'
2009.08.06 19:10:19.499 ogsmd.channel        DEBUG    <UnsolicitedResponseChannel via /dev/pts/1>: got 28 bytes:
+'A10B02011702010E3003040121\r\n'
2009.08.06 19:10:21.7 odeviced.idlenotifier DEBUG    active = False
2009.08.06 19:10:21.634 ogsmd.channel        DEBUG    <UnsolicitedResponseChannel via /dev/pts/1>: got 14 bytes: '\r\n%CPRI:
+1,2\r\n'
2009.08.06 19:10:21.646 ogsmd.device         INFO     org.freesmartphone.GSM.Network.CypherStatus: enabled: unknown
2009.08.06 19:10:22.7 odeviced.idlenotifier DEBUG    active = False
2009.08.06 19:10:22.810 ogsmd.channel        DEBUG    <UnsolicitedResponseChannel via /dev/pts/1>: got 11 bytes: '%CSSN:
+0,2,'
2009.08.06 19:10:22.846 ogsmd.channel        DEBUG    <MiscChannel via /dev/pts/0>: got 37 bytes: '\r\n+CCFC:
+1,1,"0123456789",145\r\n\r\nOK\r\n'
2009.08.06 19:10:22.861 ogsmd.channel        DEBUG    <MiscChannel via /dev/pts/0>: COMPLETED 'AT+CCFC=0,2' => ['+CCFC:
+1,1,"0123456789",145', 'OK']
2009.08.06 19:10:22.894 ogsmd.channel        ERROR    (ignoring) unhandled exception in response callback: 1
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/framework/subsystems/ogsmd/gsm/channel.py", line 428, in handleResponseToRequest
    ok_cb( reqstring.strip(), response )
  File "/usr/lib/python2.6/site-packages/framework/subsystems/ogsmd/modems/abstract/mediator.py", line 1371, in
+responseFromChannel
    result[ const.CALL_FORWARDING_CLASS[class_] ] = ( enabled, const.phonebookTupleToNumber( number, ntype ), seconds )
  File "/usr/lib/python2.6/site-packages/framework/subsystems/ogsmd/helpers.py", line 66, in __getitem__
    return self._d[key]
KeyError: 1
2009.08.06 19:10:22.923 ogsmd.channel        DEBUG    <UnsolicitedResponseChannel via /dev/pts/1>: got 58 bytes:
+'A21A020117301502010EA310300E8301108401078506911032547698\r\n'


Change History

comment:1 Changed 4 years ago by michael

Hi,

this little change works for me.

greets
Michael

diff --git a/framework/subsystems/ogsmd/modems/abstract/mediator.py b/framework/subsystems/ogsmd/modems/abstract/mediator.py
index 83e7a81..b6c37a0 100644
--- a/framework/subsystems/ogsmd/modems/abstract/mediator.py
+++ b/framework/subsystems/ogsmd/modems/abstract/mediator.py
@@ -1368,7 +1368,7 @@ class NetworkGetCallForwarding( NetworkMediator ): # a{sv}
                     result = {}
                     break
                 else:
-                    result[ const.CALL_FORWARDING_CLASS[class_] ] = ( enabled, const.phonebookTupleToNumber( number, ntype ), seconds )
+                    result[ const.CALL_FORWARDING_CLASS.revlookup(class_) ] = ( enabled, const.phonebookTupleToNumber( numbe, ntype ), seconds )
             self._ok( result )
         else:
             NetworkMediator.responseFromChannel( self, request, response )

comment:2 Changed 4 years ago by mickey

  • Status changed from new to closed
  • Resolution set to fixed

committed as per [6df146d1485aca134a8b564d1b6ea9fcb8d29cac], thanks a lot!

Note: See TracTickets for help on using tickets.