[Freeswitch-users] Callback through a 3rd party softswitch

Cavalera Claudio Luigi Claudio.Cavalera at italtel.it
Fri May 16 07:16:39 PDT 2008


Hello!
I've realized a simple PHP page which takes two phone numbers as input
and sends a command to fs event socket api.
I've got two flavours of it, one for softphones registered to fs and one
for real phones.

The command for softphones is something like this and it works well:
$command = "api originate
{ringback=/usr/local/freeswitch/sounds/mysound.wav}sofia/default/".$Call
er."%my_freeswitch_ip
&bridge(sofia/default/".$Callee."%my_fs_ip\r\n\r\n";
$Caller and $Callee are two softphones registered with default user
accounts such as 1000 and 1001.


Now strange things happen when I try to route the call to real phones
through my personal softswitch, the command I issue is something like
this:
$command = "api originate
{ringback=/usr/local/freeswitch/sounds/mysound.wav}sofia/default/".$Call
er."@my_softswitch_ip
&bridge(sofia/default/".$Callee."@my_softswitch_ip)\r\n\r\n";
$Caller and $Callee are two real phones connected to public network such
as my mobile phone number and my grandma home number.
Here is what's happening:
- $Caller gets called
- $Callee gets called
- any of the two answers first and hears the normal ringback tone
- the second phone answers and it works well
So in this case there is no play of mysound.wav but the two phones can
speak.

Instead if I answer $Caller before $Callee gets called (i.e. is ringing)
it just receives hang up with this message in fs log:
2008-05-16 16:05:19 [ERR] switch_core_io.c:521
switch_core_session_write_frame() sofia/default/+39.... at .... has no
write codec.

I have not configured any sip gateway yet. I'm almost sure I'm doing
wrong in the use of the command here and I need something more complex
to realize the callback through the softswitch :-)

Thanks for every hint!

Ciao,
Claudio




freeswitch-users-bounces at lists.freeswitch.org wrote:
> Yes,
> I'm trying to do 1) "Web callback" at the moment :-)
> BRs,
> Claudio



I'm sending this command through a simple php page.



api originate
{ringback=/usr/local/freeswitch/sounds/tsb/hello.wav}sofia/default/+3933
46450644 at 138.132.186.4
&bridge(sofia/default/+393477517958 at 138.132.186.4) 



> ________________________________
> 
> 	From: freeswitch-users-bounces at lists.freeswitch.org
> [mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of
> 	EdPimentl Sent: Tuesday, April 29, 2008 3:41 PM
> 	To: freeswitch-users at lists.freeswitch.org
> 	Subject: Re: [Freeswitch-users] simple fs commands taking inputs
> from awebpage 
> 
> 
> 	This is really the basis of CallBack
> 
> 	Here is what one can  do with CallBack
> 
> 	* You tell the service what telephone number you are calling
from.
> 	* You tell the service what telephone number you want to call.
> 	* The service dials both (you first) and connect the two.
> 
> 	Remember, since you are being call, it is in an inbound call to
> you, like receiving a call from a friend.
> 
> 	This is how it may/can work:
> 
> 	1) Web callback
> 
> 	You dial from your PC.
> 
> 	Log into your account page
> 
> 	* Specify the telephone number you are on.
> 	* Specify the telephone number you want to call.
> 	* Click 'make call'.
> 	* Your telephone will ring. Answer it.
> 	* The number you are calling will then ring in the usual way.
> 
> 	2) SMS callback
> 
> 	You make the call by sending a simple SMS message.
> 
> 	* Send a blank SMS message to 2125557777.
> 	* Your mobile will ring. Answer it.
> 	* When prompted, enter the number you want to call.
> 	* The number you are calling will then ring in the usual way.
> 
> 	3) Phone callback
> 
> 	You make the call by dialing the callback number.
> 
> 	* Use the dial in Web page to find the number to call from your
> location. 
> 	* Call the number and then hang up.
> 	* Your phone will ring. Answer it.
> 	* When prompted, enter the number you want to call.
> 	* The number you are calling will then ring in the usual way.
> 
> 	-E
> 	http://Mobiquity.ws
> 	http://Messagr.us
> 
> 
> 
> Internet Email Confidentiality Footer
> --------------------------------------------------------------
> ---------------------------------------
> La presente comunicazione, con le informazioni in essa
> contenute e ogni documento o file allegato, e' rivolta
> unicamente alla/e persona/e cui e' indirizzata ed alle altre
> da questa autorizzata/e a riceverla. Se non siete i
> destinatari/autorizzati siete avvisati che qualsiasi azione,
> copia, comunicazione, divulgazione o simili basate sul
> contenuto di tali informazioni e' vietata e potrebbe essere
> contro la legge (art. 616 C.P., D.Lgs n. 196/2003 Codice in
> materia di protezione dei dati personali). Se avete ricevuto
> questa comunicazione per errore, vi preghiamo di darne
> immediata notizia al mittente e di distruggere il messaggio
> originale e ogni file allegato senza farne copia alcuna o
> riprodurne in alcun modo il contenuto.
> 
> This e-mail and its attachments are intended for the
> addressee(s) only and are confidential and/or may contain
> legally privileged information. If you have received this
> message by mistake or are not one of the addressees above,
> you may take no action based on it, and you may not copy or
> show it to anyone; please reply to this e-mail and point out
> the error which has occurred.
> --------------------------------------------------------------
> ---------------------------------------
> 
> 
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freesw
> itch-users http://www.freeswitch.org





More information about the FreeSWITCH-users mailing list