Hi All, I have posted here some months back regarding interfacing CISCO with FreeSWITCH. I have had basic success, however there is quite a lot of fine tuning to do which is beyond my general knowledge or what I can find via Google. Currently I can do the following: 1. Make a call from any phone to a specific phone number. This phone number ends up at the CISCO FXO card. This then redirects to a specific extension at the FreeSwitch box. The dialing plan then causes a managed C# .NET application to start playing. 2. In the other direction, I have a windows service that monitors a given database. If any alarm conditions occur it uses ESL and the “Originate” API call to create a connection to the CISCO. The CISCO is then configured to redirect the given number back through the FXO card via plain old telephone (POTS). So, I can successfully make incoming and outgoing connnections on demand. PROBLEMS: 1. Using ESL for outgoing call, I don’t know how to determine whether a) the phone on the far end was picked up, b) whether the phone on the far end just rang out c) whether it was busy. In all cases the IVR just starts playing right away even if I don’t even pick up the phone. (I THINK THAT HAS SOMETHING TO DO WITH CISCO CONFIG). It seems that FreeSwitch simply triggers the CISCO to make a call, but then has no ability to track progress and assumes a connection was made. How do I get POTS to talk to VOIP/SIP to talk to FreeSwitch? 2. Incoming calls simply come in as “Processing unknown <0000000000>->1024 in context public. The actual incoming phone number does not seem to be getting from the CISCO to the FreeSwitch box. 3. I have 2 lines. I was simply going to assign extension 1024 for line 1 and 1025 for line 2. But for outgoing calls from my managed code how can I use ESL to say: a. Is line 1 busy? Then use Line 2 else make call. b. Is line 2 busy? Then wait for next scan else make call. My Code in the outgoing service: ESLconnection eslConection = new ESLconnection(“x.x.x.x”, “8021”, “password”); If (eslConnection.Connected() == ESL_SUCCESS) { eslConnection.Api(“originate”, “sofia/internal/0” + phoneNumber + “@” + CISCO_IP + “ ‘&managed(xNetIVR)’”); // determine if call is ringing, busy or picked up here // no idea how to do that… } Relevant CISCO config: version 12.4 ! ! ! voice service pots fax rate disable ! voice service voip allow-connections h323 to h323 allow-connections h323 to sip allow-connections sip to h323 allow-connections sip to sip no supplementary-service h450.2 no supplementary-service h450.3 supplementary-service h450.12 no supplementary-service sip moved-temporarily no supplementary-service sip refer fax protocol cisco sip registrar server expires max 3600 min 3600 no update-callerid no call service stop ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! voice register global mode cme source-address <CISCO IP> port 5060 max-dn 10 max-pool 10 authenticate register hold-alert tftp-path flash: ! ! ! voice-card 0 dsp services dspfarm ! ! ! voice-port 0/3/0 output attenuation -3 no comfort-noise cptone AU connection plar opx 1024 impedance complex1 caller-id enable ! voice-port 0/3/1 ! voice-port 0/3/2 ! voice-port 0/3/3 ! ! ! ! ! dial-peer voice 10 pots incoming called-number .T no digit-strip direct-inward-dial port 0/3/0 forward-digits all ! dial-peer voice 100 pots preference 1 destination-pattern 0T no digit-strip port 0/3/0 forward-digits all ! dial-peer voice 1 voip destination-pattern 1024 session protocol sipv2 session target ipv4:<FreeSwitch IP> session transport tcp dtmf-relay rtp-nte codec g711alaw no vad ! ! sip-ua presence enable ! ! Relevant FreeSwitch config: conf\dialplan\public\00_xNetIVR.xml and conf\dialplan\default\00_xNetIVR.xml: <include> <extension name="testapp"> <condition field="destination_number" expression="^(1024)"> <action application="managed" data="xNetIVR"/> </condition> </extension> </include> conf\directory\default\1024.xml <include> <user id="1024"> <params> <param name="password" value="xxxx"/> </params> <variables> <variable name="toll_allow" value="domestic,international,local"/> <variable name="accountcode" value="1024"/> <variable name="user_context" value="default"/> <variable name="effective_caller_id_name" value="Extension 1024"/> <variable name="effective_caller_id_number" value="1024"/> <variable name="outbound_caller_id_name" value="$${outbound_caller_name}"/> <variable name="outbound_caller_id_number" value="$${outbound_caller_id}"/> </variables> </user> </include> Public.xml and default.xml dial plans are basically the same as default installation. Cheers, Oliver Schenk
participants (1)
-
Oliver Schenk