Phone status not reliable

We are running Openfire 3.3.2 and Asterisk-IM 1.3.1 and have been unable to get reliable phone status for all users. Some users are just fine, but others show as “on the phone” all the time. Are any more updates coming soon to correct this problem?

Confirm that on Openfire 3.3.3

Sometime i have the correct status, sometime i’m always ‘On Phone’

p.s. Btw, sometimes plugin detects i’m calling by using another SIP-client (with the same account settings) and displays the correct status. Cool

Can you reproduce this problem?

A proper test scenario that triggers the bug would be extremely helpful. If I can reproduce it in my environment it’s probably not that hard to provide an update that fixes the issue.

It is a constant problem for us. We have several users who always show up as “on the phone”. Rebooting Asterisk or Openfire does no good.

What makes them different from the users that work?

The only difference that I can see is that the ones that tend to regularly have this problem also tend be be on longer than average phone calls

Same in my environment,

open fire 3.3.3 and IM 1.3.1 asterisk 1.4.13.

was not able to underestand what makes it diffrenet for some users.

First i thought it has something to do with hint , but didnt look like it.

i can give you more info if you are interested.

i guess my next step would be tracing manager events.

yes, everything that helps us spot the problem is higly welcome!

i should have some free time on sunday, i’ll setup a test server with very simple dialplan to see how it acts.

Okay,

Here is some result from test machine with minimal configuration.

I was not able to replicate the issue, the environment i had was a simple asterisk and open fire in one machine, a soft phone, a Cisco phone and linksys phone.

I added a Polycom 501 to system and noticed some inconsistancy.

Although it does not make any sense, but the user with Polycom phone never changed status on its own spark client.

The Polycom user was able to see others are on the phone or not.

Also others were able to see when this phone was in use.

I’ll dig more into it and let you guys know.

Just make the dialplan alittle bit more complex ( added Macros) and now i see it.

one of the users ( in this case Linksys) when it get called and answered its fine, but when they hangup still it shows its on the phone

Found second issue,

It looks like its sensitive to “ChanIsAvail” function.

that caused the phone status to be on the phone for ever.

Can you attach the dialplan fragments so I can reproduce this here?

And just to add on, we do have all Polycom phones and ChanIsAvail is used on all inbound calls.

Here is sip.conf :

context=unknown

bindport=5060

bindaddr=0.0.0.0

srvlookup=yes

tos_sip=cs3

tos_audio=ef

tos_video=af41

maxexpiry=3600

defaultexpiry=3200

disallow=all

allow=ulaw

allow=gsm

allow=ilbc

musicclass=default

limitonpeer=yes

language=en

dtmfmode = rfc2833

;Cisco

type=friend

context=inside

secret=201

callerid=ext 201 <201>

host=dynamic

qualify=no

canreinvite=no

disallow=all

allow=ulaw

mailbox=201@inside

call-limit=3

;Soft phone

type=friend

context=inside

secret=202

callerid=ext 202 <202>

host=dynamic

qualify=no

canreinvite=no

disallow=all

allow=ulaw

mailbox=202@inside

call-limit=3

;Linksys

type=friend

context=inside

secret=203

callerid=ext 203 <203>

host=dynamic

qualify=no

canreinvite=no

disallow=all

allow=ulaw

mailbox=203@inside

call-limit=3

;Polycom

type=friend

context=inside

secret=204

callerid=ext 204 <204>

host=dynamic

qualify=no

canreinvite=no

disallow=all

allow=ulaw

mailbox=204@inside

call-limit=3

Here is extensions.conf :

static=yes

writeprotect=no

autofallthrough=yes

clearglobalvars=no

priorityjumping=no

;===============================Starts Macor’s===========================

;Dials ARG1 for ARG2 Seconds then goes to voicemail for ARG3 context if it exist

exten => s,1,NoOp(Now In DialSip Macro )

exten => s,n,GoTo(stats,1)

exten => s,n(retstats),Answer()

exten => s,n,Set(cwstats=${DB(${ARG1}/CW)})

exten => s,n,Set(fwstats=${DB(${ARG1}/FW)})

exten => s,n,GoToIf($["$" = “0”]?fwoff)
exten => s,n,GoToIf($["$" = “”]?fwoff)

exten => s,n,GoToIf($["${DB(${ARG1}/FWHERE)}" = “extrn”]?extrn)

exten => s,n,Macro(dialsip|${DB(${ARG1}/FWNUM)}|10|inside)

exten => s,n(extrn),Dial(ZAP/1/${DB(${ARG1}/FWNUM)})

exten => s,n,HangUp()

exten => s,n(fwoff),NoOp(Call Waiting Status is $ and Call Forward is $)
exten => s,n,GoToIf($["$" = “1”]?cwon)

exten => s,n,GoToIf($["$" = “”]?cwon)

exten => s,n,GoToIf($["$" = “1”]?s-NOANSWER,1)

exten => s,n(cwon),Dial(SIP/$|$|tr)
exten => s,n,GoTo(s-$,1)
exten => s-BUSY,1,Voicemail($@$|u)
exten => s-BUSY,n,Hangup()
exten => s-NOANSWER,1,Voicemail($@$,u)

exten => s-NOANSWER,n,Hangup()

exten => _s.,1,Hangup()

exten => stats,1,ChanIsAvail(SIP/$,s)

exten => stats,n,Set(dialstats=${IF($[“foo${AVAILCHAN}”=“foo”]?1:0)})

exten => stats,n,GoTo(s|retstats)

;==============================End Macro’s==============================

exten => 201,1,Macro(dialsip|201|10|inside)

exten => 202,1,Macro(dialsip|202|10|inside)

exten => 203,1,Macro(dialsip|203|10|inside)

exten => 204,1,Macro(dialsip|204|10|inside)

exten => 201,hint,SIP/201

exten => 202,hint,SIP/202

exten => 203,hint,SIP/203

exten => 204,hint,SIP/204

I noticed people status unreliable with last example, although very random, was not able to find the root cause but at least i was able to see it sometimes with one user.

The production server shows unreliable status much more often and noticeable, ofcourse it has more complex dialplan.

Let me know what else i can test for you.

Would you like to run same test for 1.2? although i dont think there is a big diffrence between manager events between these two.

I’ll try to reproduce it here with Asterisk 1.4 and if that fails I’ll come back to you.

Thanks

Does anyone know how to manually remove the ‘on phone’ status? Just started using this plugin a few days ago, and have had 2 users stuck on this status for over a day now – new calls, changing status from IM client, disconnecting/reconnecting all do not change the status.

Also, while the problem is being investigated further, could we just have a hard timeout limit where if the status is on phone for X minutes with no new manager events for new calls, then remove the on phone presence. This problem really kills the usefulness of this plugin.

Thanks

You can reload the plugin, this reinitialized the state.

Instead of the timeout I would rather like to fix the underlying

problem. Can you provide details on the circumstances this happended? Is

it reproducible?

=Stefan