Outbound Tcl Script Problem

Version 1
    This document was generated from CDN thread

    Created by: SENOL KARAHASAN on 17-08-2011 11:14:07 AM
    Hi all
    We need to collect dnis information of the calls which goes out from a specific dial-peer. To do this, we wrote a tcl script and used it on the router as a service which is attached to a pots dial-peer on out-bound direction. Basicly, script makes an http request when a call hits to dial-peer.
    The problem is, when we use the service on the pots dial-peer on out-bound direction, we are unable to make the calls using that dial-peer and the calls drop. Also, when we look at the log created by "debug voice dialpeer all", we see that there's a loop on the call because the router always looks for a suitible dial-peer to send the call to PSTN and et the end it says "No Match" on the dial peer debug.
    Also, I've read about a problem with using an outbound script with the same dial-peer in outgoing direction in one of the topics. As a result, we
    decided to make a manipulation on the dnis parameter and make the call to go out from another dial-peer. In this scenario, the script works and also call can go out from the other dial-peer (that we made the call to match by maniulating dnis) with no problem.
    My question is, can we go out from a pots dial-peer and use a tcl script from the same dial-peer without entering a loop? Is it possible to use the script on the dial-peer that we plan to use on the outgoing leg of an outbound call? The loop problem that we faced is a bug of Cisco routers or this is a normal state?

    Subject: RE: Outbound Tcl Script Problem
    Replied by: Yaw-Ming Chen on 17-08-2011 11:51:50 AM
    If the call is going out of that outbound dialpeer with the same destination number as coming it, it will come back to again.
    I think you are doing the right way to make the call out. I don't see a way we can have a call coming in a outbound dialpeer to trigger Tcl (without modified DNIS) and go out directly.
    As you can see it programming guide there is not thing mentioned about place Tcl application in outbound dialpeer. It's always recommended place application in inbound dialpeer if it is possible.

    Thanks !

    Subject: RE: Outbound Tcl Script Problem
    Replied by: SENOL KARAHASAN on 18-08-2011 06:55:40 AM
    Hi Yaw-Ming

    Thanks for your quick reply.. It seems to be like that.. We are going to add a prefix to make the call to go out from another dial-peer..

    When completed, I will share the sample tcl script in order to help people who look for some information on this issue..