Checking call is connected while bridged in lua

classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|

Checking call is connected while bridged in lua

David Villasmil
Hello Guys,

I've had this "problem" since forever :) (I've been a freeswitch user for a long time)

I'm using lua and I want to bridge a call and to check immediately whether the call is connected or not WHILE connected. lua execution continues only after "bridge" has returned something.. connected, busy, whatever... But i would like check the status of the call immediately after executing the bridge... 

Is this possible WITHOUT esl?


Thanks!

David

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Reply | Threaded
Open this post in threaded view
|

Re: Checking call is connected while bridged in lua

David Villasmil
Any help on this, guys? :D

David

On Friday, September 20, 2013, David Villasmil wrote:
Hello Guys,

I've had this "problem" since forever :) (I've been a freeswitch user for a long time)

I'm using lua and I want to bridge a call and to check immediately whether the call is connected or not WHILE connected. lua execution continues only after "bridge" has returned something.. connected, busy, whatever... But i would like check the status of the call immediately after executing the bridge... 

Is this possible WITHOUT esl?


Thanks!

David

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Reply | Threaded
Open this post in threaded view
|

Re: Checking call is connected while bridged in lua

Brian West
This is well documented on the wiki.  ;)

http://wiki.freeswitch.org/wiki/Mod_lua#session:bridged
http://wiki.freeswitch.org/wiki/Mod_lua#session:ready


/b

On Sep 22, 2013, at 12:59 AM, David Villasmil <[hidden email]> wrote:

> Any help on this, guys? :D
>
> David
>
> On Friday, September 20, 2013, David Villasmil wrote:
> Hello Guys,
>
> I've had this "problem" since forever :) (I've been a freeswitch user for a long time)
>
> I'm using lua and I want to bridge a call and to check immediately whether the call is connected or not WHILE connected. lua execution continues only after "bridge" has returned something.. connected, busy, whatever... But i would like check the status of the call immediately after executing the bridge...
>
> Is this possible WITHOUT esl?
>
>
> Thanks!
>
> David
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> [hidden email]
> http://www.freeswitchsolutions.com
>
> FreeSWITCH-powered IP PBX: The CudaTel Communication Server
> http://www.cudatel.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> [hidden email]
> 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:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

signature.asc (858 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Checking call is connected while bridged in lua

David Villasmil
Thanks for replying Brian,

But as far as I remember, the execution of the script would only continue "after" the "bridge" finished (with answer, busy, whatever)... if so, I can't check the status on the bridge WHILE the bridge is ongoing... is this right?

Thanks


On Mon, Sep 23, 2013 at 2:15 AM, Brian West <[hidden email]> wrote:
This is well documented on the wiki.  ;)

http://wiki.freeswitch.org/wiki/Mod_lua#session:bridged
http://wiki.freeswitch.org/wiki/Mod_lua#session:ready


/b

On Sep 22, 2013, at 12:59 AM, David Villasmil <[hidden email]> wrote:

> Any help on this, guys? :D
>
> David
>
> On Friday, September 20, 2013, David Villasmil wrote:
> Hello Guys,
>
> I've had this "problem" since forever :) (I've been a freeswitch user for a long time)
>
> I'm using lua and I want to bridge a call and to check immediately whether the call is connected or not WHILE connected. lua execution continues only after "bridge" has returned something.. connected, busy, whatever... But i would like check the status of the call immediately after executing the bridge...
>
> Is this possible WITHOUT esl?
>
>
> Thanks!
>
> David
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> [hidden email]
> http://www.freeswitchsolutions.com
>
> FreeSWITCH-powered IP PBX: The CudaTel Communication Server
> http://www.cudatel.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> [hidden email]
> 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:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
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:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Reply | Threaded
Open this post in threaded view
|

Re: Checking call is connected while bridged in lua

Brian West
What exactly are you trying to accomplish?

On Sep 22, 2013, at 8:18 PM, David Villasmil <[hidden email]> wrote:

> Thanks for replying Brian,
>
> But as far as I remember, the execution of the script would only continue "after" the "bridge" finished (with answer, busy, whatever)... if so, I can't check the status on the bridge WHILE the bridge is ongoing... is this right?
>
> Thanks



--
Brian West
[hidden email]
FreeSWITCH Solutions, LLC
PO BOX PO BOX 2531
Brookfield, WI 53008-2531
Twitter: @FreeSWITCH_Wire , @briankwest
http://www.freeswitchbook.com
http://www.freeswitchcookbook.com

