Search

Thursday, July 22, 2010

What is the China 400 toll-free number?

You should already know the 800 toll-free number as a global business tool.
 
As you explore the huge market in China, you must also know the China 400 toll-free number because of its coverage and cost impact.
 
  • It is accessible by any fixed-line and mobile networks in China while the 800 toll-free is not accessible by mobile phones.
  • One single 400 toll-free can cover the whole China
  • You will be paying less to subscribe the 400 toll-free because callers will bear their own connection charge
The China 400 toll-free numbers are available in some VOIP DID providers.

Wednesday, July 21, 2010

Some examples of configuring DID in Asterisk

We have many clients using HK DID (852-5804-) and China DID (86-400-) from a HK-based DID provider.  Recently, we encountered a client using several DID providers from the US and needed us to setup an (Interactive Voice Response System) IVRS in Hong Kong to handle inquiries from his US customers.
 
This client is using didforsale.com, didww.com and didx.net.  In the first place, we have to setup Asterisk, primarily in the sip.conf, to accept SIP calls from these providers.  Below highlights the parameters required in sip.conf.
 
sip.conf
[general]
; to setup the default context for all incoming calls
context=ivrs-context
 
 
didforsale.com
 

[didforsale]

type=friend

host=209.216.2.211

canreinvite=no

insecure=very

disallow=all

allow=ulaw

allow=alaw

allow=g729

nat=yes

context=ivrs-context

 

In the provider's configuration page, we have to input below information.

q       Manage IP

o       Input our-asterisk-ip to receive DID calls

q       Manage DID

o       Map DIDs to our-asterisk-ip

   

 

didww.com
 

[didww_us4]

dtmf=rfc2833

dtmfmode=rfc2833

host=204.11.194.38

insecure=very

type=peer

context=ivrs-context

nat=yes

disallow=all

allow=alaw

allow=ulaw

 

In the provider's configuration page, we need to create custom mapping because the default one will not send the called number to Asterisk.

 

didx.net

 

[didx]

dtmf=rfc2833

dtmfmode=rfc2833

host=208.44.220.234

insecure=very

type=peer

context=ivrs-context

nat=yes

canreinvite=no

relaxdtmf=no

disallow=all

allow=ulaw

allow=alaw

 

In the provider's configuration page, we need to update ring-to-address to did@ivrs-ip-address

e.g.,15672512762@ivrs-ip-address.

 
 
Above all, we also need to check whether there are any firewall rules that block sip calls from these provider.  Note that we use G711 with some providers.  The customer intends to make certain DIDs as fax-in numbers, though the reliability will not be as good as traditional PSTN fax.  In this case, we just could not use a lossy codec like G729.
 
 
 
 

Monday, July 19, 2010

What is DID number and why we need it?

What is a DID number
 
A client asks about DID number. 
 
We are selling DID numbers in Hong Kong (5804-) and China (400-) to overseas call centers.  A number of inquiries have been received.
 
In the first place, what is a DID number?  It stands for Direct Inward Dialling number (http://en.wikipedia.org/wiki/Direct_inward_dialing).    You purchase a DID number from a telecom operator in another country and forward it to your local contact number so it looks like that you have a point of presence in the foreign country.
 
It becomes useful when you are operating a call center in e.g., US and would like your Hong Kong customers to call a Hong Kong number to reach your agents.  There are many reasons for not having an overseas call center, such as high labour cost, high setup cost, difficulty with remote management or lack of agent expertise.   With DID, you could serve customers around the globe with centralized resource.
 
The DID number is usually forwarded to your local contact number via Internet and so you usually do not need to pay the call charges for air-time.  The DID provider usually just charges you a basic monthly fee per number per channel plus an once-off setup charge.  A number with single channel means it could handle one simultaneous call only.  The second caller will hear busy tone.
 
Value added services
Some providers offer voice recording as an customizable option.  Conditional forwarding and automatic call distribution (ACD) will add more flexibility and control to your call center.  These are fundamental features in many of the call center systems today.  However, if you are just about to start a small call center with limited system investment, these on-demand value-added features are worth your consideration.
 
 
Technical consideration
While we mention that DID calls are forwarded via Internet, we have to know more about the protocol and bandwidth required.   The forwarding over Internet is accomplised by a standard VOIP protocol, Session Initiation Protocol (SIP).  This protocol controls the signaling and voice communication sessions over IP.   Your IT support team should be able to manage a SIP based PBX system, like Asterisk or Trixbox to connect the incoming SIP trunk from your DID provider.
 
In addition, to conserve internet bandwidth, audio data is usually compressed to 8kps bitrate using the G729 codec.  Practically, a two-way conversation consumes about 70-80kbps bandwidth.  This figure takes into account the payload and overhead in transmission.    You might have to check your ISP to allocate sufficient and reliable bandwidth for your agents. 
 
Note that DTMF tones and fax transmissions could not be reliably transported with G729.
 
 
 
 

Thursday, July 15, 2010

How to upload UTF8 fax list into MYSQL

A client occasionally needs to upload large fax list (over 100,000 numbers) to our web-based fax broadcast platform.  The utf8 encoded list consists of China fax numbers, company and contact name among other information.
 
He soon encounters sesson timeout when uploading such a big file.
 
To solve this problem, we prepare some scripts to upload the list on behalf of him.
 
As the fax list will be eventually stored in MYSQL, we use the command line utility 'mysqlimport' to directly import the list on server side.
 
mysqlimport \
--user=<login_id> \
--password=<password> \
--default-character-set=utf8 \
--local \
--force \
--columns=col1,col2,col3,col4 \
--fields-optionally-enclosed-by='"' \
--fields-terminated-by='\t' \
--lines-terminated-by='\r\n' \
--ignore-lines=1 \
--delete \
--verbose \
--debug \
db_name source_fax_list.txt
 
Note that mysqlimport will take source_fax_list as the table name to upload.  The parameter 'local' is required, otherwise, mysql will assume your fax list is in mysql's installation directory.  The 'ignore-lines=1' will skip the header line in fax list.  The 'delete' parameter instructs mysql to truncate table before upload.  The 'default-character-set' parameter is also required to import utf8-encoded list.
 
It just takes a few seconds to upload over 100,000 numbers to our MYSQL.  Nevertheless, one drawback of mysqlimport is that we could not easily see the warnings or errors happened in upload.  A 'show warnings' would not display the required information.  An alternative is to use 'Load data local infile' in mysql session and issue 'show warnings' afterwards to inspect the upload warnings or errors.
 
Sometimes, we need to verify the contents of our list by querying the table, but only to see some funny characters.  It might be due to missing translation settings in our telnet client and 'charset' when querying mysql.
 
For example, we use PuTTY to telnet to our MYSQL server.
 
The PuTTY translation (Configuration|Window|Translation) should be set to UTF-8. 
 
When logging in mysql, we also need the parameter  '--default-character-set=utf8'. 
 
mysql -u <userid>  --password=<password> --default-character-set=utf8
Both are required to see the UTF-8 Chinese characters