Cisco CSIM (Call Simulation) – Hidden IOS Command

Posted: 5th December 2009 by Mark in Cisco

CSIM is an undocumented IOS command.  When configuring a router to act as a voice gateway it is possible to test outbound calls by originating calls from the router.  If the router is configured correctly then the far end number will ring and may be answered. Use the csim start dialstring hidden command to initiate simulated calls to whichever real-world E.164 number is desired. This allows you to determine whether you can properly go offhook from the router to the PSTN, send digits, and complete a call to the destination phone. You can modify the POTS dial-peer appropriately to account for long-distance access codes and other prefixed digits as necessary. In the example below, the POTS dial-peer can match on any string of digits starting with “9”, and all digits that follow the “9” are played out voice-port X/Y/Z.

dial-peer voice 1 pots
destination-pattern 9T
port 1/0:0

r1# csim start 918005551212

csim: called number = 18005551212, loop count = 1 ping count = 0

csim err csimDisconnected recvd DISC cid(28)

csim: loop = 1, failed = 1   csim: call attempted = 1, setup failed = 1, tone failed = 0

Despite the call working in this case CSIM will always display failed=1.  There is no real explanation for this.  CSIM can also be used with PRI, CAS, and if calls are not completing it is recommended to begin analyzing the call flow using debug commands. For example debug isdn q931 will show the Tx and Rx messages (including ISDN Cause Codes) between the local router and the far end TDM equipment.

Here are other examples of POTS dial-peers which reflect different ways to pass digits to the TDM network.

Any of these now sends the entire string “12345678” to the PBX:

!
dial-peer voice X pots
 destination-pattern 1234....
 port 1/0:0
 forward-digits all
!

or:

!
dial-peer voice X pots
 destination-pattern 1234....
 port 1/0:0
 no digit-strip
!

or:

!
dial-peer voice X pots
 destination-pattern 1234....
 port 1/0:0
 prefix 1234
!
  1. fem bank says:

    Hi Mark, thanks for al’ur blogs its been helpful. Pls am trying to build a homelab at a cost effective rate. Right now am still using the internetwork expert.
    am trying to get a 2811 and 2801 and 3550 Presently i have a 2600 and 1811. I will really appreciate if u can advise me on what to get to save cost. Thanks..

  2. R says:

    hey mark,
    i’m really glad to find such a blog, very helpful.

    i have a problem with AS5300 i’ve tried alot to configure E1 PRI, and it’s up, but when i make a CSIM keeps giving me error from show call history it’s a protocol error (111) any idea? when i do debug then csim no output !! unless the debug file goes somewhere else since i’m new in these stuff .. thanks

  3. Igors says:

    There is an interesting glitch with CSIM START. If you logged into the ISR using SSH, csim will fail with some fancy error message however if you use telnet or a local console, all works like a charm.

  4. benjamin says:

    hey, i am using sshv2, whn i use the csim start command this is what i got:

    GW_briana#csim start 89570
    csim err:csim_do_test invalid major major(16) minor(0)
    GW_briana#
    Apr 4 17:20:36.517: csim: called number = 89570, loop count = 1 ping count = 0

    Apr 4 17:20:36.517: csimSetupPeer peer type(1), destPat(89570), matched(1), target()
    Apr 4 17:20:36.517: //-1/xxxxxxxxxxxx/CCAPI/ccCallSetupRequest:
    Destination=, Calling IE Present=FALSE, Mode=0,
    Outgoing Dial-peer=1, Params=0x4BF0033C, Progress Indication=NULL(0)
    Apr 4 17:20:36.517: //-1/xxxxxxxxxxxx/CCAPI/ccCheckClipClir:
    In: Calling Number=(TON=Unknown, NPI=Unknown, Screening=Not Screened, Presentation=Allowed)

    etc………

    Can you helpme please ,, my email is fuertesbs@gmail.com

  5. […] Despite the call working in this case CSIM will always display failed=1.  There is no real explanat… […]

  6. Ryan says:

    @benjamin,

    For some reason csim will refuse to run over SSH.

    https://supportforums.cisco.com/thread/299206

    As a workaround on my network I have a loopback configured on each router that allows telnet to/from the loopback IP only (for security reasons).

    This means that I can connect SSH over the LAN/WAN, then just start a local telnet session for csim testing.

  7. Mert says:

    Hi All,

    for example I want to use telnet just for csim start / use ssh for privilage level 15. How can I do that?

  8. Cameron says:

    Hey Guys,

    Is there a way to set the outbound caller ID when using this command?

  9. Michael says:

    Our Cisco IP Phones, model 7941, are constantly calling through to each employee’s desk and “Test” is showing on the Caller ID. When you answer there is no sound at all and the call will remain active until you hang up. We really have no answers as to how or why this is happening. Any ideas?

  10. Ritesh Desai says:

    Hey sir,

    Thanks for sharing info. I read this command in C-Voice paperback and willing to test “csim start ….” command. I’ve doubt that… if call is succeed, how should I disconnect the call called to unknown party…?

    regards,
    Ritesh Desai

  11. Alessandro says:

    NOTE that csim start on SSH works if you give the command in the same line of the login command (at the end of the command).

  12. oscar says:

    hi,
    This question for Alessandro,
    Can you clarify how did you make csim start work over SSH?

    Thanks

  13. Alessandro says:

    For Oscar

    ssh -l user host “command”

    Was some time ago but i think it was something similar to this, basically giving the command csim start in the same login line