T: +1.918.420.9001  |  F: +1.918.420.9002  |  M: +1.918.424.WEST
iNUM: +883 5100 1420 9001
ISN: 410*543
Skype:briankwest
PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED)












_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

signature.asc (858 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Checking call is connected while bridged in lua

David Villasmil
Hello Brian,

I'm receiving a call on one side and bridging it to the B side. But when the calls is answered on the B-side I need to actually check the B-side is the intended terminating party, so I´m adding a sip header and the receiving party is storing the header in a db that I check... 

I'm not sure if i'm clear enough...

thanks!

David


On Mon, Sep 23, 2013 at 2:59 PM, Brian West <[hidden email]> wrote:
What exactly are you trying to accomplish?

On Sep 22, 2013, at 8:18 PM, David Villasmil <[hidden email]> wrote:

> Thanks for replying Brian,
>
> But as far as I remember, the execution of the script would only continue "after" the "bridge" finished (with answer, busy, whatever)... if so, I can't check the status on the bridge WHILE the bridge is ongoing... is this right?
>
> Thanks



--
Brian West
[hidden email]
FreeSWITCH Solutions, LLC
PO BOX PO BOX 2531
Brookfield, WI 53008-2531
Twitter: @FreeSWITCH_Wire , @briankwest
http://www.freeswitchbook.com
http://www.freeswitchcookbook.com

T: <a href="tel:%2B1.918.420.9001" value="+19184209001">+1.918.420.9001  |  F: <a href="tel:%2B1.918.420.9002" value="+19184209002">+1.918.420.9002  |  M: +1.918.424.WEST
iNUM: <a href="tel:%2B883%205100%201420%209001" value="+883510014209001">+883 5100 1420 9001
ISN: 410*543
Skype:briankwest
PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED)












_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
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:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Reply | Threaded
Open this post in threaded view
|

Re: Checking call is connected while bridged in lua

Steven Ayre
Combine lua with execute_on_answer perhaps.

Or create an outbound session and only bridge it to Aleg when answered (though then you'll need to generate your own ringback)



On Monday, September 23, 2013, David Villasmil wrote:
Hello Brian,

I'm receiving a call on one side and bridging it to the B side. But when the calls is answered on the B-side I need to actually check the B-side is the intended terminating party, so I´m adding a sip header and the receiving party is storing the header in a db that I check... 

I'm not sure if i'm clear enough...

thanks!

David


On Mon, Sep 23, 2013 at 2:59 PM, Brian West <<a href="javascript:_e({}, &#39;cvml&#39;, &#39;brian@freeswitch.org&#39;);" target="_blank">brian@...> wrote:
What exactly are you trying to accomplish?

On Sep 22, 2013, at 8:18 PM, David Villasmil <<a href="javascript:_e({}, &#39;cvml&#39;, &#39;david.villasmil.work@gmail.com&#39;);" target="_blank">david.villasmil.work@...> wrote:

> Thanks for replying Brian,
>
> But as far as I remember, the execution of the script would only continue "after" the "bridge" finished (with answer, busy, whatever)... if so, I can't check the status on the bridge WHILE the bridge is ongoing... is this right?
>
> Thanks



--
Brian West
<a href="javascript:_e({}, &#39;cvml&#39;, &#39;brian@freeswitch.org&#39;);" target="_blank">brian@...
FreeSWITCH Solutions, LLC
PO BOX PO BOX 2531
Brookfield, WI 53008-2531
Twitter: @FreeSWITCH_Wire , @briankwest
http://www.freeswitchbook.com
http://www.freeswitchcookbook.com

T: <a href="tel:%2B1.918.420.9001" value="+19184209001" target="_blank">+1.918.420.9001  |  F: <a href="tel:%2B1.918.420.9002" value="+19184209002" target="_blank">+1.918.420.9002  |  M: +1.918.424.WEST
iNUM: <a href="tel:%2B883%205100%201420%209001" value="+883510014209001" target="_blank">+883 5100 1420 9001
ISN: 410*543
Skype:briankwest
PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED)












_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
<a href="javascript:_e({}, &#39;cvml&#39;, &#39;consulting@freeswitch.org&#39;);" target="_blank">consulting@...
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
<a href="javascript:_e({}, &#39;cvml&#39;, &#39;FreeSWITCH-users@lists.freeswitch.org&#39;);" target="_blank">FreeSWITCH-users@...
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:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Reply | Threaded
Open this post in threaded view
|

