Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] Bridging from Event Socket API


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
klaus.teller at gmx.net
Guest





PostPosted: Tue Dec 02, 2008 10:18 pm    Post subject: [Freeswitch-users] Bridging from Event Socket API Reply with quote

Hi Folks,

so far i could understand how to bridge calls with Javascript. I'm trying to do the same with Java via the Socket Interface. My first trials weren't successful. maybe you can help me understand what is goin on.

What i want to do is to bridge an existing leg (Unique-ID is known) to a party that wasn't yet dialed (Unique-ID unknown). With javascript it is something like:

session.bridge("sofia/internal/1002");

How do i do this using the event socket interface? what application/command would i use with which arguments?


One way i tried to do this is to orginate a call to 'sofia/internal/1002' and bridge the two existing legs using uuid_bridge. Unfortunately, it wasn't successful. The only message i had on the FS console is:

2008-12-02 16:57:34 [DEBUG] switch_core_session.c:693 switch_core_session_queue_private_event() Send signal sofia/internal/1001@192.168.1.121 [BREAK]

Any idea what i'm missing?

Thanks,

Klaus.





--
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger

_______________________________________________
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
msc at freeswitch.org
Guest





PostPosted: Tue Dec 02, 2008 11:41 pm    Post subject: [Freeswitch-users] Bridging from Event Socket API Reply with quote

You probably have several options depending upon your needs. Could you elaborate a bit on what the big picture is? Also, what exactly were you doing when you established the second call leg? Did the second call let get created and a valid uuid assigned, etc.? Just checking.

Let us know,
MC

On Tue, Dec 2, 2008 at 7:15 PM, Klaus Teller <klaus.teller@gmx.net (klaus.teller@gmx.net)> wrote:
Quote:
Hi Folks,

so far i could understand how to bridge calls with Javascript. I'm trying to do the same with Java via the Socket Interface. My first trials weren't successful. maybe you can help me understand what is goin on.

What i want to do is to bridge an existing leg (Unique-ID is known) to a party that wasn't yet dialed (Unique-ID unknown). With javascript it is something like:

session.bridge("sofia/internal/1002");

How do i do this using the event socket interface? what application/command would i use with which arguments?


One way i tried to do this is to orginate a call to 'sofia/internal/1002' and bridge the two existing legs using uuid_bridge. Unfortunately, it wasn't successful. The only message i had on the FS console is:

2008-12-02 16:57:34 [DEBUG] switch_core_session.c:693 switch_core_session_queue_private_event() Send signal sofia/internal/1001@192.168.1.121 (1001@192.168.1.121) [BREAK]

Any idea what i'm missing?

Thanks,

Klaus.





--
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger

_______________________________________________
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
Back to top
dave at 3c.co.uk
Guest





PostPosted: Wed Dec 03, 2008 6:19 am    Post subject: [Freeswitch-users] Bridging from Event Socket API Reply with quote

Hi Klaus,

Some Perl code snippets - we use:
call_command("bridge", "sofia/gateway/bt/$ntd");
which, in turn, is:
sub call_command($$) {
my $cmd = shift;
my $arg = shift;
print $sock "sendmsg\ncall-command: execute\nexecute-app-name:
$cmd\nexecute-app-arg: $arg\n\n";
}

Cheers --

Dave

Quote:
Hi Folks,

so far i could understand how to bridge calls with Javascript. I'm trying to do the same with Java via the Socket Interface. My first trials weren't successful. maybe you can help me understand what is goin on.

What i want to do is to bridge an existing leg (Unique-ID is known) to a party that wasn't yet dialed (Unique-ID unknown). With javascript it is something like:

session.bridge("sofia/internal/1002");

How do i do this using the event socket interface? what application/command would i use with which arguments?


One way i tried to do this is to orginate a call to 'sofia/internal/1002' and bridge the two existing legs using uuid_bridge. Unfortunately, it wasn't successful. The only message i had on the FS console is:

2008-12-02 16:57:34 [DEBUG] switch_core_session.c:693 switch_core_session_queue_private_event() Send signal sofia/internal/1001@192.168.1.121 [BREAK]

Any idea what i'm missing?

Thanks,

Klaus.








--
David Knell, Director, 3C Limited
T: 020 8114 8901 F: 020 3002 7257 M: 001 415 630 3031
http://www.3c.co.uk


_______________________________________________
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
klaus.teller at gmx.net
Guest





PostPosted: Wed Dec 03, 2008 9:58 am    Post subject: [Freeswitch-users] Bridging from Event Socket API Reply with quote

Hi All,

