Sunday, February 20, 2011

Blocking Incoming calls on H323 gateway



Call Blocking Specific Calling Numbers

Configure a voice translation rule to block the desired calling number you want to block. This example uses 9193927393.

voice translation-rule 1
 rule 1 reject /9193927393/    

!--- Matches the defined number string and rejects the call.

!

!--- Apply the rule to a translation profile for the calling number.
!--- You could also reject based on called or redirect-called numbers.

!
voice translation-profile call_block
 translate calling 1    

!--- Invokes voice translation rule 1 in order to determine
!--- which calls to reject based on the calling number.

!

!--- Include the translation profile within a dial peer definition.

!
dial-peer voice 100 pots
 call-block translation-profile incoming call_block    

!--- Invokes the voice translation profile    call_block   on
!--- inbound POTS calls that match this peer
!--- in order to determine which calls to reject.

 call-block disconnect-cause incoming call-reject
 incoming called-number      

!--- Matches this peer for all inbound POTS calls.

 port 1/1:23

Reference:
http://www.cisco.com/en/US/tech/tk652/tk90/technologies_configuration_example09186a00803f818a.shtml#con13

Tuesday, February 8, 2011

Extracting Audio from sniffer trace


You can extract an RTP stream from Wireshark (used to be called Ethereal) and convert to audio to play with windows media player or cool edit. It's really handy for audio quality issues.

To extract RTP audio using Wireshark:


  1. Select a UDP packet.
  2. Decode as RTP by selecting: Tools-> Decode As -> Transport -> RTP -> Apply
  3. Invoke RTP stream analysis by selecting Tools-> Statistics -> RTP Streams -> Analyze. This will bring up the analysis window, with each stream under a different tab.
  4. Streams may be saved separately or mixed as .au files (8000 HZ, 8-bit, mono PCM) by selecting the Save Payload button. This brings up the Save window, where it is possible to select Forward, Reverse, or Both for the stream(s) to save. You must specify a directory in which to save and a file name.
  5. The resulting .au audio file can then be heard on a system with a sound card with any audio player such as Windows Media Player or CoolEdit.

Command Line Interface Reference Guide - Call Manager 7.X

Here is a useful guide to understand the CLI of Call Manager 7.X:

http://www.cisco.com/en/US/partner/docs/voice_ip_comm/cucm/cli_ref/7_0_1/cli_ref.html

MGCP configuration


#### MGCP configuraion ####

ccm-manager fallback-mgcp
ccm-manager redundant-host 192.168.12.115
ccm-manager mgcp
ccm-manager music-on-hold
ccm-manager config server 192.168.12.114
!
mgcp
mgcp call-agent 192.168.12.114 service-type mgcp version 0.1
mgcp bind control source-interface GigabitEthernet0/0.102
mgcp bind media source-interface GigabitEthernet0/0.102
!
mgcp profile default


If MGCP is configured using commands given above call manager does not have enough access to reset the gateway.

In that case we will have to reset the gateway using
#no mgcp
#mgcp

Resetting the call manager will do nothing

# MGCP Configuration#

ccm-manager config
ccm-manager config server

NOTE: Above two commands will give call manager access to reset the gateway from call manager page itself. By hitting the reset button

# isdn bind-l3 ccm-manager <backhauls the layer 3 messages coming from telco to call manager>

Is another important command that needs to be added in the MGCP configuration

Fax configuration



#### Modem Pass through ####

#### Global Mode ####

 voice service voip
 modem passthrough nse codec g711ulaw redundancy maximum-session 5

#### Dial-peer mode ####

 dial-peer voice 2 voip
 incoming called-number 020..
 destination-pattern 55511..
 modem passthrough nse codec g711ulaw redundancy
 session target ipv4:10.10.0.2

For more configurations please visit http://www.cisco.com/en/US/docs/ios/voice/fax/configuration/guide/vf_cfg_fx_passthr_ps6350_TSD_Products_Configuration_Guide_Chapter.html#wp1039411

Blocking incoming calls from MGCP


Method 1: (if you are using the MGCP gateway)

Blocking Particular Incoming call
Example: You need to block 0431183951

Gateway Incoming CSS: PSTN_CSS
Phones CSS: Phone_CSS

Make a new partition: Block_Partition
Add this new Partition to the Gateway CSS

I.e: PSTN_CSS---- Block_Partition

Make a Translation Pattern: 0431183951
Put in the Partition Block_Partition
Choose the "Block This pattern" option.

Restart all the devices.

Explanation:

Call comes into the gateway with Calling Info: 0431183951 The TP are searched first, the gateway see that the Block_Partition is the PSTN_CSS, so will send the call to TP. The TP matches the number, then blocks the calls. But if some
other number comes in, the TP will not match and route the call.

But because most of times outgoing calls to 0431183951 should be allowed, we are not adding the phone partition to the TP and also not adding the Block_partition to Phone_CSS.


================================================================

Method 2: (If method 1 not working properly)

starting from callmanager 4.0 or above, our development introduced a new feature Malicious Call Identification.

Malicious Call Identification :

http://www.cisco.com/en/US/products/sw/voicesw/ps556/products_administration_guide_chapter09186a00801ed117.html

When the MCID feature is used, the following actions take place:

1. The user receives a threatening call and presses the Malicious Call softkey (or enters the feature code *39).

2. Cisco CallManager sends the user a confirmation tone if the device can play a tone—and a text message on a phone that has a display—to acknowledge receiving the MCID notification.

3. Cisco CallManager updates the CDR for the call with an indication that the call is registered as a malicious call.

4. Cisco CallManager generates the alarm and event log entry that has the event information.

5. Cisco CallManager sends a MCID invocation through the facility message to the connected network. The facility information element (IE) encodes the MCID invocation.

