We've been working with vicidial for years now but still don't have a good method for outbound and inbound call matching when you are dealing with different international number formats. Let me explain:
Outbound
When you load leads in vicidial through the lead loader you have to specify the phone code, if you don't the phone code 1 for United States is automatically used. When loading leads for another country, for example Netherlands, you would choose phone code 31.
When these leads are dialed the phone code 31 + 123456789 phonenumber is dialed.
Inbound
When the above mentioned lead is called but doesn't answer and later calls back inbound there are these settings in the Modify DID page that you can use to manipulate the number:
In-Group Phone Code = If you specify a phone code here, for instance 31 for Netherlands, the phone code for the lead is filled with this value
Clean CID Number = With this setting you can remove one or more digits from the left or right position
If you leave these two fields empty, the number will arrive in the system as is, that means the phone code will be saved as a part of the phonenumber in the phone_number field in the database.
Blended matching
Normally when we want to setup a blended inbound/outbound campaign we load leads where the phonenumbers are just the numbers without phone code and we select the phone code we want in the lead loader screen. For the DID configuration we specify the phone code for country that we expect inbound calls from and use the clean DID number feature to remove the phone code from inbound calls so when you use CIDLOOKUP in the DID the inbound call is perfectly matched with the loaded leads.
If you don't do this every inbound call will be added as a new lead because there is no match possible resulting in all sorts of issues like people getting called again even though an inbound call has already been handled.
The problem
Above setup works only for one country. If you get inbound calls from callers in other countries the number is saved in the database with a wrong phone code. For instance someone from the UK calls inbound and because we have set the phone code 31 in the DID page the call is saved with phonenumber 44123456789 in the database with phone code 31. If this lead was also loaded as an outbound lead where the lead was uploaded with phonenumber 123456789 and phone code 44 the inbound call won't match because the phone code won't match. The new lead that is added also can't be called back because of the wrong phone code. This is a problem when you want to use the PRESS_CID_CALLBACK feature.
Solutions
We don't really know what the best way is to setup a system so it works for different countries with different phone codes and still keeps outbound and inbound calls matched.
One way would be to leave the phone code and clean CID fields in the DID empty. But then the loading of outbound leads would become more complicated. You'd have to supplement the phone code to your phonenumbers in the leadfile you are going to upload and somehow make sure the phone_code field remains empty but this is not possible with the lead loader because if you don't select a phone code the code 1 is used for the United States. It would be ideal if the selected phone code would be merged with the loaded phonenumbers in the phone_number field. This would allow perfect matching of every inbound call.
What we have done is make many different dialplans in the carrier section to deal with different number formats for different countries. The biggest problem being that phonenumber lengths are different for each country. This makes it very complex and can result in all sorts of other problems if you have mistake in your dialplan.
Does anyone have solution for this? Maybe there is configuration option that we don't know of.
edit: After lots of searching i did find two other topics about this. Seems a start call URL script could be used to split the phone_code and number and put them in the corresponding fields before doing a CIDLOOKUP.
viewtopic.php?f=4&t=38585
viewtopic.php?f=4&t=38662