[Freeswitch-users] Freeswitch in an existing phone network

David Ponzone david.ponzone at gmail.com
Thu Jun 10 06:29:46 PDT 2010


Oliver,

those IPs, as you probably noticed, are all RFC1918.
By default, FS will do some automatic NAT detection when a device's IP  
is a private one.

David Ponzone  Direction Technique
email: david.ponzone at ipeva.fr
tel:      01 74 03 18 97
gsm:   06 66 98 76 34

Service Client IPeva
tel:      0811 46 26 26
www.ipeva.fr  -   www.ipeva-studio.com

Ce message et toutes les pièces jointes sont confidentiels et établis  
à l'intention exclusive de ses destinataires. Toute utilisation ou  
diffusion non autorisée est interdite. Tout message électronique est  
susceptible d'altération. IPeva décline toute responsabilité au  
titre de ce message s'il a été altéré, déformé ou falsifié. Si  
vous n'êtes pas destinataire de ce message, merci de le détruire  
immédiatement et d'avertir l'expéditeur.




Le 10/06/2010 à 15:19, Oliver Schenk a écrit :

> Just some more info regarding managed C# and ESL. This is what I did:
>
> Put the following line in modules.conf.xml:
>
> <load module="mod_managed"/>
>
> I also checked that the module is in the mod folder.
>
>
>
> I then started Freeswitch from cmd in windows using "Freeswitch.exe - 
> nonat".
>
> There are no errors while it boots. I do however get all sorts of
> strange IP addresses. My own LAN is a 10.1.1.* network, but I also get
> IP addresses like:
>
> 2010-06-10 21:00:05.530374 [NOTICE] switch_utils.c:195 Adding
> 172.16.0.0/12 (deny) [] to list wan.auto
> 2010-06-10 21:00:05.530374 [NOTICE] switch_utils.c:195 Adding
> 192.168.0.0/16 (deny) [] to list wan.auto
> 2010-06-10 21:00:05.530374 [NOTICE] switch_core.c:970 Created ip list
> nat.auto default (deny)
> 2010-06-10 21:00:05.530374 [NOTICE] switch_core.c:972 Adding
> 10.1.1.4/255.255.255.0 (deny) to list nat.auto
> 2010-06-10 21:00:05.530374 [NOTICE] switch_utils.c:195 Adding  
> 10.0.0.0/8
> (allow) [] to list nat.auto
> 2010-06-10 21:00:05.530374 [NOTICE] switch_utils.c:195 Adding
> 172.16.0.0/12 (allow) [] to list nat.auto
> 2010-06-10 21:00:05.531374 [NOTICE] switch_utils.c:195 Adding
> 192.168.0.0/16 (allow) [] to list nat.auto
> 2010-06-10 21:00:05.531374 [NOTICE] switch_core.c:981 Created ip list
> loopback.auto default (deny)
> 2010-06-10 21:00:05.531374 [NOTICE] switch_utils.c:195 Adding
> 127.0.0.0/8 (allow) [] to list loopback.auto
> 2010-06-10 21:00:05.531374 [NOTICE] switch_core.c:987 Created ip list
> localnet.auto default (deny)
> 2010-06-10 21:00:05.531374 [NOTICE] switch_core.c:990 Adding
> 10.1.1.4/255.255.255.0 (allow) to list localnet.auto
> 2010-06-10 21:00:05.531374 [NOTICE] switch_utils.c:195 Adding
> 192.168.42.0/24 (deny) [] to list lan
> 2010-06-10 21:00:05.531374 [NOTICE] switch_core.c:1086 Adding
> 192.168.42.0/24 (deny) to list lan
> 2010-06-10 21:00:05.531374 [NOTICE] switch_utils.c:195 Adding
> 192.168.42.42/32 (allow) [] to list lan
> 2010-06-10 21:00:05.531374 [NOTICE] switch_core.c:1086 Adding
> 192.168.42.42/32 (allow) to list lan
> 2010-06-10 21:00:05.531374 [NOTICE] switch_utils.c:195 Adding
> 192.0.2.0/24 (allow) [brian at templar.ath.cx] to list domains
>
> Where do all those IP addresses come from? Why are they there?
>
>
> Ok, next thing I did was open up VS2008 and opened up
> freeswitch-1.0.6/libs/esl/managed/managed_esl.2008.sln. No problems
> there. I then hit compile and it worked without any errors. I had the
> following uncommented:
>
> ThreadPool.QueueUserWorkItem(new WaitCallback(InboundMode));
> //ThreadPool.QueueUserWorkItem(new WaitCallback(OutboundModeSync));
> //ThreadPool.QueueUserWorkItem(new WaitCallback(OutboundModeAsync));
>
>
>
> I then hit run and got the following error:
>
> An unhandled exception of type 'System.TypeInitializationException'
> occurred in ManagedEsl.dll
> Additional information: The type initializer for 'ESLPINVOKE' threw an
> exception.
>
>
> It breaks here:
>
> public ESLconnection(string host, string port, string password) :
> this(ESLPINVOKE.new_ESLconnection__SWIG_1(host, port, password),  
> true) {
>   }
>
>
> Output:
> A first chance exception of type 'System.BadImageFormatException'
> occurred in ManagedEsl.dll
> A first chance exception of type 'System.TypeInitializationException'
> occurred in ManagedEsl.dll
> A first chance exception of type 'System.TypeInitializationException'
> occurred in ManagedEsl.dll
> An unhandled exception of type 'System.TypeInitializationException'
> occurred in ManagedEsl.dll
>
> Additional information: The type initializer for 'ESLPINVOKE' threw an
> exception.
>
>
> Unfortunately I have no idea how to fix it!
>
>
> Thanks,
>
> Oliver Schenk
>
>
>
>
>
> On 10/06/2010 8:48 PM, Oliver Schenk wrote:
>> Hi,
>>
>> Thanks for everyone's reply. Great help. I have a basic IVR going  
>> when I
>> dial a given extension.
>>
>> I have managed to clean out most of FreeSWITCH config and I've even
>> written a little javascript file to which my call gets redirected  
>> to and
>> it just says a small phrase using flite. I'm looking at buying more
>> professional TTS voices such as Cebstral or Ivona. I'm hosting my
>> freeswitch server in a Virtual Box instance running on Ubuntu Server
>> 10.04. I do my testing from X-Lite running on the host computer.
>>
>> Anyway, that said, I think we will have to stick with Windows  
>> because:
>> 1) Our existing railway SCADA server will be windows based.
>> 2) The SCADA libraries are .NET based.
>> 3) I don't want to have separate hardware just to run linux.
>> 4) Our company isn't too good at supporting linux.
>>
>>
>> My problem now is to try to somehow trigger freeswitch to make an
>> outgoing call on demand...
>>
>>
>> The flow of my logic is:
>>
>> 1) A critical alarm occurs on our SCADA system.
>> 2) FreeSWITCH should be triggered to make an outgoing call.
>> 3) Use a pre-recorded WAV or use TTS to tell the callee what the  
>> alarm is.
>>
>>
>> The problem:
>>
>> I don't know how to "tell" freeswitch that it needs to make a call  
>> and
>> maybe even pass some parameters. Given I have C# and SQL at my  
>> disposal,
>> what should I use? A freeswitch javascript program that runs in an
>> infinite loop and constantly scans for new alarms in a database? In  
>> the
>> registry? In a folder using files? Using a http request? command  
>> line?
>>
>> In other words, how do I trigger a freeswitch javascript program  
>> externally?
>>
>>
>> (By the way I tried to use the "managed" module that comes with
>> freeswitch, but it just throws exceptions left right and center
>> TypeInitializationException)...
>>
>> Anyone have some experience?
>>
>>
>> Thanks,
>>
>> Oliver Schenk
>>
>>
>> On 9/06/2010 10:43 PM, Tim St. Pierre wrote:
>>
>>> Hi Oliver,
>>>
>>> FreeSwitch will do whatever you tell it to do and no more.
>>>
>>> Here's a few suggestions though -
>>>
>>> Empty out the default dialplan directory.  Don't throw those away,  
>>> as you may want to reference them
>>> as examples, but move them somewhere else.
>>>
>>> Edit modules.conf.xml and comment or remove any modules that you  
>>> don't need.  This will also save
>>> memory and other resources.
>>>
>>> You can also disable all the SIP profiles except one.  Pick one  
>>> that makes sense (either Internal or
>>> External, it doesn't really matter that much), and edit it so that  
>>> it makes sense with respect to
>>> your network.  What is your topology?  Will you just be setting  
>>> freeswitch up with a static IP
>>> address and having calls sent to it by the main PBX?  If that's  
>>> the case, you can disable a lot of
>>> the STUN and uPNP functionality.  Tell this profile to bind to the  
>>> IP and port that the PBX will
>>> send the calls to.
>>>
>>> Then all you have to do, is create a very simple dialplan that  
>>> will answer an incoming call and
>>> perform whatever task you want.  You would essentially be starting  
>>> with a blank sheet, adding just
>>> the functions that you want.
>>>
>>> Hope that makes sense.
>>>
>>> -Tim
>>>
>>> Oliver Schenk wrote:
>>>
>>>
>>>> Hi All,
>>>>
>>>> The company I work for currently has quite an extensive phone  
>>>> network
>>>> which gets carried between old analogue PABXes which also has an
>>>> interface to IP based phones. All the phones in our office are  
>>>> connected
>>>> via CAT5 cable using IP, however literally hundreds of phones out  
>>>> in the
>>>> field (we operate railway infrastructure) are on standard voice  
>>>> analogue
>>>> phones carried through fibreoptics.
>>>>
>>>> Anyway, I would like to use Freeswitch purely for its IVR and TTS
>>>> abilities and nothing else. So basically I just need it to act  
>>>> like a
>>>> slave to whatever IP phone network is already out there. I'm a bit
>>>> worried if I fire up freeswitch it will hijack the phone network!
>>>>
>>>> All our phones are accessible via a 5 digit extension. I would like
>>>> Freeswitch to be behind one of those ... say 12345. If anyone  
>>>> within our
>>>> phone network dials 12345 then Freeswitch should answer. I guess my
>>>> question is...how should I go about disabling most of FreeSwitch  
>>>> except
>>>> it's ability to pick up the phone and speak IVR/TTS and make an  
>>>> outgoing
>>>> call via the existing phone network?
>>>>
>>>> Any general pointers appreciated.
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Oliver Schenk
>>>>
>>>> _______________________________________________
>>>> FreeSWITCH-users mailing list
>>>> FreeSWITCH-users at lists.freeswitch.org
>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>>> http://www.freeswitch.org
>>>>
>>>>
>>> _______________________________________________
>>> FreeSWITCH-users mailing list
>>> FreeSWITCH-users at lists.freeswitch.org
>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>> http://www.freeswitch.org
>>>
>>>
>> _______________________________________________
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100610/51f732a0/attachment-0001.html 


More information about the FreeSWITCH-users mailing list