Socket inbound or outbound with PHP?
Hi, I am new to freeswitch and found out quite a lot of things the past days. But there are still many questions left, which I can't figure out without some help. I want to use freeswitch for a project, where freeswitch should communicate with PHP-scripts and receive the messages to different events. I was told to use socket and found some quite helpful PHP-scripts in this mailing list. One was for using socket outbound, one was for socket inbound. I would like to ask, which direction is the best oder most reliable? When using socket outbound, freeswitch connects to the PHP-script, the PHP-script forks and is registered to "myevents" (events all seems to give me all events from all connections). One of the problems I have with "outbound" is, that I won't get all events. For example I do not get "hangup", because the socket connection seems to die, before freeswitch sends the last command when hanging up. With "ringing" the problem seems to be the same. I only get a "hangup", when I register to "events all" and have to active calls. When one of the two calls hangs up, i can see it by printing out all events in the PHP-script. When using socket inbound, the PHP-script does not fork and seems to handle all events for all calls. What, if a request hangs for one call? Do all the other calls have to wait, till the other call is killed? Another thing ist the events "heartbeat". Will I get the "heartbeat" for every single call or just one heartbeat for all calls? I feel that I am missing some basic knowledge about sockets and freeswitch. Could someone help to find the right way, please? Thanks and kind regards Dennis
Den 17. okt.. 2008 kl. 14:45 skrev Dennis:
One of the problems I have with "outbound" is, that I won't get all events. For example I do not get "hangup", because the socket connection seems to die, before freeswitch sends the last command when hanging up. With "ringing" the problem seems to be the same.
Yes, this is true, I also have the same issue. But I am using the time the connection died as the event to set the hangup time in my own application. But you of course do not get the hangup cause here. I haven't had any problem with "ringing", though. Ivan
Big caveat on fs inexperience here, but from doc my guess is: Outbound is likely a good choice for dialplan application scenarios, for example a call out to external app for a specific route or route set. And Inbound is perhaps better at driving the switch through an external application, say to do origination. But I have no history, so am not an authority. As for not hanging/blocking using Inbound the documentation/wiki seems to address this in the BGAPI section: http://wiki.freeswitch.org/wiki/Event_Socket#Inbound And I believe there have been threads on the list about it before. The netcat examples also look quite promising, you may want to work scenarios through with that before diving into your PHP app. Andy On Oct 17, 2008, at 11:41 AM, Ivan C Myrvold wrote:
Den 17. okt.. 2008 kl. 14:45 skrev Dennis:
One of the problems I have with "outbound" is, that I won't get all events. For example I do not get "hangup", because the socket connection seems to die, before freeswitch sends the last command when hanging up. With "ringing" the problem seems to be the same.
Yes, this is true, I also have the same issue. But I am using the time the connection died as the event to set the hangup time in my own application. But you of course do not get the hangup cause here.
I haven't had any problem with "ringing", though.
Ivan
_______________________________________________ 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
On Fri, Oct 17, 2008 at 7:45 AM, Dennis <odermann@googlemail.com> wrote:
Hi,
I am new to freeswitch and found out quite a lot of things the past days. But there are still many questions left, which I can't figure out without some help.
I want to use freeswitch for a project, where freeswitch should communicate with PHP-scripts and receive the messages to different events. I was told to use socket and found some quite helpful PHP-scripts in this mailing list. One was for using socket outbound, one was for socket inbound.
I would like to ask, which direction is the best oder most reliable?
When using socket outbound, freeswitch connects to the PHP-script, the PHP-script forks and is registered to "myevents" (events all seems to give me all events from all connections). One of the problems I have with "outbound" is, that I won't get all events. For example I do not get "hangup", because the socket connection seems to die, before freeswitch sends the last command when hanging up. With "ringing" the problem seems to be the same. I only get a "hangup", when I register to "events all" and have to active calls. When one of the two calls hangs up, i can see it by printing out all events in the PHP-script.
Good point. I fixed latest release to linger on the socket until you get the channel_hangup event providing you did "myevents"
When using socket inbound, the PHP-script does not fork and seems to handle all events for all calls. What, if a request hangs for one call? Do all the other calls have to wait, till the other call is killed?
events are not connected to channels at all the events are in their own backend. and each event_socket connection has a dedicated thread and it's own copy of all the events.
Another thing ist the events "heartbeat". Will I get the "heartbeat" for every single call or just one heartbeat for all calls?
The regular heartbeat event is for the whole system in case you are managing a connection to several boxes or you want to be sure the box is up. There is a per call heartbeat you can enable at a desired interval for calls with media flowing through FS.
I feel that I am missing some basic knowledge about sockets and freeswitch. Could someone help to find the right way, please?
Thanks and kind regards Dennis
_______________________________________________ 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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
When using socket outbound, freeswitch connects to the PHP-script, the PHP-script forks and is registered to "myevents" (events all seems to give me all events from all connections). One of the problems I have with "outbound" is, that I won't get all events. For example I do not get "hangup", because the socket connection seems to die, before freeswitch sends the last command when hanging up. With "ringing" the problem seems to be the same. I only get a "hangup", when I register to "events all" and have to active calls. When one of the two calls hangs up, i can see it by printing out all events in the PHP-script.
Good point. I fixed latest release to linger on the socket until you get the channel_hangup event providing you did "myevents"
Anthony, that is so cool! It works exactly as I whished now. As far as I can see, I get all needed events thanks to your changes. Thanks a lot for the great support!
Another thing ist the events "heartbeat". Will I get the "heartbeat" for every single call or just one heartbeat for all calls?
The regular heartbeat event is for the whole system in case you are managing a connection to several boxes or you want to be sure the box is up.
There is a per call heartbeat you can enable at a desired interval for calls with media flowing through FS.
A per call heartbeat is exactly what I am looking for (as far, as I get it, when registering to myevents). What does "calls with media flowing" mean? What makes them different from other calls? Where can I aktivate a per call heartbeat and where can I set the interval? A more precise question about inbound/outbound: I want to read out the events from freeswitch with my PHP-script and then tell freeswitch, what to do next. I have the feeling, that "outbound" is the way to go. But of course I also want to be able to start calls. Can I do this by using "outbound"? If I want to start a call without bridging two sides, is "originate" the command to use? I have problems to understand, when to use "sendmsg" and when to use "api". Like "bridge" works with "sendmsg" and "originate" seems only to work with the "api" command. Thanks again Dennis
There is a per call heartbeat you can enable at a desired interval for calls with media flowing through FS.
A per call heartbeat is exactly what I am looking for (as far, as I get it, when registering to myevents). What does "calls with media flowing" mean? What makes them different from other calls? Where can I aktivate a per call heartbeat and where can I set the interval?
I just want to let you know, that we found out how the "per call heartbeat" can be used. It works very well and we are very happy with it. For the ones, who also want to use the "per call heartbeat" and are not sure how to use it, can find a short description here: Where we connect in freeswitch to the PHP-script, we set: <action application="set" data="enable_heartbeat_events=10"/> In this example the heartbeat will come every 10 seconds. Default is "every 60 seconds", the maximum is "every 10 seconds". In the PHP-script we register to the event by using "event SESSION_HEARTBEAT". That's it... My other questions still remain ;-) Kind regards Dennis
On Sat, Oct 18, 2008 at 3:50 AM, Dennis <odermann@googlemail.com> wrote:
When using socket outbound, freeswitch connects to the PHP-script, the PHP-script forks and is registered to "myevents" (events all seems to give me all events from all connections). One of the problems I have with "outbound" is, that I won't get all events. For example I do not get "hangup", because the socket connection seems to die, before freeswitch sends the last command when hanging up. With "ringing" the problem seems to be the same. I only get a "hangup", when I register to "events all" and have to active calls. When one of the two calls hangs up, i can see it by printing out all events in the PHP-script.
Good point. I fixed latest release to linger on the socket until you get the channel_hangup event providing you did "myevents"
Anthony, that is so cool! It works exactly as I whished now. As far as I can see, I get all needed events thanks to your changes. Thanks a lot for the great support!
Another thing ist the events "heartbeat". Will I get the "heartbeat" for every single call or just one heartbeat for all calls?
The regular heartbeat event is for the whole system in case you are managing a connection to several boxes or you want to be sure the box is up.
There is a per call heartbeat you can enable at a desired interval for calls with media flowing through FS.
A per call heartbeat is exactly what I am looking for (as far, as I get it, when registering to myevents). What does "calls with media flowing" mean? What makes them different from other calls? Where can I aktivate a per call heartbeat and where can I set the interval?
Meaning in bypass_media mode it will not work because the logic lives in the media io handler. Supporting it in calls where media is point to point would require some more code.
A more precise question about inbound/outbound: I want to read out the events from freeswitch with my PHP-script and then tell freeswitch, what to do next. I have the feeling, that "outbound" is the way to go. But of course I also want to be able to start calls. Can I do this by using "outbound"?
yes
If I want to start a call without bridging two sides, is "originate" the command to use? I have problems to understand, when to use "sendmsg" and when to use "api". Like "bridge" works with "sendmsg" and "originate" seems only to work with the "api" command.
sendmsg is for dialplan applications (show application) on the cli api is for FSAPI interface (show api) btw you should update again to latest as I made another tweak regarding this behavior change
Thanks again Dennis
_______________________________________________ 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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
2008/10/20 Anthony Minessale <anthony.minessale@gmail.com>:
A more precise question about inbound/outbound: I want to read out the events from freeswitch with my PHP-script and then tell freeswitch, what to do next. I have the feeling, that "outbound" is the way to go. But of course I also want to be able to start calls. Can I do this by using "outbound"?
yes
But what is the difference between "bridge" and "originate" in handling dials? "bridge" connects two calls together, but "originate" seems to be a part of "bridge". If we make a "bridge", both legs seem to bee in the same session, when using socked outbound. We make a "bridge" as follows: $this->invokeMessage("bridge", "sofia/internal/1001@192.168.1.5"); When we use "originate" (which we prefer, because we do not want to connect both call with each other immediately), we use the following command: $this->invokeCommand("API originate {origination_caller_id_number=123455}sofia/internal/1001@192.168.1.5 123"); The problem is, that the new call is now in another call-session and we do not know how to bring the calls together. Does it have something to do with "API"? If yes, is there a way to use "originate" with "sendmsg"? Thanks Dennis
once you are controlling both sessions individually use api to send the uuid_bridge command: api uuid_bridge <uuid of leg a> <uuid of leg b> On Tue, Oct 21, 2008 at 9:37 AM, Dennis <odermann@googlemail.com> wrote:
2008/10/20 Anthony Minessale <anthony.minessale@gmail.com>:
A more precise question about inbound/outbound: I want to read out the events from freeswitch with my PHP-script and then tell freeswitch, what to do next. I have the feeling, that "outbound" is the way to go. But of course I also want to be able to start calls. Can I do this by using "outbound"?
yes
But what is the difference between "bridge" and "originate" in handling dials? "bridge" connects two calls together, but "originate" seems to be a part of "bridge". If we make a "bridge", both legs seem to bee in the same session, when using socked outbound.
We make a "bridge" as follows: $this->invokeMessage("bridge", "sofia/internal/1001@192.168.1.5");
When we use "originate" (which we prefer, because we do not want to connect both call with each other immediately), we use the following command: $this->invokeCommand("API originate {origination_caller_id_number=123455}sofia/internal/1001@192.168.1.5 123");
The problem is, that the new call is now in another call-session and we do not know how to bring the calls together.
Does it have something to do with "API"? If yes, is there a way to use "originate" with "sendmsg"?
Thanks Dennis
_______________________________________________ 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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
I think I have problems to understand what is happening in detail. Just a short explaination, of what we are doing. We use socket outbound and have a PHP script, which is listening to "myevents". If a new call is coming in, we fork the PHP script in a new process to handle this call. Now we have a new "inbound", which we can handle with fs and the PHP script. In example, we play a file for the caller. After we have played the file, we want to call to the dialed number. But we do not want to connect both call immediately. We originate to the target number, because we want to play a file, before we connect, perhaps. A "bridge" would connect both legs immediately. Therefore we need to originate. If we originate, the originated call will run in a new child process in PHP (this does not happen with "bridge"). How could our PHP "inbound"-process know, what the "outbound"-process is doing? They have nothing to do with each other. We have an inbound and then we play a file. The current process "knows", that we have to make an originate, play a file and then bridge. But the "current" process does not know, when the playfile is done and the bridge can be executed. So how could we "control both sessions individually"? Sorry for all these questions, but we have serious problems, because we can not find the answers. Thanks Dennis 2008/10/21 Anthony Minessale <anthony.minessale@gmail.com>:
once you are controlling both sessions individually use api to send the uuid_bridge command:
api uuid_bridge <uuid of leg a> <uuid of leg b>
On Tue, Oct 21, 2008 at 9:37 AM, Dennis <odermann@googlemail.com> wrote:
2008/10/20 Anthony Minessale <anthony.minessale@gmail.com>:
A more precise question about inbound/outbound: I want to read out the events from freeswitch with my PHP-script and then tell freeswitch, what to do next. I have the feeling, that "outbound" is the way to go. But of course I also want to be able to start calls. Can I do this by using "outbound"?
yes
But what is the difference between "bridge" and "originate" in handling dials? "bridge" connects two calls together, but "originate" seems to be a part of "bridge". If we make a "bridge", both legs seem to bee in the same session, when using socked outbound.
We make a "bridge" as follows: $this->invokeMessage("bridge", "sofia/internal/1001@192.168.1.5");
When we use "originate" (which we prefer, because we do not want to connect both call with each other immediately), we use the following command: $this->invokeCommand("API originate {origination_caller_id_number=123455}sofia/internal/1001@192.168.1.5 123");
The problem is, that the new call is now in another call-session and we do not know how to bring the calls together.
Does it have something to do with "API"? If yes, is there a way to use "originate" with "sendmsg"?
So you need to create a second call leg that is somewhat independent of the first leg, so that you can play a file, and *then* bridge the new leg to the "current" leg? I just want to make sure that I grok what you are trying to accomplish. Also, if you haven't put your dialplan and script in pastebin then it would be good to do so for the sake of everyone being on the same page. ( pastebin.freeswitch.org) -MC On Tue, Oct 21, 2008 at 9:26 AM, Dennis <odermann@googlemail.com> wrote:
I think I have problems to understand what is happening in detail.
Just a short explaination, of what we are doing. We use socket outbound and have a PHP script, which is listening to "myevents". If a new call is coming in, we fork the PHP script in a new process to handle this call. Now we have a new "inbound", which we can handle with fs and the PHP script. In example, we play a file for the caller. After we have played the file, we want to call to the dialed number. But we do not want to connect both call immediately. We originate to the target number, because we want to play a file, before we connect, perhaps. A "bridge" would connect both legs immediately. Therefore we need to originate.
If we originate, the originated call will run in a new child process in PHP (this does not happen with "bridge").
How could our PHP "inbound"-process know, what the "outbound"-process is doing? They have nothing to do with each other.
We have an inbound and then we play a file. The current process "knows", that we have to make an originate, play a file and then bridge. But the "current" process does not know, when the playfile is done and the bridge can be executed.
So how could we "control both sessions individually"?
Sorry for all these questions, but we have serious problems, because we can not find the answers.
Thanks Dennis
2008/10/21 Anthony Minessale <anthony.minessale@gmail.com>:
once you are controlling both sessions individually use api to send the uuid_bridge command:
api uuid_bridge <uuid of leg a> <uuid of leg b>
On Tue, Oct 21, 2008 at 9:37 AM, Dennis <odermann@googlemail.com> wrote:
2008/10/20 Anthony Minessale <anthony.minessale@gmail.com>:
A more precise question about inbound/outbound: I want to read out
the
events from freeswitch with my PHP-script and then tell freeswitch, what to do next. I have the feeling, that "outbound" is the way to go. But of course I also want to be able to start calls. Can I do this by using "outbound"?
yes
But what is the difference between "bridge" and "originate" in handling dials? "bridge" connects two calls together, but "originate" seems to be a part of "bridge". If we make a "bridge", both legs seem to bee in the same session, when using socked outbound.
We make a "bridge" as follows: $this->invokeMessage("bridge", "sofia/internal/1001@192.168.1.5");
When we use "originate" (which we prefer, because we do not want to connect both call with each other immediately), we use the following command: $this->invokeCommand("API originate {origination_caller_id_number=123455}sofia/internal/1001@192.168.1.5 123");
The problem is, that the new call is now in another call-session and we do not know how to bring the calls together.
Does it have something to do with "API"? If yes, is there a way to use "originate" with "sendmsg"?
_______________________________________________ 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 Dennis
I think I have problems to understand what is happening in detail.
Just a short explaination, of what we are doing. We use socket outbound and have a PHP script, which is listening to "myevents". If a new call is coming in, we fork the PHP script in a new process to handle this call. Now we have a new "inbound", which we can handle with fs and the PHP script. In example, we play a file for the caller. After we have played the file, we want to call to the dialed number. But we do not want to connect both call immediately. We originate to the target number, because we want to play a file, before we connect, perhaps. A "bridge" would connect both legs immediately. Therefore we need to originate.
If we originate, the originated call will run in a new child process in PHP (this does not happen with "bridge").
How could our PHP "inbound"-process know, what the "outbound"-process is doing? They have nothing to do with each other.
That's some basic IPC. The way I've done it is to create a database table which holds information about each call, keyed from the call's UUID. It's not hugely efficient, but works..! But each call has to know about the other. So you need to pass the first call's UUID to the second one, which can be done like so (in Perl, but should translate to PHP pretty easily): print $sock "bgapi originate {3c_uuid=$uuid}sofia/gateway/number &application(or whatever)\n\n"; Now your outbound call has a channel variable called 3c_uuid, which holds the UUID of your inbound leg. From this point onwards, the outbound can talk to the inbound and, if it includes a way of replying, the inbound can talk to the outbound. There's plenty of other ways of establishing IPC - one which comes to mind is to listen on a socket on the inbound leg, and pass the port to the outbound one. Hope this helps.. Cheers -- Dave
We have an inbound and then we play a file. The current process "knows", that we have to make an originate, play a file and then bridge. But the "current" process does not know, when the playfile is done and the bridge can be executed.
So how could we "control both sessions individually"?
Sorry for all these questions, but we have serious problems, because we can not find the answers.
Thanks Dennis
2008/10/21 Anthony Minessale <anthony.minessale@gmail.com>:
once you are controlling both sessions individually use api to send the uuid_bridge command:
api uuid_bridge <uuid of leg a> <uuid of leg b>
On Tue, Oct 21, 2008 at 9:37 AM, Dennis <odermann@googlemail.com> wrote:
2008/10/20 Anthony Minessale <anthony.minessale@gmail.com>:
A more precise question about inbound/outbound: I want to read out the events from freeswitch with my PHP-script and then tell freeswitch, what to do next. I have the feeling, that "outbound" is the way to go. But of course I also want to be able to start calls. Can I do this by using "outbound"?
yes
But what is the difference between "bridge" and "originate" in handling dials? "bridge" connects two calls together, but "originate" seems to be a part of "bridge". If we make a "bridge", both legs seem to bee in the same session, when using socked outbound.
We make a "bridge" as follows: $this->invokeMessage("bridge", "sofia/internal/1001@192.168.1.5");
When we use "originate" (which we prefer, because we do not want to connect both call with each other immediately), we use the following command: $this->invokeCommand("API originate {origination_caller_id_number=123455}sofia/internal/1001@192.168.1.5 123");
The problem is, that the new call is now in another call-session and we do not know how to bring the calls together.
Does it have something to do with "API"? If yes, is there a way to use "originate" with "sendmsg"?
_______________________________________________ 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
like i said, the inbound socket just needs to know the uuid of each leg and it can send the command to bridge them: api uuid_bridge <uuid of leg a> <uuid of leg b> as soon as you do this the legs will be bridged. On Tue, Oct 21, 2008 at 11:26 AM, Dennis <odermann@googlemail.com> wrote:
I think I have problems to understand what is happening in detail.
Just a short explaination, of what we are doing. We use socket outbound and have a PHP script, which is listening to "myevents". If a new call is coming in, we fork the PHP script in a new process to handle this call. Now we have a new "inbound", which we can handle with fs and the PHP script. In example, we play a file for the caller. After we have played the file, we want to call to the dialed number. But we do not want to connect both call immediately. We originate to the target number, because we want to play a file, before we connect, perhaps. A "bridge" would connect both legs immediately. Therefore we need to originate.
If we originate, the originated call will run in a new child process in PHP (this does not happen with "bridge").
How could our PHP "inbound"-process know, what the "outbound"-process is doing? They have nothing to do with each other.
We have an inbound and then we play a file. The current process "knows", that we have to make an originate, play a file and then bridge. But the "current" process does not know, when the playfile is done and the bridge can be executed.
So how could we "control both sessions individually"?
Sorry for all these questions, but we have serious problems, because we can not find the answers.
Thanks Dennis
2008/10/21 Anthony Minessale <anthony.minessale@gmail.com>:
once you are controlling both sessions individually use api to send the uuid_bridge command:
api uuid_bridge <uuid of leg a> <uuid of leg b>
On Tue, Oct 21, 2008 at 9:37 AM, Dennis <odermann@googlemail.com> wrote:
2008/10/20 Anthony Minessale <anthony.minessale@gmail.com>:
A more precise question about inbound/outbound: I want to read out
the
events from freeswitch with my PHP-script and then tell freeswitch, what to do next. I have the feeling, that "outbound" is the way to go. But of course I also want to be able to start calls. Can I do this by using "outbound"?
yes
But what is the difference between "bridge" and "originate" in handling dials? "bridge" connects two calls together, but "originate" seems to be a part of "bridge". If we make a "bridge", both legs seem to bee in the same session, when using socked outbound.
We make a "bridge" as follows: $this->invokeMessage("bridge", "sofia/internal/1001@192.168.1.5");
When we use "originate" (which we prefer, because we do not want to connect both call with each other immediately), we use the following command: $this->invokeCommand("API originate {origination_caller_id_number=123455}sofia/internal/1001@192.168.1.5 123");
The problem is, that the new call is now in another call-session and we do not know how to bring the calls together.
Does it have something to do with "API"? If yes, is there a way to use "originate" with "sendmsg"?
_______________________________________________ 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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
2008/10/21 Michael Collins <msc@freeswitch.org>:
So you need to create a second call leg that is somewhat independent of the first leg, so that you can play a file, and *then* bridge the new leg to the "current" leg?
Yes, this is exactly what I want. A normal "bridge" is nice, because it seems, that no new process is started and both legs know about each other. But in many cases I first want to handle both legs a bit independant. For example I want to have the option to play a soundfile to the outbound leg, to press the #1, if he/she wants to talk to the caller (I know, this is example is a little bit stupid). If the #1 is pressed, I want to bridge both legs, if the outbound leg hangs up, we hang up the inbound leg.
Also, if you haven't put your dialplan and script in pastebin then it would be good to do so for the sake of everyone being on the same page. (pastebin.freeswitch.org)
In the moment there is not much to show in the pastebin. I am testing different situations to see, if fs can do all the things I need (which seems to be so :-) When I am some steps further, I will put some code in the pastebin. 2008/10/21 David Knell <dave@3c.co.uk>:
That's some basic IPC. The way I've done it is to create a database table which holds information about each call, keyed from the call's UUID. It's not hugely efficient, but works..!
But each call has to know about the other. So you need to pass the first call's UUID to the second one, which can be done like so (in Perl, but should translate to PHP pretty easily): print $sock "bgapi originate {3c_uuid=$uuid}sofia/gateway/number &application(or whatever)\n\n";
Thanks for the info! That's what I tried yesterday and it seems to work quite good. It seems, that I have to work with something like a call map, to handle the different legs. I only thought, that there might be a nicer way to let both legs know about each other. 2008/10/21 Anthony Minessale <anthony.minessale@gmail.com>:
like i said, the inbound socket just needs to know the uuid of each leg and it can send the command to bridge them:
api uuid_bridge <uuid of leg a> <uuid of leg b>
as soon as you do this the legs will be bridged.
Thanks, api uuid_bridge works good (if the inbound knows about the uuid of the outbound, which seems to make a call map neccesary).
Ahh, help, I found something out about my question and would like to know, if I am really in trouble... The problem is, when one does not read every single word. Till now I always worked with socket outbound and a PHP script, which forks the different processes. Everything seemed to work great (in my little test environment) and I am at the point, where I could do most if not all of the things I wanted to do with fs. Today I made an originate over api, passed the inbound uuid to the outbound and could control different things - I also could bridge both calls. Great, I thought. Then I wanted to start the next little test: Start a playfile from the outbound, so that the inbound can hear it... Negative! It seems to be impossible to send a playfile or hangup (and more) over api. Both command seem only to be available with sendmsg. But sendmsg <uuid> does not work with socket outbound, at least not from the outbound to the inbound. show application and show api tell a lot and I do know, when I stopped thinking :-( Perhaps my mistakes came up, because I started to use fs one and a half week ago - I don't know. So do I have to switch completely to socket inbound or is there a way to continue using socket outbound? Or will I perhaps find out, that I can not do some things with socket inbound, which I could do with socket outbound? In the moment I just do not know which way to go... Dennis
Hi Dennis,
Till now I always worked with socket outbound and a PHP script, which forks the different processes. Everything seemed to work great (in my little test environment) and I am at the point, where I could do most if not all of the things I wanted to do with fs.
Today I made an originate over api, passed the inbound uuid to the outbound and could control different things - I also could bridge both calls. Great, I thought. Then I wanted to start the next little test: Start a playfile from the outbound, so that the inbound can hear it... Negative! It seems to be impossible to send a playfile or hangup (and more) over api. Both command seem only to be available with sendmsg. But sendmsg <uuid> does not work with socket outbound, at least not from the outbound to the inbound.
What you'll probably need to do is to get the two processes handling the two legs talking to each other, so that the one handling the outbound leg sends a message to the one handling the inbound leg, and that message causes the process handling the inbound leg to start playing the file. Stick with what you're doing - you're on the right track to end up with a fantastically powerful IVR, and it doesn't sound like you're far from that turning point where everything slots in to place and things just start to work..! Cheers -- Dave
Hi David, 2008/10/22 David Knell <dave@3c.co.uk>:
What you'll probably need to do is to get the two processes handling the two legs talking to each other, so that the one handling the outbound leg sends a message to the one handling the inbound leg, and that message causes the process handling the inbound leg to start playing the file.
Stick with what you're doing - you're on the right track to end up with a fantastically powerful IVR, and it doesn't sound like you're far from that turning point where everything slots in to place and things just start to work..!
Thanks for giving me hope and let me feel not beeing on the absolutely wrong track! For sure I will go on working on the problems. I know that freeswitch is the way to go and I know, that freeswitch can do everything I need. It is only frustrating to see, that so many spent hours where spent for the probably wrong way. Because many hours spent on freeswitch let me learn a lot about it and let me know, that I can reach my goals with it, makes me not resignate. I hope I will find out, how to make both (or perhaps a lot more) processes talk to each other. Kind regards Dennis
imagine how many hours were spent trying to code it from scratch =D you did not waste any hours, you have convinced yourself you are doing it wrong when really you are just choosing the wrong commands. again JOIN IRC so more people can help you. On Wed, Oct 22, 2008 at 11:34 AM, Dennis <odermann@googlemail.com> wrote:
Hi David,
2008/10/22 David Knell <dave@3c.co.uk>:
What you'll probably need to do is to get the two processes handling the two legs talking to each other, so that the one handling the outbound leg sends a message to the one handling the inbound leg, and that message causes the process handling the inbound leg to start playing the file.
Stick with what you're doing - you're on the right track to end up with a fantastically powerful IVR, and it doesn't sound like you're far from that turning point where everything slots in to place and things just start to work..!
Thanks for giving me hope and let me feel not beeing on the absolutely wrong track!
For sure I will go on working on the problems. I know that freeswitch is the way to go and I know, that freeswitch can do everything I need. It is only frustrating to see, that so many spent hours where spent for the probably wrong way.
Because many hours spent on freeswitch let me learn a lot about it and let me know, that I can reach my goals with it, makes me not resignate.
I hope I will find out, how to make both (or perhaps a lot more) processes talk to each other.
Kind regards Dennis
_______________________________________________ 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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
imagine how many hours were spent trying to code it from scratch =D
I don't think I want to know that. Do you ever sleep??? ;-)
you did not waste any hours, you have convinced yourself you are doing it wrong when really you are just choosing the wrong commands.
Hehe, that gives me hope and I will be up very early tomorrow (european time) to go through everything to try to avoid mistakes and missunderstandings (as far this is possible as a fs-noob and an only-slightly-good-english-speaking-person).
again JOIN IRC so more people can help you.
I am a webdeveloper for 12 years now and I never used IRC. Strange, that I never used it, but I will be happy to take a ride. Might be fun, a new experiance and informative. Thanks Dennis
You have to learn and understand the terminology and structure. FSAPI is the name of the interface that allows the registration of arbitrary commands which can be executed by cli, xml-rpc and event socket, they are not tied to a specific channel at all. APPLICATION is the name of the interface that provides applications to be executed by individual calls they are designed with the concept that you have a channel and you want to make the channel do something these are the things you execute in the dialplan in the <action> tags. event socket has the command sendmsg which lets you send a message to a specific channel. This can be any message but the one you are familiar with is the one that tells the session to execute an application. Think of it as you are sending an instant message to the channel saying, please execute this dialplan application. The caveat to this is that it will only listen to you if you have first parked the call which is a mutual agreement between you and the call that you are allowed to control it. The outbound event socket to your program explicitly puts the call into park and the originated sessions that execute park also fall into this category. the "api" event socket command is a way to execute FSAPI commands from the socket (anything you can type from the cli like "show channels") There are several FSAPI commands that can manipulate calls but rather than sending them a message to execte some app you are specifiying the uuid to gain acces to the channel in order to carry out your command. Most of these commands begin with uuid_ so there are things like uuid_bridge, uuid_kill, uuid_transfer etc. So in short, the answer is, yes, it's because you only started last week. Everything you want to be able to do is there for you you just have to shift your paradigm or as like Doc Brown likes to say "learn to think 4th dimensionally!" You may find it useful to join irc irc.freenode.net #freeswitch or use the applet on our homeage by looking for the chat login box on the right side of the page towards the bottom. There are over one hundered people in there who can offer advice etc. On Wed, Oct 22, 2008 at 10:23 AM, Dennis <odermann@googlemail.com> wrote:
Ahh, help, I found something out about my question and would like to know, if I am really in trouble... The problem is, when one does not read every single word.
Till now I always worked with socket outbound and a PHP script, which forks the different processes. Everything seemed to work great (in my little test environment) and I am at the point, where I could do most if not all of the things I wanted to do with fs.
Today I made an originate over api, passed the inbound uuid to the outbound and could control different things - I also could bridge both calls. Great, I thought. Then I wanted to start the next little test: Start a playfile from the outbound, so that the inbound can hear it... Negative! It seems to be impossible to send a playfile or hangup (and more) over api. Both command seem only to be available with sendmsg. But sendmsg <uuid> does not work with socket outbound, at least not from the outbound to the inbound.
show application and show api tell a lot and I do know, when I stopped thinking :-( Perhaps my mistakes came up, because I started to use fs one and a half week ago - I don't know.
So do I have to switch completely to socket inbound or is there a way to continue using socket outbound? Or will I perhaps find out, that I can not do some things with socket inbound, which I could do with socket outbound?
In the moment I just do not know which way to go...
Dennis
_______________________________________________ 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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
You may also be interested in a new feature added to r10110 (no we dont use binary version numbers) you can call inbound to event_socket and once authenticated you can issue the command myevents <uuid> where <uuid> is the uuid of some not-yet-controlled call. If all goes well you will get a positive reply and now you the behaviour will be identical to outbound event socket with async full flags and events on that one channel will begin to flow. On Wed, Oct 22, 2008 at 11:00 AM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
You have to learn and understand the terminology and structure.
FSAPI is the name of the interface that allows the registration of arbitrary commands which can be executed by cli, xml-rpc and event socket, they are not tied to a specific channel at all.
APPLICATION is the name of the interface that provides applications to be executed by individual calls they are designed with the concept that you have a channel and you want to make the channel do something these are the things you execute in the dialplan in the <action> tags.
event socket has the command sendmsg which lets you send a message to a specific channel. This can be any message but the one you are familiar with is the one that tells the session to execute an application. Think of it as you are sending an instant message to the channel saying, please execute this dialplan application. The caveat to this is that it will only listen to you if you have first parked the call which is a mutual agreement between you and the call that you are allowed to control it. The outbound event socket to your program explicitly puts the call into park and the originated sessions that execute park also fall into this category.
the "api" event socket command is a way to execute FSAPI commands from the socket (anything you can type from the cli like "show channels") There are several FSAPI commands that can manipulate calls but rather than sending them a message to execte some app you are specifiying the uuid to gain acces to the channel in order to carry out your command. Most of these commands begin with uuid_ so there are things like uuid_bridge, uuid_kill, uuid_transfer etc.
So in short, the answer is, yes, it's because you only started last week. Everything you want to be able to do is there for you you just have to shift your paradigm or as like Doc Brown likes to say "learn to think 4th dimensionally!"
You may find it useful to join irc irc.freenode.net #freeswitch or use the applet on our homeage by looking for the chat login box on the right side of the page towards the bottom. There are over one hundered people in there who can offer advice etc.
On Wed, Oct 22, 2008 at 10:23 AM, Dennis <odermann@googlemail.com> wrote:
Ahh, help, I found something out about my question and would like to know, if I am really in trouble... The problem is, when one does not read every single word.
Till now I always worked with socket outbound and a PHP script, which forks the different processes. Everything seemed to work great (in my little test environment) and I am at the point, where I could do most if not all of the things I wanted to do with fs.
Today I made an originate over api, passed the inbound uuid to the outbound and could control different things - I also could bridge both calls. Great, I thought. Then I wanted to start the next little test: Start a playfile from the outbound, so that the inbound can hear it... Negative! It seems to be impossible to send a playfile or hangup (and more) over api. Both command seem only to be available with sendmsg. But sendmsg <uuid> does not work with socket outbound, at least not from the outbound to the inbound.
show application and show api tell a lot and I do know, when I stopped thinking :-( Perhaps my mistakes came up, because I started to use fs one and a half week ago - I don't know.
So do I have to switch completely to socket inbound or is there a way to continue using socket outbound? Or will I perhaps find out, that I can not do some things with socket inbound, which I could do with socket outbound?
In the moment I just do not know which way to go...
Dennis
_______________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
I know, that I am missing a lot of things regarding freeswitch and that I still have to learn a lot about it (it would be sad, if could lear all aspects within a week ;-). I will come back to your answer tomorrow, because I want to understand every single aspect of it and I want to make my own little tests to understand more. I have to admit, that I have to think a little bit more about what I read, if it is written in english :-) Thanks again Dennis 2008/10/22 Anthony Minessale <anthony.minessale@gmail.com>:
You have to learn and understand the terminology and structure.
FSAPI is the name of the interface that allows the registration of arbitrary commands which can be executed by cli, xml-rpc and event socket, they are not tied to a specific channel at all.
APPLICATION is the name of the interface that provides applications to be executed by individual calls they are designed with the concept that you have a channel and you want to make the channel do something these are the things you execute in the dialplan in the <action> tags.
event socket has the command sendmsg which lets you send a message to a specific channel. This can be any message but the one you are familiar with is the one that tells the session to execute an application. Think of it as you are sending an instant message to the channel saying, please execute this dialplan application. The caveat to this is that it will only listen to you if you have first parked the call which is a mutual agreement between you and the call that you are allowed to control it. The outbound event socket to your program explicitly puts the call into park and the originated sessions that execute park also fall into this category.
the "api" event socket command is a way to execute FSAPI commands from the socket (anything you can type from the cli like "show channels") There are several FSAPI commands that can manipulate calls but rather than sending them a message to execte some app you are specifiying the uuid to gain acces to the channel in order to carry out your command. Most of these commands begin with uuid_ so there are things like uuid_bridge, uuid_kill, uuid_transfer etc.
So in short, the answer is, yes, it's because you only started last week. Everything you want to be able to do is there for you you just have to shift your paradigm or as like Doc Brown likes to say "learn to think 4th dimensionally!"
You may find it useful to join irc irc.freenode.net #freeswitch or use the applet on our homeage by looking for the chat login box on the right side of the page towards the bottom. There are over one hundered people in there who can offer advice etc.
2008/10/22 Anthony Minessale <anthony.minessale@gmail.com>:
event socket has the command sendmsg which lets you send a message to a specific channel. This can be any message but the one you are familiar with is the one that tells the session to execute an application. Think of it as you are sending an instant message to the channel saying, please execute this dialplan application. The caveat to this is that it will only listen to you if you have first parked the call which is a mutual agreement between you and the call that you are allowed to control it. The outbound event socket to your program explicitly puts the call into park and the originated sessions that execute park also fall into this category.
If you talk about "event socket", do you mean "event socket inbound", "event socket outbound" or both? When I use sendmsg <uuid> in socket outbound to handle the current process, everything works fine (I do not even need the uuid). But it does not help to use sendmsg <uuid> to send commands to other processes, although I know the uuid of the target. It could be so easy (for me), if sendmsg would work to control another process and not just the current or api would be able to send the same commands as sendmsg... It seems as if I HAVE to use event socket inbound if I want to be able to send a playback command from one process or leg to the other. Or do I have to use event socket inbound AND socket event outbound? So that fs connects to one PHP script and another PHP script connects to the fs? You wrote: "you can call inbound to event_socket and once authenticated you can issue the command myevents <uuid>". This seems to tell me, that I have to connect to the fs, right?
On Thu, Oct 23, 2008 at 6:45 AM, Dennis <odermann@googlemail.com> wrote:
2008/10/22 Anthony Minessale <anthony.minessale@gmail.com>:
event socket has the command sendmsg which lets you send a message to a specific channel. This can be any message but the one you are familiar with is the one that tells the session to execute an application. Think of it as you are sending an instant message to the channel saying, please execute this dialplan application. The caveat to this is that it will only listen to you if you have first parked the call which is a mutual agreement between you and the call that you are allowed to control it. The outbound event socket to your program explicitly puts the call into park and the originated sessions that execute park also fall into this category.
If you talk about "event socket", do you mean "event socket inbound", "event socket outbound" or both? When I use sendmsg <uuid> in socket outbound to handle the current process, everything works fine (I do not even need the uuid). But it does not help to use sendmsg <uuid> to send commands to other processes, although I know the uuid of the target.
What messages do you want to send? Be Specific. Like i said you CANNOT blindly call sendmsg on any channel that was not first parked to indicate you should be controlling it. Also like I already said, if you open a new inbound event socket connection and isssue "myevents <uuid>" it is identical to as if that was an outbound event socket from the desired channel. It's new in latest trunk. Probably if you explain *exactly* what you want to accomplish there is some simple way to do it. Don't fret about the difference between inbound and outbound there is no difference besides you cant control calls that were not in park.
It could be so easy (for me), if sendmsg would work to control another process and not just the current or api would be able to send the same commands as sendmsg...
I'll tell you what, i'll lift that restriction in latest trunk and you tell me if it breaks anything or if it makes your life easier since it's not really doing much but protecting you from yourself. So with latest code you can use your one socket to send messages to the other leg too.
It seems as if I HAVE to use event socket inbound if I want to be able to send a playback command from one process or leg to the other.
Or do I have to use event socket inbound AND socket event outbound? So that fs connects to one PHP script and another PHP script connects to the fs? You wrote: "you can call inbound to event_socket and once authenticated you can issue the command myevents <uuid>". This seems to tell me, that I have to connect to the fs, right?
_______________________________________________ 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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
Hi Anthony,
I'll tell you what, i'll lift that restriction in latest trunk and you tell me if it breaks anything or if it makes your life easier since it's not really doing much but protecting you from yourself. So with latest code you can use your one socket to send messages to the other leg too.
A request from dumb and paranoid over here - could you add a config variable to control this behaviour which is defaulted to keep behaviour as it is - i.e. the restriction only gets lifted if the switch is configured in that way? Cheers -- Dave
2008/10/23 Anthony Minessale <anthony.minessale@gmail.com>: Please do not lose patience with me. I am absolutely new to the whole sip-/phone-/call-thing...
What messages do you want to send? Be Specific.
For example I want to send the message "playfile" from one process to another (the call_direction outbound should send this message to the call_direction inbound).
Like i said you CANNOT blindly call sendmsg on any channel that was not first parked to indicate you should be controlling it.
This is a point I do not understand. If two persons are talking to each other, #1 (call_direction inbound) called #2 (call_direction outbound), and #2 presses a key to play a file for #1, I see no way to do so, because session #2 can not talk to session #1 (at least not send a playfile message), when I use event socket outbound. When both persons are connected to each other, how can I park #1 to send a message to #1 from #2?
Probably if you explain *exactly* what you want to accomplish there is some simple way to do it.
Ok, then I will try to be a little more precise: 1.) I would like to use event socket outbound, because I have a good PHP script, which works well and automatically forks a new PHP process for each call/leg. If one of theses processes dies because of some problems, all other calls are not affected. I have some problems to thing the other way round and switch to event socket inbound. Therefore I would prefer to keep the current PHP script. 2.) I have NO dialplan or something like this! I want to tell fs what to over my PHP scripts. 3.) I want fs to come and tell my PHP script, if there are new events. After that, my PHP script tells fs what to do. Then fs tells me, that it has done what it should, I tell, what to do next. Here is a detailed example: 1.) fs is connected to my PHP socket-script (not the other way round). 2.) The PHP socket-script registers to "myevents" and "event SESSION_HEARTBEAT". 3.) fs comes with an event and tells, that someone is calling/ringing. The PHP socket-script forks a new PHP process (p #1), which handles this call. Then I tell fs to answer (sendmsg answer) and to play a soundfile for the caller (call_direction inbound). sendmsg call-command: execute execute-app-name: playback execute-app-arg: /var/www/freeswitch/hello.wav 4.) The caller knows, that if he presses the 1 digit, he will be connected to a target. 5.) fs tells me, that the call_direction inbound pressed the 1 (event_name:DTMF, dtmf_digit:1). 6.) I tell fs to originate to a target. I do not want to bridge! I want to control everything for different reasons. api originate {origination_caller_id_number=1234567,inbound_uuid=".$event['Unique-ID']."}sofia/internal/1001@192.168.1.5 123 I pass the uuid of the call_direction inbound/caller to the call_direction outbound/target, so that the call_direction outbound knows the uuid of the call_direction inbound (to hopefully send messages to the process of the call_direction inbound). 7.) The target ansers the call, but the call_direction inbound and the call_direction outbound are not connected (which is good) The PHP socket-scripts forks a new PHP process (p #2), which handles the call_direction outbound/target. Now I have two calls and two PHP processes. Now the problems are coming up.... I want thecall_direction outbound to be able to press a digit and to start a playback for the call_direction inbound/caller. Because I passed the uuid of the call_direction inbound to the call_direction outbound, the call_direction outbound knows the uuid and could use this uuid to send a message to it. But I can not use sendmsg uuid to do that. I would like to send from p #2 (call_direction outbound)... sendmsg 1dca106c-a10c-11dd-b986-d5cdf6924ae6 (which is the uuid of the call_direction inbound in p #1) call-command: execute execute-app-name: playback execute-app-arg: /var/www/freeswitch/again_hello.wav ... so that the call_direction inbound (in p #1) can hear the again_hello.wav. Instead, the uuid is ignored and the file is playback for the call_direction outbound (in p #2). The call with the uuid 1dca106c-a10c-11dd-b986-d5cdf6924ae6 will not hear anything. I hope this example was a little bit better to understand than my other examples.
I'll tell you what, i'll lift that restriction in latest trunk and you tell me if it breaks anything or if it makes your life easier since it's not really doing much but protecting you from yourself. So with latest code you can use your one socket to send messages to the other leg too.
That sounds interesting, at least to find out, where my problems are. I just donwloaded the latest trunk, but the szenario described above stays the same. If I send... sendmsg 1dca106c-a10c-11dd-b986-d5cdf6924ae6 (which is the uuid of the caller/inbound in p #1) call-command: execute execute-app-name: playback execute-app-arg: /var/www/freeswitch/again_hello.wav ...the file will still be played back for the target/outbound. Thanks again for your patience Dennis
What does 123 lead to? launching another script? you could make the 2nd originate lead to &park() in place of 123 and you could control both legs from the same socket. please please join irc and let the whole group help you. On Thu, Oct 23, 2008 at 10:02 AM, Dennis <odermann@googlemail.com> wrote:
2008/10/23 Anthony Minessale <anthony.minessale@gmail.com>:
Please do not lose patience with me. I am absolutely new to the whole sip-/phone-/call-thing...
What messages do you want to send? Be Specific.
For example I want to send the message "playfile" from one process to another (the call_direction outbound should send this message to the call_direction inbound).
Like i said you CANNOT blindly call sendmsg on any channel that was not first parked to indicate you should be controlling it.
This is a point I do not understand. If two persons are talking to each other, #1 (call_direction inbound) called #2 (call_direction outbound), and #2 presses a key to play a file for #1, I see no way to do so, because session #2 can not talk to session #1 (at least not send a playfile message), when I use event socket outbound. When both persons are connected to each other, how can I park #1 to send a message to #1 from #2?
Probably if you explain *exactly* what you want to accomplish there is some simple way to do it.
Ok, then I will try to be a little more precise:
1.) I would like to use event socket outbound, because I have a good PHP script, which works well and automatically forks a new PHP process for each call/leg. If one of theses processes dies because of some problems, all other calls are not affected. I have some problems to thing the other way round and switch to event socket inbound. Therefore I would prefer to keep the current PHP script.
2.) I have NO dialplan or something like this! I want to tell fs what to over my PHP scripts.
3.) I want fs to come and tell my PHP script, if there are new events. After that, my PHP script tells fs what to do. Then fs tells me, that it has done what it should, I tell, what to do next.
Here is a detailed example:
1.) fs is connected to my PHP socket-script (not the other way round).
2.) The PHP socket-script registers to "myevents" and "event SESSION_HEARTBEAT".
3.) fs comes with an event and tells, that someone is calling/ringing. The PHP socket-script forks a new PHP process (p #1), which handles this call. Then I tell fs to answer (sendmsg answer) and to play a soundfile for the caller (call_direction inbound).
sendmsg call-command: execute execute-app-name: playback execute-app-arg: /var/www/freeswitch/hello.wav
4.) The caller knows, that if he presses the 1 digit, he will be connected to a target.
5.) fs tells me, that the call_direction inbound pressed the 1 (event_name:DTMF, dtmf_digit:1).
6.) I tell fs to originate to a target. I do not want to bridge! I want to control everything for different reasons.
api originate {origination_caller_id_number=1234567,inbound_uuid=".$event['Unique-ID']."}sofia/internal/ 1001@192.168.1.5 123
I pass the uuid of the call_direction inbound/caller to the call_direction outbound/target, so that the call_direction outbound knows the uuid of the call_direction inbound (to hopefully send messages to the process of the call_direction inbound).
7.) The target ansers the call, but the call_direction inbound and the call_direction outbound are not connected (which is good) The PHP socket-scripts forks a new PHP process (p #2), which handles the call_direction outbound/target.
Now I have two calls and two PHP processes.
Now the problems are coming up....
I want thecall_direction outbound to be able to press a digit and to start a playback for the call_direction inbound/caller. Because I passed the uuid of the call_direction inbound to the call_direction outbound, the call_direction outbound knows the uuid and could use this uuid to send a message to it.
But I can not use sendmsg uuid to do that. I would like to send from p #2 (call_direction outbound)...
sendmsg 1dca106c-a10c-11dd-b986-d5cdf6924ae6 (which is the uuid of the call_direction inbound in p #1) call-command: execute execute-app-name: playback execute-app-arg: /var/www/freeswitch/again_hello.wav
... so that the call_direction inbound (in p #1) can hear the again_hello.wav.
Instead, the uuid is ignored and the file is playback for the call_direction outbound (in p #2). The call with the uuid 1dca106c-a10c-11dd-b986-d5cdf6924ae6 will not hear anything.
I hope this example was a little bit better to understand than my other examples.
I'll tell you what, i'll lift that restriction in latest trunk and you tell me if it breaks anything or if it makes your life easier since it's not really doing much but protecting you from yourself. So with latest code you can use your one socket to send messages to the other leg too.
That sounds interesting, at least to find out, where my problems are. I just donwloaded the latest trunk, but the szenario described above stays the same.
If I send...
sendmsg 1dca106c-a10c-11dd-b986-d5cdf6924ae6 (which is the uuid of the caller/inbound in p #1) call-command: execute execute-app-name: playback execute-app-arg: /var/www/freeswitch/again_hello.wav
...the file will still be played back for the target/outbound.
Thanks again for your patience Dennis
_______________________________________________ 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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
2008/10/23 Anthony Minessale <anthony.minessale@gmail.com>:
What does 123 lead to? launching another script?
The 123 is the destination_number in the "/dialplan/default.xml". <extension name="test"> <condition field="destination_number" expression="^123$"> <action application="set" data="hangup_after_bridge=false"/> <action application="set" data="enable_heartbeat_events=10"/> <action application="socket" data="192.168.1.5:8022 async full"/> </condition> </extension>
you could make the 2nd originate lead to &park() in place of 123
I tried that... The target of the originate rings, but as soon one answers the call, nothing else happens. No events, nothing...
and you could control both legs from the same socket.
How? What do you mean? Do you now have an idea what I am trying to do, after I described the whole thing?
please please join irc and let the whole group help you. I was there today, but it seemed, that nobody could hear/read me. I will try again tomorrow.
please please join irc and let the whole group help you. I was there today, but it seemed, that nobody could hear/read me. I will try again tomorrow.
What is your IRC nick? Mine is mercutioviz. I'm interested in this issue because I've been dialing in some somewhat similar scenarios and I might be able to help, at least a little bit. -MC
2008/10/23 Michael Collins <mcollins@fcnetwork.com>:
What is your IRC nick? Mine is mercutioviz. I'm interested in this issue because I've been dialing in some somewhat similar scenarios and I might be able to help, at least a little bit.
My nick is Dennis93. Looking forward to it.
Anybody else, who has an idea, what I could do (till I find someone in the IRC)?
question.... what args do you pass to the socket app when you call it in your dialplan. are you using the "full and async" keywords? the full one is necessary to have the power to control other calls. Could this be your prob? On Sun, Oct 26, 2008 at 5:40 AM, Dennis <odermann@googlemail.com> wrote:
Anybody else, who has an idea, what I could do (till I find someone in the IRC)?
_______________________________________________ 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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
This is what I have in my "/dialplan/default.xml": <extension name="test"> <condition field="destination_number" expression="^123$"> <action application="set" data="hangup_after_bridge=false"/> <action application="set" data="enable_heartbeat_events=10"/> <action application="socket" data="192.168.1.5:8022 async full"/> </condition> </extension> At the "192.168.1.5:8022" the PHP script is listening. The scripts forks every new call over the socket. So if I have one caller and then call the command "api originate {origination_caller_id_number=1234567,inbound_uuid=".$event['Unique-ID']."}sofia/internal/1001@... 123 " a new PHP process is startet. But this should be no problem, if it would be possible to control the inbound call in the first process from the outbound call in the second process (when using event_socket outbound). "api uuid_bridge" works for example very good, if i call it from the outbound call process. But "api uuid_playfile" does not exist and "sendmsg playfile <uuid_of_the_inbound_call> /path/file.wav" does not work, because it only seems to be available when using mod_event_socket in inbound mode. For me it is not only "playfile" which I am missing, it is also "hangup" and other commands, which seem to work in mod_socket_event in inbound mode. You said, you wanted to lift these restrictions, but they do not work for me (at least I do not know how to use it). Are there any settings I have to configure to make it work the way I need it? Be sure I will be on IRC tomorrow. Perhaps this helps to avoid missunderstandings ;-) Thanks Dennis 2008/10/26 Anthony Minessale <anthony.minessale@gmail.com>:
question.... what args do you pass to the socket app when you call it in your dialplan.
are you using the "full and async" keywords? the full one is necessary to have the power to control other calls. Could this be your prob?
one suggestion i was trying to make was. instead of originating the next call to 123 to put it in it's own script. try replacing 123 with &park() {origination_caller_id_number=1234567,inbound_uuid=".$event['Unique-ID']."}sofia/internal/1001@... &park() This will put the new call into park where it will be waiting happily for commands you can send from the original script so you would not need 2, the reply from that originate will give you the uuid of the new call if it's successful and you can then send it messages just like the other one. you can have a one to many relationship with event socket to channels it can control with 1 socket. On Sun, Oct 26, 2008 at 1:37 PM, Dennis <odermann@googlemail.com> wrote:
This is what I have in my "/dialplan/default.xml":
<extension name="test"> <condition field="destination_number" expression="^123$"> <action application="set" data="hangup_after_bridge=false"/> <action application="set" data="enable_heartbeat_events=10"/> <action application="socket" data="192.168.1.5:8022 async full"/> </condition> </extension>
At the "192.168.1.5:8022" the PHP script is listening. The scripts forks every new call over the socket. So if I have one caller and then call the command "api originate
{origination_caller_id_number=1234567,inbound_uuid=".$event['Unique-ID']."}sofia/internal/1001@ ... 123 " a new PHP process is startet. But this should be no problem, if it would be possible to control the inbound call in the first process from the outbound call in the second process (when using event_socket outbound). "api uuid_bridge" works for example very good, if i call it from the outbound call process. But "api uuid_playfile" does not exist and "sendmsg playfile <uuid_of_the_inbound_call> /path/file.wav" does not work, because it only seems to be available when using mod_event_socket in inbound mode. For me it is not only "playfile" which I am missing, it is also "hangup" and other commands, which seem to work in mod_socket_event in inbound mode.
You said, you wanted to lift these restrictions, but they do not work for me (at least I do not know how to use it). Are there any settings I have to configure to make it work the way I need it?
Be sure I will be on IRC tomorrow. Perhaps this helps to avoid missunderstandings ;-)
Thanks Dennis
2008/10/26 Anthony Minessale <anthony.minessale@gmail.com>:
question.... what args do you pass to the socket app when you call it in your dialplan.
are you using the "full and async" keywords? the full one is necessary to have the power to control other calls. Could this be your prob?
_______________________________________________ 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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
I tried &park several times and it does not work for me. The problem must be on my side and I will test it tomorrow morning again. I know that I get back the uuid of the originated call and the targeted phone is ringing, although it is not shown anywhere, that it is ringing somewhere. I get "+OK uuid". Then I remove the "+OK " and then try to work with it. The problem is the same as always: playback does not with uuid - neither in one nor in the other direction. It simply does not matter, if I send sendmsg with or without the uuid - the uuid doesn't seem to matter. 2008/10/26 Anthony Minessale <anthony.minessale@gmail.com>:
one suggestion i was trying to make was. instead of originating the next call to 123 to put it in it's own script. try replacing 123 with &park()
{origination_caller_id_number=1234567,inbound_uuid=".$event['Unique-ID']."}sofia/internal/1001@... &park()
This will put the new call into park where it will be waiting happily for commands you can send from the original script so you would not need 2, the reply from that originate will give you the uuid of the new call if it's successful and you can then send it messages just like the other one.
you can have a one to many relationship with event socket to channels it can control with 1 socket.
On Sun, Oct 26, 2008 at 1:37 PM, Dennis <odermann@googlemail.com> wrote:
This is what I have in my "/dialplan/default.xml":
<extension name="test"> <condition field="destination_number" expression="^123$"> <action application="set" data="hangup_after_bridge=false"/> <action application="set" data="enable_heartbeat_events=10"/> <action application="socket" data="192.168.1.5:8022 async full"/> </condition> </extension>
At the "192.168.1.5:8022" the PHP script is listening. The scripts forks every new call over the socket. So if I have one caller and then call the command "api originate
{origination_caller_id_number=1234567,inbound_uuid=".$event['Unique-ID']."}sofia/internal/1001@... 123 " a new PHP process is startet. But this should be no problem, if it would be possible to control the inbound call in the first process from the outbound call in the second process (when using event_socket outbound). "api uuid_bridge" works for example very good, if i call it from the outbound call process. But "api uuid_playfile" does not exist and "sendmsg playfile <uuid_of_the_inbound_call> /path/file.wav" does not work, because it only seems to be available when using mod_event_socket in inbound mode. For me it is not only "playfile" which I am missing, it is also "hangup" and other commands, which seem to work in mod_socket_event in inbound mode.
You said, you wanted to lift these restrictions, but they do not work for me (at least I do not know how to use it). Are there any settings I have to configure to make it work the way I need it?
Be sure I will be on IRC tomorrow. Perhaps this helps to avoid missunderstandings ;-)
Thanks Dennis
2008/10/26 Anthony Minessale <anthony.minessale@gmail.com>:
question.... what args do you pass to the socket app when you call it in your dialplan.
are you using the "full and async" keywords? the full one is necessary to have the power to control other calls. Could this be your prob?
_______________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org pstn:213-799-1400
_______________________________________________ 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
try latest trunk, i think i can fix you issue by allowing sendmsg to work on outside uuid even on myevents mode. On Sun, Oct 26, 2008 at 3:39 PM, Dennis <odermann@googlemail.com> wrote:
I tried &park several times and it does not work for me. The problem must be on my side and I will test it tomorrow morning again.
I know that I get back the uuid of the originated call and the targeted phone is ringing, although it is not shown anywhere, that it is ringing somewhere. I get "+OK uuid". Then I remove the "+OK " and then try to work with it.
The problem is the same as always: playback does not with uuid - neither in one nor in the other direction. It simply does not matter, if I send sendmsg with or without the uuid - the uuid doesn't seem to matter.
2008/10/26 Anthony Minessale <anthony.minessale@gmail.com>:
one suggestion i was trying to make was. instead of originating the next call to 123 to put it in it's own script. try replacing 123 with &park()
{origination_caller_id_number=1234567,inbound_uuid=".$event['Unique-ID']."}sofia/internal/1001@ ...
&park()
This will put the new call into park where it will be waiting happily for commands you can send from the original script so you would not need 2, the reply from that originate will give you the uuid of the new call if it's successful and you can then send it messages just like the other one.
you can have a one to many relationship with event socket to channels it can control with 1 socket.
On Sun, Oct 26, 2008 at 1:37 PM, Dennis <odermann@googlemail.com> wrote:
This is what I have in my "/dialplan/default.xml":
<extension name="test"> <condition field="destination_number" expression="^123$"> <action application="set" data="hangup_after_bridge=false"/> <action application="set" data="enable_heartbeat_events=10"/> <action application="socket" data="192.168.1.5:8022 async full"/> </condition> </extension>
At the "192.168.1.5:8022" the PHP script is listening. The scripts forks every new call over the socket. So if I have one caller and then call the command "api originate
{origination_caller_id_number=1234567,inbound_uuid=".$event['Unique-ID']."}sofia/internal/1001@ ...
123 " a new PHP process is startet. But this should be no problem, if it would be possible to control the inbound call in the first process from the outbound call in the second process (when using event_socket outbound). "api uuid_bridge" works for example very good, if i call it from the outbound call process. But "api uuid_playfile" does not exist and "sendmsg playfile <uuid_of_the_inbound_call> /path/file.wav" does not work, because it only seems to be available when using mod_event_socket in inbound mode. For me it is not only "playfile" which I am missing, it is also "hangup" and other commands, which seem to work in mod_socket_event in inbound mode.
You said, you wanted to lift these restrictions, but they do not work for me (at least I do not know how to use it). Are there any settings I have to configure to make it work the way I need it?
Be sure I will be on IRC tomorrow. Perhaps this helps to avoid missunderstandings ;-)
Thanks Dennis
2008/10/26 Anthony Minessale <anthony.minessale@gmail.com>:
question.... what args do you pass to the socket app when you call it in your dialplan.
are you using the "full and async" keywords? the full one is necessary to have the power to control other calls. Could this be your prob?
_______________________________________________ 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
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
_______________________________________________ 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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
Yesssss, that worked!!!! Great, thanks a lot! Now I am able to control the inbound call from the outbound call :-D As far as I understand, this has something to do with changes you made to the myevents mode, right? I think that the myevents mode is better for us, because with events all there are soooo many information which have to be parsed vom the PHP script. One more question about myevents: Is there a way to configure, which events I get with myevents? In the moment I am missing 2 very important events: 1.) "ringing": If I make an originate to 123, the target-phone itself is ringing, but I do not get to know, that it is ringing. I hoped for something like: Event-Name:CHANEL_EXECUTE, Application:ringing, Call-Direction:outbound (or Answer-State:ringing). For example this is important, if I want to let it ring for x seconds and then do something. 2.) "connected" or "call_accepted" (or something like this): If I make an originate, the target-phone is ringing, but I do not get to know, when the call is answered by pressing the green button. For example I want to wait till the originated caller lifts the phone (is ready to talk) and then play a soundfile or make an uuid_bridge. If I am registered to events all, I a lot of information (to much), but not with myevents. Any idea what I could do? Thanks again for your great help Dennis 2008/10/26 Anthony Minessale <anthony.minessale@gmail.com>:
try latest trunk, i think i can fix you issue by allowing sendmsg to work on outside uuid even on myevents mode.
participants (7)
-
Andrew Gilbert
-
Anthony Minessale
-
David Knell
-
Dennis
-
Ivan C Myrvold
-
Michael Collins
-
Michael Collins