Re: Checking call is connected while bridged in lua

Brian West
In reply to this post by David Villasmil
Maybe I'm missing the point but this feels like you're bypassing all the fun magical things FS does for you already in exchange for trying to micro manage the call flow in lua.

/b

On Sep 23, 2013, at 4:39 PM, David Villasmil <[hidden email]> wrote:

> Hello Brian,
>
> I'm receiving a call on one side and bridging it to the B side. But when the calls is answered on the B-side I need to actually check the B-side is the intended terminating party, so I´m adding a sip header and the receiving party is storing the header in a db that I check...
>
> I'm not sure if i'm clear enough...
>
> thanks!
>
> David
>

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

signature.asc (858 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Checking call is connected while bridged in lua

mercutioviz
I'm with Brian on this one. The bridge app is epic. So the question is this: what are you trying to accomplish with all this Lua stuff that you can't do with a simple bridge?

-MC


On Mon, Sep 23, 2013 at 6:15 PM, Brian West <[hidden email]> wrote:
Maybe I'm missing the point but this feels like you're bypassing all the fun magical things FS does for you already in exchange for trying to micro manage the call flow in lua.

/b

On Sep 23, 2013, at 4:39 PM, David Villasmil <[hidden email]> wrote:

> Hello Brian,
>
> I'm receiving a call on one side and bridging it to the B side. But when the calls is answered on the B-side I need to actually check the B-side is the intended terminating party, so I´m adding a sip header and the receiving party is storing the header in a db that I check...
>
> I'm not sure if i'm clear enough...
>
> thanks!
>
> David
>


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org




--
Michael S Collins
Twitter: @mercutioviz
http://www.FreeSWITCH.org
http://www.ClueCon.com
http://www.OSTAG.org


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Reply | Threaded
Open this post in threaded view
|

Re: Checking call is connected while bridged in lua

Brian West
Maybe if we understood more we could probably guide the end user in a better way to accomplish their goals!

/b

On Sep 24, 2013, at 9:46 AM, Michael Collins <[hidden email]> wrote:

> I'm with Brian on this one. The bridge app is epic. So the question is this: what are you trying to accomplish with all this Lua stuff that you can't do with a simple bridge?
>
> -MC
>


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

signature.asc (858 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Checking call is connected while bridged in lua

David Villasmil
Hello,

I don't think this is something FS can do. Let me explain:

We have FS-A and FS-B, between which are multiple SIP providers. We are checking that the providers between A and B don't divert calls to non-approved vendors. So what I'm doing is:

When relaying the call from FS-A to the provider, I'm adding a SIP header with a unique ID, which is inserted into a DB table. 
When FS-B receives the call, i retrieve the header ID and look it up in the table and mark it as answered.
On FS-A, when the call is answered, it looks up the ID and makes sure it has been marked as "answered" by FS-B.
If it is NOT marked, FS-A MUST disconnect the call.

I hope the explanation was clear, and if anyone has a better idea of how to do this, I'm all ears :)

Thanks

David



On Tue, Sep 24, 2013 at 5:12 PM, Brian West <[hidden email]> wrote:
Maybe if we understood more we could probably guide the end user in a better way to accomplish their goals!

/b

On Sep 24, 2013, at 9:46 AM, Michael Collins <[hidden email]> wrote:

> I'm with Brian on this one. The bridge app is epic. So the question is this: what are you trying to accomplish with all this Lua stuff that you can't do with a simple bridge?
>
> -MC
>


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
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:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Reply | Threaded
Open this post in threaded view
|

Re: Checking call is connected while bridged in lua

Ben Langfeld
Will TLS not solve the problem for you?


On 24 September 2013 19:33, David Villasmil <[hidden email]> wrote:
Hello,

I don't think this is something FS can do. Let me explain:

We have FS-A and FS-B, between which are multiple SIP providers. We are checking that the providers between A and B don't divert calls to non-approved vendors. So what I'm doing is:

When relaying the call from FS-A to the provider, I'm adding a SIP header with a unique ID, which is inserted into a DB table. 
When FS-B receives the call, i retrieve the header ID and look it up in the table and mark it as answered.
On FS-A, when the call is answered, it looks up the ID and makes sure it has been marked as "answered" by FS-B.
If it is NOT marked, FS-A MUST disconnect the call.

I hope the explanation was clear, and if anyone has a better idea of how to do this, I'm all ears :)

Thanks

David



On Tue, Sep 24, 2013 at 5:12 PM, Brian West <[hidden email]> wrote:
Maybe if we understood more we could probably guide the end user in a better way to accomplish their goals!

/b

On Sep 24, 2013, at 9:46 AM, Michael Collins <[hidden email]> wrote:

> I'm with Brian on this one. The bridge app is epic. So the question is this: what are you trying to accomplish with all this Lua stuff that you can't do with a simple bridge?
>
> -MC
>


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
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:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
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:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Reply | Threaded
Open this post in threaded view
|

Re: Checking call is connected while bridged in lua

John
In reply to this post by David Villasmil
This sounds like something very similar to RFC5898 (pre-connection testing) but I don't think it's implemented in sofia.

John

On 24/09/13 23:33, David Villasmil wrote:
Hello,

I don't think this is something FS can do. Let me explain:

We have FS-A and FS-B, between which are multiple SIP providers. We are checking that the providers between A and B don't divert calls to non-approved vendors. So what I'm doing is:

When relaying the call from FS-A to the provider, I'm adding a SIP header with a unique ID, which is inserted into a DB table. 
When FS-B receives the call, i retrieve the header ID and look it up in the table and mark it as answered.
On FS-A, when the call is answered, it looks up the ID and makes sure it has been marked as "answered" by FS-B.
If it is NOT marked, FS-A MUST disconnect the call.

I hope the explanation was clear, and if anyone has a better idea of how to do this, I'm all ears :)

Thanks

David



On Tue, Sep 24, 2013 at 5:12 PM, Brian West <[hidden email]> wrote:
Maybe if we understood more we could probably guide the end user in a better way to accomplish their goals!

/b

On Sep 24, 2013, at 9:46 AM, Michael Collins <[hidden email]> wrote:

> I'm with Brian on this one. The bridge app is epic. So the question is this: what are you trying to accomplish with all this Lua stuff that you can't do with a simple bridge?
>
> -MC
>


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
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:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
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:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Reply | Threaded
Open this post in threaded view
|

Re: Checking call is connected while bridged in lua

David Villasmil
In reply to this post by Ben Langfeld
Hello,

I don't think TLS will do... The providers in-between are not TLS... unless I don't grasp something about TLS, the whole stream must support TLS, correct?

David


On Wed, Sep 25, 2013 at 1:26 AM, Ben Langfeld <[hidden email]> wrote:
Will TLS not solve the problem for you?


On 24 September 2013 19:33, David Villasmil <[hidden email]> wrote:
Hello,

I don't think this is something FS can do. Let me explain:

We have FS-A and FS-B, between which are multiple SIP providers. We are checking that the providers between A and B don't divert calls to non-approved vendors. So what I'm doing is:

When relaying the call from FS-A to the provider, I'm adding a SIP header with a unique ID, which is inserted into a DB table. 
When FS-B receives the call, i retrieve the header ID and look it up in the table and mark it as answered.
On FS-A, when the call is answered, it looks up the ID and makes sure it has been marked as "answered" by FS-B.
If it is NOT marked, FS-A MUST disconnect the call.

I hope the explanation was clear, and if anyone has a better idea of how to do this, I'm all ears :)

Thanks

David



On Tue, Sep 24, 2013 at 5:12 PM, Brian West <[hidden email]> wrote:
Maybe if we understood more we could probably guide the end user in a better way to accomplish their goals!

/b

On Sep 24, 2013, at 9:46 AM, Michael Collins <[hidden email]> wrote:

> I'm with Brian on this one. The bridge app is epic. So the question is this: what are you trying to accomplish with all this Lua stuff that you can't do with a simple bridge?
>
> -MC
>


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
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:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
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:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
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:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Reply | Threaded
Open this post in threaded view
|

Re: Checking call is connected while bridged in lua

Brian West
In reply to this post by David Villasmil
You're working under the assumption that your custom headers are going to traverse your providers network and make it back to the second freeswitch... I don't think you can make that assumption.  I know if I were a provider all your custom headers would be nuked at the border in ingress to my network.

You're just trying to make sure that calls stay on the approved network routes.. not sure you can make sure that will always happen end to end if a route takes PSTN out and back in you've lost the ability to follow this... unless I'm totally off base here and missed the point.

/b

On Sep 24, 2013, at 5:33 PM, David Villasmil <[hidden email]> wrote:

> Hello,
>
> I don't think this is something FS can do. Let me explain:
>
> We have FS-A and FS-B, between which are multiple SIP providers. We are checking that the providers between A and B don't divert calls to non-approved vendors. So what I'm doing is:
>
> When relaying the call from FS-A to the provider, I'm adding a SIP header with a unique ID, which is inserted into a DB table.
> When FS-B receives the call, i retrieve the header ID and look it up in the table and mark it as answered.
> On FS-A, when the call is answered, it looks up the ID and makes sure it has been marked as "answered" by FS-B.
> If it is NOT marked, FS-A MUST disconnect the call.
>
> I hope the explanation was clear, and if anyone has a better idea of how to do this, I'm all ears :)
>
> Thanks
>
> David

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

signature.asc (858 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Checking call is connected while bridged in lua

David Villasmil
Hello Brian,

In general, you're totally right. But in my case I know the call will never go through PSTN. Also I've made tests about the header and The FS-B receives the header fine. 

So this works ok for me.

Thanks!

David


On Wed, Sep 25, 2013 at 4:07 PM, Brian West <[hidden email]> wrote:
You're working under the assumption that your custom headers are going to traverse your providers network and make it back to the second freeswitch... I don't think you can make that assumption.  I know if I were a provider all your custom headers would be nuked at the border in ingress to my network.

You're just trying to make sure that calls stay on the approved network routes.. not sure you can make sure that will always happen end to end if a route takes PSTN out and back in you've lost the ability to follow this... unless I'm totally off base here and missed the point.

/b

On Sep 24, 2013, at 5:33 PM, David Villasmil <[hidden email]> wrote:

> Hello,
>
> I don't think this is something FS can do. Let me explain:
>
> We have FS-A and FS-B, between which are multiple SIP providers. We are checking that the providers between A and B don't divert calls to non-approved vendors. So what I'm doing is:
>
> When relaying the call from FS-A to the provider, I'm adding a SIP header with a unique ID, which is inserted into a DB table.
> When FS-B receives the call, i retrieve the header ID and look it up in the table and mark it as answered.
> On FS-A, when the call is answered, it looks up the ID and makes sure it has been marked as "answered" by FS-B.
> If it is NOT marked, FS-A MUST disconnect the call.
>
> I hope the explanation was clear, and if anyone has a better idea of how to do this, I'm all ears :)
>
> Thanks
>
> David


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
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:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Reply | Threaded
Open this post in threaded view
|

Re: Checking call is connected while bridged in lua

Steven Ayre
Silly question perhaps, but if you own both FS-A and FS-B why are you bothering with providers at all - why not route directly between them?



On Thursday, September 26, 2013, David Villasmil wrote:
Hello Brian,

In general, you're totally right. But in my case I know the call will never go through PSTN. Also I've made tests about the header and The FS-B receives the header fine. 

So this works ok for me.

Thanks!

David


On Wed, Sep 25, 2013 at 4:07 PM, Brian West <<a href="javascript:_e({}, &#39;cvml&#39;, &#39;brian@freeswitch.org&#39;);" target="_blank">brian@...> wrote:
You're working under the assumption that your custom headers are going to traverse your providers network and make it back to the second freeswitch... I don't think you can make that assumption.  I know if I were a provider all your custom headers would be nuked at the border in ingress to my network.

You're just trying to make sure that calls stay on the approved network routes.. not sure you can make sure that will always happen end to end if a route takes PSTN out and back in you've lost the ability to follow this... unless I'm totally off base here and missed the point.

/b

On Sep 24, 2013, at 5:33 PM, David Villasmil <<a href="javascript:_e({}, &#39;cvml&#39;, &#39;david.villasmil.work@gmail.com&#39;);" target="_blank">david.villasmil.work@...> wrote:

> Hello,
>
> I don't think this is something FS can do. Let me explain:
>
> We have FS-A and FS-B, between which are multiple SIP providers. We are checking that the providers between A and B don't divert calls to non-approved vendors. So what I'm doing is:
>
> When relaying the call from FS-A to the provider, I'm adding a SIP header with a unique ID, which is inserted into a DB table.
> When FS-B receives the call, i retrieve the header ID and look it up in the table and mark it as answered.
> On FS-A, when the call is answered, it looks up the ID and makes sure it has been marked as "answered" by FS-B.
> If it is NOT marked, FS-A MUST disconnect the call.
>
> I hope the explanation was clear, and if anyone has a better idea of how to do this, I'm all ears :)
>
> Thanks
>
> David


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
<a href="javascript:_e({}, &#39;cvml&#39;, &#39;consulting@freeswitch.org&#39;);" target="_blank">consulting@...
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
<a href="javascript:_e({}, &#39;cvml&#39;, &#39;FreeSWITCH-users@lists.freeswitch.org&#39;);" target="_blank">FreeSWITCH-users@...
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:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Reply | Threaded
Open this post in threaded view
|

Re: Checking call is connected while bridged in lua

Johny Kadarisman Kwan
In reply to this post by David Villasmil
How about spawn a new lua thread (luarun) before bridge, passing uuid, etc to new script. then on that thread, you check db flagged and/or control call with uuid.

Never done this, but i think should works.


On Tue, Sep 24, 2013 at 6:33 PM, David Villasmil <[hidden email]> wrote:
Hello,

I don't think this is something FS can do. Let me explain:

We have FS-A and FS-B, between which are multiple SIP providers. We are checking that the providers between A and B don't divert calls to non-approved vendors. So what I'm doing is:

When relaying the call from FS-A to the provider, I'm adding a SIP header with a unique ID, which is inserted into a DB table. 
When FS-B receives the call, i retrieve the header ID and look it up in the table and mark it as answered.
On FS-A, when the call is answered, it looks up the ID and makes sure it has been marked as "answered" by FS-B.
If it is NOT marked, FS-A MUST disconnect the call.

I hope the explanation was clear, and if anyone has a better idea of how to do this, I'm all ears :)

Thanks

David



On Tue, Sep 24, 2013 at 5:12 PM, Brian West <[hidden email]> wrote:
Maybe if we understood more we could probably guide the end user in a better way to accomplish their goals!

/b

On Sep 24, 2013, at 9:46 AM, Michael Collins <[hidden email]> wrote:

> I'm with Brian on this one. The bridge app is epic. So the question is this: what are you trying to accomplish with all this Lua stuff that you can't do with a simple bridge?
>
> -MC
>


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
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:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
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:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Reply | Threaded
Open this post in threaded view
|

Re: Checking call is connected while bridged in lua

Vincent Xia
hi David, maybe i got the issue that is very similar to yours, the scenario is A calls B and B is bridged in lua script (create a new session for leg b and after B answered the call, bridge leg a and b), but when A hangs up before B could answer the call, i found it is not possilbe to have lua get noticed about the hangup.

as i understand, the bridge is made in a synchronous manner, thus you can do nothing before the bridge is finished (successfully or failed), one thing that may help is by using ignore_early_media while originating the b leg call, but this causes other problems for my issue, such as unable to check the result of no answer, so im still seeking a better solution for this.


2013/10/9 Johny Kadarisman Kwan <[hidden email]>
How about spawn a new lua thread (luarun) before bridge, passing uuid, etc to new script. then on that thread, you check db flagged and/or control call with uuid.

Never done this, but i think should works.


On Tue, Sep 24, 2013 at 6:33 PM, David Villasmil <[hidden email]> wrote:
Hello,

I don't think this is something FS can do. Let me explain:

We have FS-A and FS-B, between which are multiple SIP providers. We are checking that the providers between A and B don't divert calls to non-approved vendors. So what I'm doing is:

When relaying the call from FS-A to the provider, I'm adding a SIP header with a unique ID, which is inserted into a DB table. 
When FS-B receives the call, i retrieve the header ID and look it up in the table and mark it as answered.
On FS-A, when the call is answered, it looks up the ID and makes sure it has been marked as "answered" by FS-B.
If it is NOT marked, FS-A MUST disconnect the call.

I hope the explanation was clear, and if anyone has a better idea of how to do this, I'm all ears :)

Thanks

David



On Tue, Sep 24, 2013 at 5:12 PM, Brian West <[hidden email]> wrote:
Maybe if we understood more we could probably guide the end user in a better way to accomplish their goals!

/b

On Sep 24, 2013, at 9:46 AM, Michael Collins <[hidden email]> wrote:

> I'm with Brian on this one. The bridge app is epic. So the question is this: what are you trying to accomplish with all this Lua stuff that you can't do with a simple bridge?
>
> -MC
>


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
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:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
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:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
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:
[hidden email]
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
[hidden email]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org