Thanks for your feedback. I must be doing something fundamentally wrong. Inbound socket is working without problems. But the exact things that i do on inbound socket, i'm not able to replcate them on outbound socket.

The global picture: I have on Xlite registered at extension 1002 and another one at extension 1003. Then i have an extension 8998 in the default context. Here is the extension definition:

<extension name="outbound-test">
<condition field="destination_number" expression="^8998$" >
<action application="socket" data="192.168.50.56:10000 full" />
</condition>
</extension>

I use Xlite-1003 to call this extension (8998) and the call is properly notified to the remote Java server.

Then on the Java side, after receiving the event, i send a CONNECT command: "Connect\n\n"
The answer from Freeswitch is the state of the channel ( a set of variable, value pair).

Up to this point everything seems normal to me. But then, i try to send an answer command:

sendmsg b30a2d2e-c146-11dd-9b99-07347b46e4ea
call-command: execute
execute-app-name: answer
execute-app-arg:

Freswitch replies with:

Content-Type: command/reply
Reply-Text: +OK

But the call is still not answered. Nothing happens on the freeswitch console (Log level DEBUG) and the dialing XLite is still in calling modus.

Then i try bridging the call to 1002:

sendmsg b30a2d2e-c146-11dd-9b99-07347b46e4ea
call-command: execute
execute-app-name: bridge
execute-app-arg: sofia/internal/1002%192.168.50.94

Again Freeswitch does answer with:

Content-Type: command/reply
Reply-Text: +OK

And yet again, nothing is really happening.

What am i missing here?

Thanks,
Klaus.

-------- Original-Nachricht --------
Quote:
Datum: Wed, 03 Dec 2008 11:15:57 +0000
Von: David Knell <dave@3c.co.uk>
An: freeswitch-users@lists.freeswitch.org
Betreff: Re: [Freeswitch-users] Bridging from Event Socket API

Quote:
Hi Klaus,

Some Perl code snippets - we use:
call_command("bridge", "sofia/gateway/bt/$ntd");
which, in turn, is:
sub call_command($$) {
my $cmd = shift;
my $arg = shift;
print $sock "sendmsg\ncall-command: execute\nexecute-app-name:
$cmd\nexecute-app-arg: $arg\n\n";
}

Cheers --

Dave

Quote:
Hi Folks,

so far i could understand how to bridge calls with Javascript. I'm
trying to do the same with Java via the Socket Interface. My first trials
weren't successful. maybe you can help me understand what is goin on.
Quote:

What i want to do is to bridge an existing leg (Unique-ID is known) to a
party that wasn't yet dialed (Unique-ID unknown). With javascript it is
something like:
Quote:

session.bridge("sofia/internal/1002");

How do i do this using the event socket interface? what
application/command would i use with which arguments?
Quote:


One way i tried to do this is to orginate a call to
'sofia/internal/1002' and bridge the two existing legs using uuid_bridge. Unfortunately, it
wasn't successful. The only message i had on the FS console is:
Quote:

2008-12-02 16:57:34 [DEBUG] switch_core_session.c:693
switch_core_session_queue_private_event() Send signal sofia/internal/1001@192.168.1.121
[BREAK]
Quote:

Any idea what i'm missing?

Thanks,

Klaus.








--
David Knell, Director, 3C Limited
T: 020 8114 8901 F: 020 3002 7257 M: 001 415 630 3031
http://www.3c.co.uk


_______________________________________________
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

--
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger

_______________________________________________
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
dave at 3c.co.uk
Guest





PostPosted: Wed Dec 03, 2008 11:39 am    Post subject: [Freeswitch-users] Bridging from Event Socket API Reply with quote

Hi Klaus,

There's two differences that I can see between what you're doing and what we do:-
1. We're using the socket in async mode (shouldn't make any difference)
2. You don't need to send the UUID in after the sendmsg - FS already knows which call you're controlling.

Cheers --

Dave
Quote:
Quote:
Hi All,

Thanks for your feedback. I must be doing something fundamentally wrong. Inbound socket is working without problems. But the exact things that i do on inbound socket, i'm not able to replcate them on outbound socket.

The global picture: I have on Xlite registered at extension 1002 and another one at extension 1003. Then i have an extension 8998 in the default context. Here is the extension definition:

<extension name="outbound-test">
<condition field="destination_number" expression="^8998$" >
<action application="socket" data="192.168.50.56:10000 full" />
</condition>
</extension>

I use Xlite-1003 to call this extension (8998) and the call is properly notified to the remote Java server.

Then on the Java side, after receiving the event, i send a CONNECT command: "Connect\n\n"
The answer from Freeswitch is the state of the channel ( a set of variable, value pair).

