Checking call is connected while bridged in lua
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
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
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 <david.villasmil.work@gmail.com> 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: consulting@freeswitch.org 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 FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
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 <brian@freeswitch.org> 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 < david.villasmil.work@gmail.com> 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: consulting@freeswitch.org 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 FreeSWITCH-users@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@freeswitch.org 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 FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
What exactly are you trying to accomplish? On Sep 22, 2013, at 8:18 PM, David Villasmil <david.villasmil.work@gmail.com> 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 brian@freeswitch.org 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)
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 <brian@freeswitch.org> wrote:
What exactly are you trying to accomplish?
On Sep 22, 2013, at 8:18 PM, David Villasmil < david.villasmil.work@gmail.com> 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 brian@freeswitch.org 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: consulting@freeswitch.org 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 FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
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 <brian@freeswitch.org<javascript:_e({}, 'cvml', 'brian@freeswitch.org');>
wrote:
What exactly are you trying to accomplish?
On Sep 22, 2013, at 8:18 PM, David Villasmil < david.villasmil.work@gmail.com <javascript:_e({}, 'cvml', 'david.villasmil.work@gmail.com');>> 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 brian@freeswitch.org <javascript:_e({}, 'cvml', 'brian@freeswitch.org');> 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: consulting@freeswitch.org <javascript:_e({}, 'cvml', 'consulting@freeswitch.org');> 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 FreeSWITCH-users@lists.freeswitch.org <javascript:_e({}, 'cvml', 'FreeSWITCH-users@lists.freeswitch.org');> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
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 <david.villasmil.work@gmail.com> 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
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 <brian@freeswitch.org> 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 < david.villasmil.work@gmail.com> 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: consulting@freeswitch.org 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 FreeSWITCH-users@lists.freeswitch.org 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
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 <msc@freeswitch.org> 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
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 <brian@freeswitch.org> 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 <msc@freeswitch.org> 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: consulting@freeswitch.org 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 FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Will TLS not solve the problem for you? On 24 September 2013 19:33, David Villasmil <david.villasmil.work@gmail.com>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 <brian@freeswitch.org> 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 <msc@freeswitch.org> 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: consulting@freeswitch.org 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 FreeSWITCH-users@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@freeswitch.org 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 FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
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 <ben@langfeld.co.uk> wrote:
Will TLS not solve the problem for you?
On 24 September 2013 19:33, David Villasmil < david.villasmil.work@gmail.com> 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 <brian@freeswitch.org> 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 <msc@freeswitch.org> 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: consulting@freeswitch.org 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 FreeSWITCH-users@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@freeswitch.org 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 FreeSWITCH-users@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@freeswitch.org 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 FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
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 <brian@freeswitch.org <mailto:brian@freeswitch.org>> 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 <msc@freeswitch.org <mailto:msc@freeswitch.org>> 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: consulting@freeswitch.org <mailto:consulting@freeswitch.org> 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 FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@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@freeswitch.org 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 FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
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 <david.villasmil.work@gmail.com> 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
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 <brian@freeswitch.org> 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 < david.villasmil.work@gmail.com> 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: consulting@freeswitch.org 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 FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
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 <brian@freeswitch.org<javascript:_e({}, 'cvml', 'brian@freeswitch.org');>
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 < david.villasmil.work@gmail.com <javascript:_e({}, 'cvml', 'david.villasmil.work@gmail.com');>> 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: consulting@freeswitch.org <javascript:_e({}, 'cvml', 'consulting@freeswitch.org');> 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 FreeSWITCH-users@lists.freeswitch.org <javascript:_e({}, 'cvml', 'FreeSWITCH-users@lists.freeswitch.org');> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
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 < david.villasmil.work@gmail.com> 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 <brian@freeswitch.org> 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 <msc@freeswitch.org> 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: consulting@freeswitch.org 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 FreeSWITCH-users@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@freeswitch.org 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 FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
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 <jkr888@gmail.com>
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 < david.villasmil.work@gmail.com> 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 <brian@freeswitch.org> 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 <msc@freeswitch.org> 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: consulting@freeswitch.org 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 FreeSWITCH-users@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@freeswitch.org 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 FreeSWITCH-users@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@freeswitch.org 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 FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (8)
-
Ben Langfeld
-
Brian West
-
David Villasmil
-
John
-
Johny Kadarisman Kwan
-
Michael Collins
-
Steven Ayre
-
Vincent Xia