[Freeswitch-users] esl dialer

Guillermo Ruiz Camauer grcamauer at gmail.com
Wed Oct 9 03:14:03 MSD 2013


Are you writing a Dialer or an IVR?  A Dialer doesn't really need to answer
calls.  You can always have one program (or thread) with an inbound socket
and another with an outbound socket.

Guillermo


On Tue, Oct 8, 2013 at 3:30 PM, Marcin S <ms4esl at gmail.com> wrote:

> I was considering this approach, however I don't know how to detect and
> answer a call in "socket inboud" esl mode.
>
>
> 2013/10/8 Guillermo Ruiz Camauer <grcamauer at gmail.com>
>
>> I handle all ESL communications from just one thread which receives and
>> processes or generates all events and commands.  I do have a timer for each
>> call which I use for certain timeouts (user inputs and ring time).
>>
>> Guillermo
>>
>>
>> On Tue, Oct 8, 2013 at 4:20 AM, Marcin S <ms4esl at gmail.com> wrote:
>>
>>> Ok, I will try this approach. Am I right, that in order to handle
>>> oubound calls similiar to inbound, I will have to spawn new thread for each
>>> call?
>>>
>>>
>>> 2013/10/5 Guillermo Ruiz Camauer <grcamauer at gmail.com>
>>>
>>>> I have a Dialer that uses ESL from C, but I make an inbound connection
>>>> to Freeswitch.  It is a socket which I keep open permanently.
>>>> I recommend reading chapter 4 of the FreeSwitch Cookbook.
>>>>
>>>> Guillermo
>>>>
>>>>
>>>> On Fri, Oct 4, 2013 at 5:09 AM, Marcin S <ms4esl at gmail.com> wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> I'm trying to switch from dialogic api to freeswitch/esl. Dealing with
>>>>> inbound calls is easy (using esl outbound socket), however i have some
>>>>> problems with outbound calls.
>>>>> My application is written in C. I create a handle to esl
>>>>> (esl_connect), then issue "bgapi originate ... &socket(127.0.0.1:8084async full)" in order to handle this connection just like inbound call. So
>>>>> far so good.
>>>>>  Here come the problems:
>>>>>
>>>>> 1. esl creates new thread for my call - thats ok, it was expected -
>>>>> but I do not receive any events on this new handle...
>>>>>
>>>>> 2. esl_events fails - here is some strace output:
>>>>>
>>>>> [pid 31588] send(5, "filter unique-id
>>>>> a88f1268-2c28-11e3-befa-311d1641c437\n\n", 55, 0) = 55
>>>>> [pid 31588] recv(5, "Content-Type: command/reply\nReply-Text: +OK
>>>>> filter added. [unique-id]=[a88f1268-2c28-11e3-befa-311d1641c437]\n\n",
>>>>> 65535, 0) = 110
>>>>> [pid 31588] send(5, "event plain ALL\n\n", 17, 0) = 17
>>>>> [pid 31588] recv(5, "Content-Type: command/reply\nReply-Text: -ERR
>>>>> command not found\n\n", 65535, 0) = 64
>>>>> [pid 31588] send(5, "linger", 6, 0)     = 6
>>>>> [pid 31588] send(5, "\n\n", 2, 0)       = 2
>>>>> [pid 31588] recv(5, "Content-Type: command/reply\nReply-Text: -ERR
>>>>> command not found\n\n", 65535, 0) = 64
>>>>>
>>>>> 3. how can i distinguish, whether this call is successfull or not?
>>>>>
>>>>> What am I doing wrong?
>>>>>
>>>>>
>>>>> _________________________________________________________________________
>>>>> Professional FreeSWITCH Consulting Services:
>>>>> consulting at freeswitch.org
>>>>> http://www.freeswitchsolutions.com
>>>>>
>>>>> 
>>>>> 
>>>>>
>>>>> Official FreeSWITCH Sites
>>>>> http://www.freeswitch.org
>>>>> http://wiki.freeswitch.org
>>>>> http://www.cluecon.com
>>>>>
>>>>> 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
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Guillermo Ruiz Camauer
>>>>
>>>>
>>>> _________________________________________________________________________
>>>> Professional FreeSWITCH Consulting Services:
>>>> consulting at freeswitch.org
>>>> http://www.freeswitchsolutions.com
>>>>
>>>> 
>>>> 
>>>>
>>>> Official FreeSWITCH Sites
>>>> http://www.freeswitch.org
>>>> http://wiki.freeswitch.org
>>>> http://www.cluecon.com
>>>>
>>>> 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
>>>>
>>>>
>>>
>>> _________________________________________________________________________
>>> Professional FreeSWITCH Consulting Services:
>>> consulting at freeswitch.org
>>> http://www.freeswitchsolutions.com
>>>
>>> 
>>> 
>>>
>>> Official FreeSWITCH Sites
>>> http://www.freeswitch.org
>>> http://wiki.freeswitch.org
>>> http://www.cluecon.com
>>>
>>> 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
>>>
>>>
>>
>>
>> --
>> Guillermo Ruiz Camauer
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> 
>> 
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://wiki.freeswitch.org
>> http://www.cluecon.com
>>
>> 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
>>
>>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> 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
>
>


-- 
Guillermo Ruiz Camauer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20131008/8b42cd9f/attachment.html 


Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users mailing list