Up to this point everything seems normal to me. But then, i try to send an answer command:

sendmsg b30a2d2e-c146-11dd-9b99-07347b46e4ea
call-command: execute
execute-app-name: answer
execute-app-arg:

Freswitch replies with:

Content-Type: command/reply
Reply-Text: +OK

But the call is still not answered. Nothing happens on the freeswitch console (Log level DEBUG) and the dialing XLite is still in calling modus.

Then i try bridging the call to 1002:

sendmsg b30a2d2e-c146-11dd-9b99-07347b46e4ea
call-command: execute
execute-app-name: bridge
execute-app-arg: sofia/internal/1002%192.168.50.94

Again Freeswitch does answer with:

Content-Type: command/reply
Reply-Text: +OK

And yet again, nothing is really happening.

What am i missing here?

Thanks,
Klaus.

-------- Original-Nachricht --------
Quote:
Datum: Wed, 03 Dec 2008 11:15:57 +0000
Von: David Knell <dave@3c.co.uk> (dave@3c.co.uk)
An: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)
Betreff: Re: [Freeswitch-users] Bridging from Event Socket API

Quote:
Hi Klaus,

Some Perl code snippets - we use:
call_command("bridge", "sofia/gateway/bt/$ntd");
which, in turn, is:
sub call_command($$) {
my $cmd = shift;
my $arg = shift;
print $sock "sendmsg\ncall-command: execute\nexecute-app-name:
$cmd\nexecute-app-arg: $arg\n\n";
}

Cheers --

Dave

Quote:
Hi Folks,

so far i could understand how to bridge calls with Javascript. I'm
trying to do the same with Java via the Socket Interface. My first trials
weren't successful. maybe you can help me understand what is goin on.
Quote:
What i want to do is to bridge an existing leg (Unique-ID is known) to a
party that wasn't yet dialed (Unique-ID unknown). With javascript it is
something like:
Quote:
session.bridge("sofia/internal/1002");

How do i do this using the event socket interface? what
application/command would i use with which arguments?
Quote:
Datum: Wed, 03 Dec 2008 11:15:57 +0000
Von: David Knell <dave@3c.co.uk> (dave@3c.co.uk)
An: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)
Betreff: Re: [Freeswitch-users] Bridging from Event Socket API
0 Datum: Wed, 03 Dec 2008 11:15:57 +0000
Von: David Knell <dave@3c.co.uk> (dave@3c.co.uk)
An: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)
Betreff: Re: [Freeswitch-users] Bridging from Event Socket API
1
Quote:
Quote:
Datum: Wed, 03 Dec 2008 11:15:57 +0000
Von: David Knell <dave@3c.co.uk> (dave@3c.co.uk)
An: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)
Betreff: Re: [Freeswitch-users] Bridging from Event Socket API
2 Datum: Wed, 03 Dec 2008 11:15:57 +0000
Von: David Knell <dave@3c.co.uk> (dave@3c.co.uk)
An: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)
Betreff: Re: [Freeswitch-users] Bridging from Event Socket API
3
Quote:
Quote:
Datum: Wed, 03 Dec 2008 11:15:57 +0000
Von: David Knell <dave@3c.co.uk> (dave@3c.co.uk)
An: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)
Betreff: Re: [Freeswitch-users] Bridging from Event Socket API
4 Datum: Wed, 03 Dec 2008 11:15:57 +0000
Von: David Knell <dave@3c.co.uk> (dave@3c.co.uk)
An: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)
Betreff: Re: [Freeswitch-users] Bridging from Event Socket API
5 Datum: Wed, 03 Dec 2008 11:15:57 +0000
Von: David Knell <dave@3c.co.uk> (dave@3c.co.uk)
An: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)
Betreff: Re: [Freeswitch-users] Bridging from Event Socket API
6 Datum: Wed, 03 Dec 2008 11:15:57 +0000
Von: David Knell <dave@3c.co.uk> (dave@3c.co.uk)
An: freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org)
Betreff: Re: [Freeswitch-users] Bridging from Event Socket API
7
Back to top
klaus.teller at gmx.net
Guest





PostPosted: Wed Dec 03, 2008 11:57 am    Post subject: [Freeswitch-users] Bridging from Event Socket API Reply with quote

Quote:

2. You don't need to send the UUID in after the sendmsg - FS already
knows which call you're controlling.


Bingo! That was it.

Thanks,
Klaus.
--
Sensationsangebot verlängert: GMX FreeDSL - Telefonanschluss + DSL
für nur 16,37 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K1308T4569a

_______________________________________________
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
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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

VoiceMeUp - Corporate & Wholesale VoIP Services