hudamalmsteen / sipdroid

Automatically exported from code.google.com/p/sipdroid
0 stars 0 forks source link

Crash with exclude_pattern #58

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. set exclude_pattern to "m,+336*,06*" i.e. exclude french mobile numbers
2. call any number

What is the expected output? What do you see instead?
 crash sipdroid : "fermeture soudaine de l'application Sipdroid (du
processus org.sipdroid.sipua). Merci de réessayer"
 then call is done using PSTN

What version of the product are you using? On what operating system?
 0.9.8

Please provide any additional information below.
 pattern "m" alone works fine

Original issue reported on code.google.com by remi.tur...@gmail.com on 22 Jun 2009 at 8:56

GoogleCodeExporter commented 9 years ago
The + needs to be escaped \+.  

Made changes to treat incorrect pattern input as no pattern.

Original comment by wavehill09@gmail.com on 23 Jun 2009 at 1:18

GoogleCodeExporter commented 9 years ago
thanks, please consider adding this in documentation :-)
It doesn't crash anymore, but it doesn't work : 
with 
    m,06*,\+336*
all my calls are excluded i.e. go to PSTN.
I tried with a simpler pattern
    m,06*
and still, all my call are excluded e.g. a Home number +331555xxxxx goes to 
PSTN.
Is the syntax correct ?

Original comment by remi.tur...@gmail.com on 23 Jun 2009 at 7:38

GoogleCodeExporter commented 9 years ago
06* excludes 066
06\d* excludes 06x 

I updated the FAQ to reflect this correction, sorry for the confusion. 

your pattern m, 06\d*, \+336\d*

more info on constructing patterns is at
http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html

Original comment by wavehill09@gmail.com on 23 Jun 2009 at 11:53

GoogleCodeExporter commented 9 years ago
your pattern for numbers starting with 06 and +336

m,\A06\d*,\A+336\d*

\A look for the pattern at the beginning of the number
\d any digit 0-9

if \A is ommitted the pattern will be matched anywhere in the number 

Original comment by wavehill09@gmail.com on 24 Jun 2009 at 1:59

GoogleCodeExporter commented 9 years ago
The syntax is getting complicated. As an enhancement I suggest that the 
software 
converts a simple syntax for the user into the one required by Java. \A could 
be 
prepended automatically. \d could by set in front of any *. + could be escaped 
automatically.

Original comment by pmerl...@googlemail.com on 24 Jun 2009 at 7:31

GoogleCodeExporter commented 9 years ago
Thanks it works
I used a shorter pattern since I only need to match the begining :
m,\A06,\A\+336

Original comment by remi.tur...@gmail.com on 26 Jun 2009 at 9:14

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Great!! it works, but if i want to force the call over sip?
Do you think is a good idea to ignore the exclude pattern if i'm dialing with 
the
"Text" tab for a contact?
so for example, "Sip when available" enabled in the settings, i route with the
exclude pattern all landline and international calls over SIP and all mobile 
calls
over PSTN but if i want to call mobile through SIP i can use the "Text" tab and 
so
ignore the pattern.

Original comment by dettox on 29 Jun 2009 at 9:27

GoogleCodeExporter commented 9 years ago
ok.  made changes to override exclude rules when intent is to route call over 
SIP. 

Original comment by wavehill09@gmail.com on 30 Jun 2009 at 4:54

GoogleCodeExporter commented 9 years ago

Original comment by pmerl...@googlemail.com on 6 Jul 2009 at 6:40

GoogleCodeExporter commented 9 years ago
thanks for the fixing, did you never added the override functionality described 
in
comment 8? 
because it doesn't work after the update to 0.9.9

Original comment by dettox on 6 Jul 2009 at 7:16

GoogleCodeExporter commented 9 years ago
You are right. That part of the fix is not included because the part of the 
change 
belonging to comments #8/#9 had to be reverted.

Also I noticed that excluding by type (m,h,w) does not work properly. This is 
because 
the code does not search by the contact URI (as done elsewhere for simultaneous 
outbound). Instead it tries to identify the contact from the number and starts 
from 
there. This fails for different number representations.

So there two known issues more than the crash which has been resolved now.

Original comment by pmerl...@googlemail.com on 6 Jul 2009 at 8:34

GoogleCodeExporter commented 9 years ago
Above issues have been resolved.

Original comment by pmerl...@googlemail.com on 7 Jul 2009 at 9:03

GoogleCodeExporter commented 9 years ago
Great, the override works!! now i can stay connected all the time.
I want to confirm you that the exclude pattern by number works very well.

Original comment by dettox on 7 Jul 2009 at 9:17