[Freeswitch-users] Drop A leg and originate a B-leg

Joel Serrano joel at textplus.com
Sun Jun 28 00:43:56 UTC 2020


Out of curiosity, what is the total duration of the python stuff you
execute? Could it be that although your are rejecting the call, the channel
itself is not destroyed until the python finishes?

I assume you need to play around with the bgapi, so you can launch your
“second call” independently and end (destroy) your “initial call” as soon
as possible..

 I’m blindly guessing here though haha :-)

Joel.

On Sat, Jun 27, 2020 at 15:16 David Villasmil <
david.villasmil.work at gmail.com> wrote:

> Hello Joel,
>
> What I do is receive the INVITE which triggers a python. In this python I
> indeed do an originate transferring to the appropriate extension which does
> what needs to be done.
>
> My question was more about how to I.e.: reject the I coming INVITE but
> continue the python execution.
>
> I’m now doing it but the rejection for some reason doesn’t happen until
> about 10 seconds after the python starts executing (but I reject it in like
> the 3rd line code)
>
> It’s more academic, really. I don’t like that channel hanging around
> unnecessarily.
>
> David
>
> On Sat, 27 Jun 2020 at 21:04, Joel Serrano <joel at textplus.com> wrote:
>
>> Have you tried with bgapi originate?
>>
>> I used to do something similar... I can probably find a snippet in python
>> if you need it.
>>
>> Over time my project got too complicated and I ended up writing something
>> that used ESL... but it all started off just like you said.
>>
>> On Fri, Jun 26, 2020 at 3:04 PM David Villasmil <
>> david.villasmil.work at gmail.com> wrote:
>>
>>> Hello all,
>>>
>>> So right now I'm generating A simple INVITE, let's say from FS-G.
>>>
>>> On receiving the INVITE, FS launches a python script which should reject
>>> the incoming INVITE from G and start a new call B-leg.
>>>
>>> I already do this, but the FS-G leg keeps going and I would like to
>>> actually reject and hangup the FS-G leg.
>>>
>>> is this possible? Basically hangup the incoming call and keep the script
>>> running to create a new leg.
>>>
>>> Regards,
>>>
>>> David Villasmil
>>> email: david.villasmil.work at gmail.com
>>> phone: +34669448337
>>>
>> _________________________________________________________________________
>>>
>>> The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
>>> Enhance your FreeSWITCH install with disruptive priced SMS and PSTN
>>> services.
>>> Build your next product on our scalable cloud platform.
>>>
>>> Join our online community to chat in real time
>>> https://signalwire.community
>>>
>>> Professional FreeSWITCH Services
>>> sales at freeswitch.com
>>> https://freeswitch.com
>>>
>>> Official FreeSWITCH Sites
>>> https://freeswitch.com/oss
>>> https://freeswitch.org/confluence
>>> https://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
>>> https://freeswitch.com
>>
>> _________________________________________________________________________
>>
>> The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
>> Enhance your FreeSWITCH install with disruptive priced SMS and PSTN
>> services.
>> Build your next product on our scalable cloud platform.
>>
>> Join our online community to chat in real time
>> https://signalwire.community
>>
>> Professional FreeSWITCH Services
>> sales at freeswitch.com
>> https://freeswitch.com
>>
>> Official FreeSWITCH Sites
>> https://freeswitch.com/oss
>> https://freeswitch.org/confluence
>> https://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
>> https://freeswitch.com
>
> --
> Regards,
>
> David Villasmil
> email: david.villasmil.work at gmail.com
> phone: +34669448337
> _________________________________________________________________________
>
> The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
> Enhance your FreeSWITCH install with disruptive priced SMS and PSTN
> services.
> Build your next product on our scalable cloud platform.
>
> Join our online community to chat in real time
> https://signalwire.community
>
> Professional FreeSWITCH Services
> sales at freeswitch.com
> https://freeswitch.com
>
> Official FreeSWITCH Sites
> https://freeswitch.com/oss
> https://freeswitch.org/confluence
> https://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
> https://freeswitch.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20200627/c8144a5c/attachment-0001.html>


More information about the FreeSWITCH-users mailing list