6. After receiving this notification, the PSTN or other connected network can take actions, such as providing legal authorities with the call information.

Hope it helps,if it doesn't work then you need to call the service provider (Telco) to block that specific incoming number.

SNR configuration (Single Number Reach)


ephone-template  2
 softkeys idle  Newcall Redial Cfwdall Pickup Mobility Dnd
 softkeys seized  Pickup Endcall Cfwdall Callback
 softkeys connected  Hold Endcall Trnsfer Mobility Confrn Park
 keep-conference local-only

ephone-dn  39  dual-line
 number 8003
 description 498888920
 name Reunion  R3
 mobility
 snr 9010 delay 2 timeout 25
 allow watch
 call-forward noan 9008 timeout 5


ephone  9
 ephone-template 2
 type 7961
 button  1:39

Debug collection in buffer of router



#### Enable Logging #######


config terminal
service timestamps debug datetime msec localtime
service timestamps log datetime msec localtime
service sequence-numbers
logging console
logging buffer 10000000 debug
end


#### Disable Logging #######

config terminal
no service timestamps debug datetime msec localtime
no service timestamps log datetime msec localtime
no service sequence-numbers
no logging console
no logging buffer 10000000 debug
end

ATA Upgrade instructions for Executable file


1) Save the zipped file to your desktop.
2) Extract the files to the following directory C:\ATA
3) Then do the following:

C:\ATA>ping 10.1.1.2 (the ip address of the ATA)

Then:...

C:\ATA>dir
 Volume in drive C has no label.
 Volume Serial Number is 5056-F47A

 Directory of C:\ATA

10/15/2002  04:35p      <DIR>          .
10/15/2002  04:35p      <DIR>          ..
10/15/2002  04:35p                   0 8000.log
07/26/2001  08:07p              47,616 ata186us.exe
07/03/2001  06:10p               3,543 ata186us.txt
10/03/2002  03:15a               1,465 ata18x-v2-15-020927a-contents.txt
05/21/2002  03:17p              60,260 ata18x-v2-15-020927a-elang.kup
09/27/2002  03:17p             309,833 ata18x-v2-15-020927a.zup  < (This is the file we will input below.)
05/10/2001  02:41p               4,121 atapost.pl                |
05/10/2001  03:40p               1,193 atapost.txt               |
07/24/2002  11:14a              33,693 cfgfmt.c                  |
07/24/2002  11:14a              61,440 cfgfmt.exe                ^
03/18/2002  05:18p                 902 cptones.txt               |
09/06/2002  05:10p              39,909 example_uprofile.txt      |
09/12/2002  11:10a               6,819 h323-us-default.html      |
11/29/2000  12:35p              32,768 prserv.exe                |
03/08/2001  01:38p               2,085 prserv.txt                |
08/12/2002  06:03p               2,810 ptag.dat                  |
05/14/2002  07:04p                 139 release_notes.txt         |
09/12/2002  11:11a               6,818 sip-us-default.html       ^
05/22/2001  05:38p             274,436 transition.zup            |
01/16/2002  05:14p                 389 UPGRADE_NOTICE.txt        |
09/11/2002  02:55p                  57 users_guide_url.txt       |
12/03/2001  03:06p              32,256 zupinfo.exe               |
12/04/2001  10:44a                 489 zupinfo.txt               ^
              23 File(s)        923,041 bytes                    |
               2 Dir(s)  11,775,772,672 bytes free               |
                                                                 |
       (Exe file) (detailed description level)                   |
           ^            ^                                        |
           |            |                                |       ^
C:\ATA>sata186us -any2 -d2 ata18x-v2-15-020927a.zup ->------------|
Using Host: alali with IP : 172.30.114.222 as upgrade server
This machine IP: 172.30.114.222
Upgrade Server Port: 8000
Data stream 0 port: 8500
image found: code -- ata186.itsp2.v2.15
Number of 1024 blocks: 303

------------------------------------------------------------------
ENSURE TO HAVE THE PHONE PLUGGED IN TO THE FIRST PORT OF THE ATA
------------------------------------------------------------------

Using dialpad of your telephone (attached to your ATA box),
press red button to go to main menu, and enter:

        100#172*30*114*222*8000#        (to upgrade code)   ------> input this line into the phone conn. to the ATA exactly!

NOTE:
Pressing 123# will announce your code's version number.
You can later verify that you have upgraded your ATA box.

-------------------------------------------

This program runs continuously; Press <ctrl>-c to abort.
Upgrade server ready...

When the ATA is done upgrading the software, you will receive a voice message stating this. The ATA will reset itself,
there is "NO" need to power off.

Monday, February 7, 2011

PCM capture collection procedure


Procedure:
===========
1) Add to config:
- conf t
- voice hpi capture destination flash:pcm.dat
- voice hpi capture buffer 5000000

2) Then check which port the calls are active: (in enable mode)
- sh voice call summary
- show voice call status

            OR
- You can make the call go through from one channel

3) Start a capture on this port - please use:
(replace 1/0/0.1 with your channel and port found above)

- test voice port 0/0/0:15.1 pcm-dump caplog 7
(assuming you are on Pri 0/0/0:15 and the 1st b channel)

4) To stop the capture, please use:
- test voice port 0/0/0:15.1 pcm-dump disable

5) To reconcile the buffer and copy the PCM to the flash:
- no voice hpi capture destination flash:pcm.dat

6) Check you have the file in the flash:
- sh flash

Ensure you have a file listed called 'pcm.dat' with some size other than zero.
- (4 41096 pcm.dat) - for example.

7) Remove the buffer when the test is finished as it uses up DRAM
- conf t
- no voice hpi capture buffer 5000000