VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
odermann at googlemail... Guest
|
|
Back to top |
|
|
anthony.minessale at g... Guest
|
Posted: Sun Oct 26, 2008 11:35 am Post subject: [Freeswitch-users] Socket inbound or outbound with PHP? |
|
|
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 (odermann@googlemail.com)> wrote:
--
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
AIM: anthm
MSN:anthony_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400 |
|
Back to top |
|
|
odermann at googlemail... Guest
|
Posted: Sun Oct 26, 2008 1:48 pm Post subject: [Freeswitch-users] Socket inbound or outbound with PHP? |
|
|
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>:
Quote: | 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 |
|
Back to top |
|
|
anthony.minessale at g... Guest
|
Posted: Sun Oct 26, 2008 2:05 pm Post subject: [Freeswitch-users] Socket inbound or outbound with PHP? |
|
|
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 (odermann@googlemail.com)> wrote:
Quote: | 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 (anthony.minessale@gmail.com)>:
Quote: | 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 (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 ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400 |
|
Back to top |
|
|
odermann at googlemail... Guest
|
Posted: Sun Oct 26, 2008 3:47 pm Post subject: [Freeswitch-users] Socket inbound or outbound with PHP? |
|
|
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>:
Quote: | 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:
Quote: |
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>:
Quote: | 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
|
_______________________________________________
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 |
|
Back to top |
|
|
anthony.minessale at g... Guest
|
Posted: Sun Oct 26, 2008 4:18 pm Post subject: [Freeswitch-users] Socket inbound or outbound with PHP? |
|
|
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 (odermann@googlemail.com)> wrote:
Quote: | 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 (anthony.minessale@gmail.com)>:
Quote: | 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 (odermann@googlemail.com)> wrote:
Quote: |
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 (anthony.minessale@gmail.com)>:
Quote: | 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 (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 ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (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 (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 ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400 |
|
Back to top |
|
|
odermann at googlemail... Guest
|
Posted: Mon Oct 27, 2008 7:14 am Post subject: [Freeswitch-users] Socket inbound or outbound with PHP? |
|
|
Yesssss, that worked!!!! Great, thanks a lot! Now I am able to control
the inbound call from the outbound call
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>:
Quote: | try latest trunk, i think i can fix you issue by allowing sendmsg to work on
outside uuid even on myevents mode.
|
_______________________________________________
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 |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|