It is often useful to be able to alter certain actions based on the phone number to be dialed. Also, sometimes the contact phone numbers are in a form that cannot be used for SIP calls, and thus need to be rewritten for the needs of the SIP switch/account. These things are handled by filters in the application. Important points:
Filters are a very powerful feature of the application, so use your imagination and creativity and you can probably solve the problem you have. Filters are much more powerful and flexible than the more common "dial plan" features found on other SIP phones.
The filters editor is one of the settings categories. We won't give touch-by-touch directions here, it's assumed you'll be able figure the user interface out. It is intuitive and simple. Once you're in the filters main screen, you'll see a list of SIP accounts and, at the bottom, a Dialer entry (which acts like an account but for the native dialer). Touching an account starts the filter editor for that account. Now you can add a new filter or edit an existing one (by touching it in the list). Delete a filter with a long-touch and then touching Delete filter.
Most commonly, filters are used for implementing "dial plans" as used on other SIP phones. Let's say you have contacts in your phone which have full international/E.123 format phone numbers, an internal extension number, and a full SIP address:
Let's also say your country code is 1 and you have a SIP account for a provider or company switch and it requires the following number formats for successful (outside) dialing:
See Multiple Filters
Your full phone numbers are in E.123 format, so some rewriting will be needed on the account for your provider or company switch:
In the US, mobile phone companies use these same formats, so you will need the same filters applied to the Dialer. By the way, there is a very useful Android application Contacts Cleanup which will format all of your contact phone numbers into the international/E.123 format.
For a company SIP switch, internal extensions (usually just three digits) cannot be dialed with the mobile Dialer and must always be dialed via your company SIP switch account. For this, you would use a filter on your company switch account which looks for exactly 3 digits and has an action of direct call. This forces the application to immediately use the company switch account for internal extensions. The outgoing call chooser never appears.
In the US, emergency dialing is also three digits, 911. Let's say you want 911 to always be dialed with your mobile phone and not any SIP account (so the E911 service gets your GPS coordinates). For this, you would use a filter on the mobile dialer that looks for exactly 911 and has an action of direct call. This forces the application to immediately use the mobile dialer for emergency calls. The outgoing call chooser never appears.
The application will treat a custom IM address with the label SIP as a phone number. It should be a full SIP URI such as george-mobile@sip.acme.com, so it will contain an '@'. Clearly this cannot be dialed via the mobile dialer, and you probably want to use a specific account to make these direct SIP calls. On that account, use a filter on the account that looks for @ in the "number" and has an action of direct call. This forces the application to immediately use that account for direct SIP calls. The outgoing call chooser never appears.
You can create multiple filters on an account. They will be run in the order listed. You can reorder the filters by dragging and dropping. Touch and drag by the gray icon on the left edge of the filter entry in the list. Note that the Can't call and Directly call filter actions happen immediately; any filters listed afterward will not run if these actions occur.
This section describes the filter rules and the actions that can occur if the phone number matches the rule. A rule consists of a match type and some value you supply such as a match pattern or a numeric value. An action is what happens if the rule is matched. In the filter editor, the action is selected at the top and the rule is specified in the box below that. If the action is Rewrite a third area appears in which you specify some prefix, suffix, or replacement text.
A matching number will prevent this account from showing in the outgoing call chooser.
A matching number will force this account to be immediately used for calling. The outgoing call chooser will not be shown.
A matching number will be rewritten according to the replacement action. The rewritten number will be passed along to the next filter (if any) as input.
A matching number will not be passed along to the next filter (if any). Instead, it will be used as-is.
to be written
Numbers can consist of digits, letters, and/or punctuation.
The number is matched if it starts with the given text.
The number is matched if it ends with the given text.
The number is matched if it contains the given text anywhere within it.
The number is always matched.
The number is matched if it is exactly the given length.
The number is matched if it is the given length or longer.
The number is matched if it is exactly the same as the given text.
Matching is specified by the given Java regular expression. The regular expression pattern can contain one or more capturing groups, useful for Rewrite filters with the Custom RegExp replacement type.
This applies only to the Rewrite action.
The given text is put before the beginning of the matched text in the number.
The given text is put at the end of the matched text in the number.
The given text replaces the matched text in the number. The unmatched text in the number remains. Examples:
The given text replaces the entire number.
Useful only if the match type is also Custom RegExp, and if the match regular expression pattern contains one or more capturing groups. In this case, the captured text for each group (left to right) can be specified with $1, $2, etc,. and the entire matched string can be specified with $0. For more information see the documentation of java.util.regex.Pattern.
_ to be written_
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: rudhra%y...@gtempaccount.com
What if I have this:
And I want to configure it in such a way:
The way I do this:
This way, it works, but I still have questions:
So I would have to activate the account and change this setting, later change it back and deactivate the account again..
What would be the best way to handle this easily? It would be great if there was an option to label an account "incoming only" or something like that.
I don't want to use account A (incoming) all the time because I want to save battery and people can reach me already on this number when I am at home (I have a DECT phone connected to my router with sip functionality).
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: rudhra%y...@gtempaccount.com
OK now I do it like this:
account A is activated but with a filter "Can't call" if "Custom regxp" "." (star dot) Easy configuration set to "outgoing calls only"
So if I want to use account A, I start cSipSimple manually, modify Easy Configuration to Always on. Afterwards, set it back to Outgoing only.
Done!
Account A is not even registered when the call chooser is launched, nice! And cSipSimple exits automatically afterwards. Great!
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: taubetap...@gmail.com
I'm having problems understanding the filtering rules. In my case, I would like to append 148 on all outgoing numbers/calls, whether 10 or 11 digits dialed numbers. How I can do this? Could you walk me through the steps please? Thx.
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: nortap0@gmail.com
Create a filter and chose "Rewrite", and then choose "Has exactly N digit", and enter 10 below that, then select "Prefix by" and enter 148. This tells it that if the number has exactly 10 digits, prefix it with 148. Then just add another filter for 11 digits. Hope that helps.
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: edesk.pr...@gmail.com
Back up/Restore supports only accounts and filters created for each account. There is no provision of back up for filters created for dialer. Back up/Restore for dialer filters would be very helpful.
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: djrbmw1...@gmail.com
I'm new to this "getting a free phone" service and I'm trying really hard to understand it. I've tried to use SipGate? but their website is always telling me that no phone numbers are available. I currently don't have a phone and would like to use VOIP with my old cell phone but it's so damn hard to understand. If somebody could please get back to me with some help, that would be great. djrbmw1982@gmail.com
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: Eoin.Col...@gmail.com
CSipSimple seems to work better than Sipdroid for me in every respect except one: on SipDroid?, I can add a + to any dialled number to force it to use VoIP. Is there a way of reproducing that - or something similar - using cSipSimple filters?
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: r3gis...@gmail.com
Yeah absolutely. That's even much more complete feature in CSipSimple,
Just go in settings, and create two filters, one to do action "force call" when start with a "+" (could be start with everything you want). And add one to "rewrite" number that starts with "+" with "". (If you don't want the sip call to contains the "+" sign obviously).
The filter feature is very very powerful. You can imagine almost everything you want with it.
You can also for example decide to call all numbers that start with a certain number with a specific SIP account. And others that starts with other numbers (or are exactly other numbers) to never use SIP at all. Normally, it should even allow you to add rules for your call routings seamlessly. And to not have to add manually a additional sign - but if you want to continue to use this way you can using two rules as I described.
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: grol...@gmail.com
Hi can You write simple regex ? I want detect if last char is + :-) thanx
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: vmusa...@gmail.com
Hi, I am a happy CSipSimple user. I am now starting using simple rules but not working. I need to add a 5511 prefix to any call using 8 digits but the following filter is not working:
Action: Rewrite Match Type: Has exactly N digit ->8 Replacement Type: Prefix by -> 5511
What´s wrong?
Thanks, Victor
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: to.d...@gmail.com
How can I change the order of rules applied by accounts and handle rules conflicts/intersections?
E.g.: 1) I have one ambiguous rule "Dial directly"/ALL for the dialer handling most of the calls. 2) I have several "Dial directly"/RegExp? exception rules for multiple SIP accounts for specific calls. This scheme allows transparent calling with no account selector UI appearing at all.
What currently happens: the dialer generic rule overrides all the SIP specific rules. I have to create a bogus Dialer "Can't call" rule for EACH specific SIP "Dial directly rule" making the whole rules logic ineffective and duplicated.
What I expect: more specific rules should take priority OR I must have an option to reorder the way rules are processed by accounts (e.g. making Dialer rules affect last).
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: lipeng8...@gmail.com
HI, I do receive a lot Anonymous calls (spam, fax broadcast) since using one account with Csipsimple. I do have FreeSwitch? in home to have those unwanted calls (anonymous,800-advertising,sales,etc) being processed to either VoiceMail? or droped. Like the following rules,
Can we develop a basic filer like this dealing with Incoming calls so we can have it filtered and processed the way we want? thanks
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: w.bar...@gmail.com
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: viktor.b...@gmail.com
Hi all, I've been battling with the custom regexs which I finally got to work. I thought I'd give others an important hint, which wasn't obvious to me. Normally regexs match the search pattern anywhere. e.g.
^#
will match#whatever
at the beginning of a line. Not here though - the regex needs to match the WHOLE string. So to match#whatever
(or anything else starting with hash), you need^#.*
Took me ages to work that out! Maybe I'm dumb :-) In general though, the filters seem to work (I've tried "stop processing", "directly call", "rewrite" and "can't call"), though some experimentation is needed to figure out what works and what doesn't.One thing that didn't seem to work properly is that if there is only a single possibility for which SIP account to use in the dialer selector menu (with dialer integration enabled) after you're filtered out other accouts, a final "call directly all" filter for the surviving account doesn't seem to work. I needed to remove a "can't call" filter in the "use mobile" account so the mobile also appeared in the selector menu - then the direct call to my SIP account worked.
Nice app BTW!!
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: JoshuaJa...@gmail.com
I have been a dedicated Google user for years. Using their services for my online experience has been great. The services I have used are always free, and they are constantly updating, integrating across platforms, streamlining settings and passwords all the while keeping my data secure whilst keeping spam, hackers and viruses at bay. Open source code, for what little I understand, has opened up the internet to allow us(the users) to send/receive information via voice/video/text/etc. through multiple and different interfaces seamlessly as possible across all different types of platforms. What I am trying to say is more-so, now that I have an android phone(lg pheonix android v-2.2.2) why am I having so much difficulty integrating my google # so as when placing/receiving calls/txts, why is my dumb ATT GO Phone # have to get in the way. I wish there was an app that, after being downloaded from the android market, would in essence unlock the phones pre-programmed applications, intake all my different account ID/Passwords for each and every account I might have throughout every corner of the internet whether it be bank accounts, credit cards, state id's, student id's, video sharing, social networking, video/txt messaging, music, gaming, routers/modems, and all the above/etc. and streamline it into one online account interface to control access/settings so as to then reprogram the phone's applications and widgets to save energy, money, memory and bandwith accross the network as a whole. That is the world I see. Sorry if I have gone on and on, but, maybe you can help me with just a part of that whole scenario. I guess I don't know enough about SIP to know wether or not I can install your APP and have it intergrate with my google voice # so I can place/receive txts/calls via my phones WIFI connection all the while switching to the ATT GO PHONE service when WIFI not available?
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: sey...@gmail.com
I am having trouble understanding how to set the filter.
I want all calls starting with 0[2-9] or +49[2-9] to go over voip automatically. How do I do that?
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: hutchinsfairy
I'd like to echo to.djet and say that it would be really useful to specify which filters take priority. It seems that the "Use Mobile" filters are processed before any SIP ones. It would be easier for me if CSipSimple could process the SIP filters first, then the "Use Mobile" ones.
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: d230...@gmail.com
you can test java regular expressions online here: http://java-regex-tester.appspot.com/
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: misbi...@gmail.com
Great app! Just in case someone else has the same problem I just solved for myself:
I have two VOIP providers for outgoing calls. I am using the first for mobiles in Hungary and Italy, the second for all other calls. It was easy to set the filter for the 2nd provider: I just used the "Can't call" filter with the "Starts with" condition, and I added 4 filters for +3620, +3630, +3670 and +393.
Setting the filter for the first provider was much trickier, I ended up using a regexp with negative lookahead. The filter type is "Can't call", with the following "Custom RegExp":
This way, the dialer always offers the right choice. I hope this might help someone some day.
View and moderate all "wiki Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Wiki"
Originally posted by: putuindr...@gmail.com
can you please tell me what this is? I would like to deepen http://wdfshare.blogspot.com
It took me a while to get it working the way I want it, and I think that an example could be useful to others. Here are my notes.
I'm using a data only plan, but calls through Mobile will go through but will be very expensive. I want to keep the possibility to use it by adding a prefix to the number. In my region, a fixed format of 10 digits is used, and I don't need to worry about calling oversees with other dialing formats.
My objective is to configure CSipSimple to intercept calling attempts from the native dialer, select the proper account and refomat the numbers as required. Once configuration is completed, accessing the user interface of CSipSimple will not be required; all dialing will be done from the native dialer, and a popup screen might show up on screen to select the account if the filters are not explicit enough. In my case, I don't want the popup screen to show up.
My objectives are:
Always use Mobile Phone to call 911
Use SIP account for all other calls
* Adding a prefix "9" to a complete 10 digits phone number will route the call through Mobile. The filter will delete the prefix before calling.
Configure CSipSimple as follows:
Integrate with Android
Availability Profile: Always Available
I'm allowed to use mobile
Network
For Incoming Calls: Select all
For Outgoing Calls: Select all
Dialer Integration
Call logs integration
Mobile Phone Integration: AUTO
Filters:
SIP account:
Stop Processing, Starts With, 9
Directly Call, All
Use Mobile:
Directly Call, Is exactly, 911
Stop Processing, Custom RegExp, ^(?![9][0-9]{10}$).
Rewrite, Starts With, 9, Replace Match By, [empty!]
* Directly Call, All
I'm not completely done with all testing, but initial tests seems to work as intended.
I'm a total rookie with regex, so don't ask questions! This site was a useful reference:
https://regex101.com/
In my case, the intent of the regex is to be TRUE all the time except for the exact fomat that I'm looking for.
Hope it helps someone.
I'd like to see your recommendations to improve my setup.
Thanks.