Called-party state/presence as dialplan condition
I know (or at least I think I know) that with sofia, if you try to call a party and they are unavailable, you'll get a busy state back, and you can decide whether to go on from there or not, but if you're not using sofia (in this case, I'm using fifo), is there a way to find out the called party's state prior to actually calling the party to create a condition in the dialplan to act based on that state? I guess what I'm getting at is that I would like to modify the default dialplan such that based on the state of 5900, either pickup or park the call at 5900 so only one number needs to be used to access the called party parked on 5900. Currently the call will show as busy on 5900 and can be transferred using the same number, which is cool, but accessing the lot requires a different number to be called. (That can be kind of hard-to-impossible to do with a single soft key on some/most sip phones.) -Dan
Ok, well, I have thought of a way to do something similar to this... I guess a better question would be: Is there a way that I could save / access the output of one command from another? Ex. <action application="set" data="some_data='show channels'"/> Where show channels is the command to execute. I suppose if this can't be done in the dialplan, from what I could see, it could be done with the javascript module? Am I right? -Dan From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Daniel Hefti Sent: Friday, April 18, 2008 10:59 AM To: 'Freeswitch-users@lists.freeswitch.org' Subject: [Freeswitch-users] Called-party state/presence as dialplan condition I know (or at least I think I know) that with sofia, if you try to call a party and they are unavailable, you'll get a busy state back, and you can decide whether to go on from there or not, but if you're not using sofia (in this case, I'm using fifo), is there a way to find out the called party's state prior to actually calling the party to create a condition in the dialplan to act based on that state? I guess what I'm getting at is that I would like to modify the default dialplan such that based on the state of 5900, either pickup or park the call at 5900 so only one number needs to be used to access the called party parked on 5900. Currently the call will show as busy on 5900 and can be transferred using the same number, which is cool, but accessing the lot requires a different number to be called. (That can be kind of hard-to-impossible to do with a single soft key on some/most sip phones.) -Dan
I'm doing that myself with the event socket. I'm using tapi similiar states: idle, offering/alerting, connected. Those are enough for me. It was not easy to find which events to use to emulate those states, since the event flow / contents are different for internal and external calls. On Fri, Apr 18, 2008 at 9:10 PM, Daniel Hefti <dhefti@metropark.com> wrote:
Ok, well, I have thought of a way to do something similar to this… I guess a better question would be:
Is there a way that I could save / access the output of one command from another?
Ex. <action application="set" data="some_data='show channels'"/>
Where show channels is the command to execute.
I suppose if this can't be done in the dialplan, from what I could see, it could be done with the javascript module? Am I right?
-Dan
From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Daniel Hefti Sent: Friday, April 18, 2008 10:59 AM To: 'Freeswitch-users@lists.freeswitch.org' Subject: [Freeswitch-users] Called-party state/presence as dialplan condition
I know (or at least I think I know) that with sofia, if you try to call a party and they are unavailable, you'll get a busy state back, and you can decide whether to go on from there or not, but if you're not using sofia (in this case, I'm using fifo), is there a way to find out the called party's state prior to actually calling the party to create a condition in the dialplan to act based on that state?
I guess what I'm getting at is that I would like to modify the default dialplan such that based on the state of 5900, either pickup or park the call at 5900 so only one number needs to be used to access the called party parked on 5900. Currently the call will show as busy on 5900 and can be transferred using the same number, which is cool, but accessing the lot requires a different number to be called. (That can be kind of hard-to-impossible to do with a single soft key on some/most sip phones.)
-Dan _______________________________________________ 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
Now that you mention it, I just started looking into the event socket. Interesting stuff. Definitely something I'm going to have to look into. As an update, it took me a while to figure out how it all comes together, but I did find a way to do it. I didn't find a way to do what I originally planned wholly in the dialplan, but what I did do was create a javascript function that assigned the results of the 'show channels' api call (using apiExecute) to a variable and checked that to see if there was someone parked at that extension. From there, I could do whatever I wanted. Pretty cool. Thanks for the feedback. -Dan -----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Jonas Gauffin Sent: Saturday, April 19, 2008 12:22 AM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Called-party state/presence as dialplan condition I'm doing that myself with the event socket. I'm using tapi similiar states: idle, offering/alerting, connected. Those are enough for me. It was not easy to find which events to use to emulate those states, since the event flow / contents are different for internal and external calls. On Fri, Apr 18, 2008 at 9:10 PM, Daniel Hefti <dhefti@metropark.com> wrote:
Ok, well, I have thought of a way to do something similar to this... I guess a better question would be:
Is there a way that I could save / access the output of one command from another?
Ex. <action application="set" data="some_data='show channels'"/>
Where show channels is the command to execute.
I suppose if this can't be done in the dialplan, from what I could see, it could be done with the javascript module? Am I right?
-Dan
From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Daniel Hefti Sent: Friday, April 18, 2008 10:59 AM To: 'Freeswitch-users@lists.freeswitch.org' Subject: [Freeswitch-users] Called-party state/presence as dialplan condition
I know (or at least I think I know) that with sofia, if you try to call a party and they are unavailable, you'll get a busy state back, and you can decide whether to go on from there or not, but if you're not using sofia (in this case, I'm using fifo), is there a way to find out the called party's state prior to actually calling the party to create a condition in the dialplan to act based on that state?
I guess what I'm getting at is that I would like to modify the default dialplan such that based on the state of 5900, either pickup or park the call at 5900 so only one number needs to be used to access the called party parked on 5900. Currently the call will show as busy on 5900 and can be transferred using the same number, which is cool, but accessing the lot requires a different number to be called. (That can be kind of hard-to-impossible to do with a single soft key on some/most sip phones.)
-Dan _______________________________________________ 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
_______________________________________________ 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 (2)
-
Daniel Hefti
-
Jonas Gauffin