Hi there, I am new to FreeSwitch, and I have a question to ask. If I want to read the RTP package (data from a person picking up a phone and speak or an answer machine) in C++ or C#, what function should I call to get it? Currently I can make a call to a phone and play an audio. Thanks in advance. Frankie ____________________________________________________________________________________ Never miss an email again! Yahoo! Toolbar alerts you the instant new Mail arrives. http://tools.search.yahoo.com/toolbar/features/mail/
You want a media bug. It registers a callback to your module where FS will decode the data and pass it to your module. You can then process it, and even modify it if you wish. API Documentation is on http://docs.freeswitch.org/ at Modules -> Core Library -> Media Bugs -Steve On 9 February 2011 10:45, Frankie Yiu <yky1628@yahoo.com> wrote:
Hi there,
I am new to FreeSwitch, and I have a question to ask.
If I want to read the RTP package (data from a person picking up a phone and speak or an answer machine) in C++ or C#, what function should I call to get it? Currently I can make a call to a phone and play an audio.
Thanks in advance.
Frankie
------------------------------ Food fight?<http://answers.yahoo.com/dir/index;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx?link=ask&sid=396545367>Enjoy some healthy debate in the Yahoo! Answers Food & Drink Q&A.<http://answers.yahoo.com/dir/index;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx?link=ask&sid=396545367>
_______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
The buffer will contain audio in L16 format. -Steve On 9 February 2011 10:50, Steven Ayre <steveayre@gmail.com> wrote:
You want a media bug. It registers a callback to your module where FS will decode the data and pass it to your module. You can then process it, and even modify it if you wish.
API Documentation is on http://docs.freeswitch.org/ at Modules -> Core Library -> Media Bugs
-Steve
On 9 February 2011 10:45, Frankie Yiu <yky1628@yahoo.com> wrote:
Hi there,
I am new to FreeSwitch, and I have a question to ask.
If I want to read the RTP package (data from a person picking up a phone and speak or an answer machine) in C++ or C#, what function should I call to get it? Currently I can make a call to a phone and play an audio.
Thanks in advance.
Frankie
------------------------------ Food fight?<http://answers.yahoo.com/dir/index;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx?link=ask&sid=396545367>Enjoy some healthy debate in the Yahoo! Answers Food & Drink Q&A.<http://answers.yahoo.com/dir/index;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx?link=ask&sid=396545367>
_______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
After an upgrade to the latest freeswitch version (FreeSWITCH Version 1.0.head (git-9c40e8e 2011-03-16 20-50-32 -0500)) we have a problem that sessions are not properly closed after a call. To reproduce the error we can use the following dialplan: <extension name="socket"> <condition field="destination_number" expression="^(\d{5,20})$"> <action application="set" data="transfer_ringback=%(1000, 4000, 425.0, 425.0)" /> <action application="set" data="ringback=%(1000, 4000, 425.0, 425.0)" /> <action application="set" data="continue_on_fail=true" /> <action application="set" data="ignore_early_media=true" /> <action application="set" data="hangup_after_bridge=true" /> <action application="set" data="anonymous_call=${privacy_hide_number}" /> <action application="set" data="default_language=de" /> <action application="socket" data="127.0.0.1:8025 async full" /> <action application="log" data="DEBUG Back from Socket"/> </condition> </extension> To simulate the server we can use nc. We start it with nc –l –p 8025 and then initiate a test call. On the nc command line we then type the following commands: connect myevents sendmsg call-command: execute execute-app-name: answer sendmsg call-command: execute execute-app-name: hangup exit When we execute after the call „show channels“ on the freeswitch CLI, we can see that the channels are hanging in „CS_REPORTING STATE“: uuid,direction,created,created_epoch,name,state,cid_name,cid_num,ip_addr,dest,application,application_data,dialplan,context,read_codec,read_rate,read_bit_rate,write_codec,write_rate,write_bit_rate,secure,hostname,presence_id,presence_data,callstate,callee_name,callee_num,callee_direction,call_uuid 66e3c608-50b9-11e0-adad-db99c44ff3d1,inbound,2011-03-17 18:10:04,1300381804,FreeTDM/1:1/02214006783109,CS_REPORTING,,22155400323,,02214006783109,socket,127.0.0.1:8025 async full,XML,default,PCMA,8000,64000,PCMA,8000,64000,,VOXBACKCGN001,,,HANGUP,,,, a6cc3aac-50b9-11e0-adaf-db99c44ff3d1,inbound,2011-03-17 18:11:51,1300381911,FreeTDM/1:3/02214006783109,CS_REPORTING,,22155400323,,02214006783109,hangup,,XML,default,PCMA,8000,64000,PCMA,8000,64000,,VOXBACKCGN001,,,HANGUP,,,, If we do not send „myevents“ the channel is closed correctly after the hangup. We upgraded from FreeSWITCH Version 1.0.head (git-10d696e 2011-02-02 00-01-38 -0500), with this version we did not have that problem, the channel was closed correctly after the call. Any help would be appreciated Markus
update to latest GIT and try not to report bugs to the mailing list. On Thu, Mar 17, 2011 at 12:37 PM, mbo <mbodbg@gmx.net> wrote:
After an upgrade to the latest freeswitch version (FreeSWITCH Version 1.0.head (git-9c40e8e 2011-03-16 20-50-32 -0500)) we have a problem that sessions are not properly closed after a call. To reproduce the error we can use the following dialplan:
<extension name="socket"> <condition field="destination_number" expression="^(\d{5,20})$"> <action application="set" data="transfer_ringback=%(1000, 4000, 425.0, 425.0)" /> <action application="set" data="ringback=%(1000, 4000, 425.0, 425.0)" /> <action application="set" data="continue_on_fail=true" /> <action application="set" data="ignore_early_media=true" /> <action application="set" data="hangup_after_bridge=true" /> <action application="set" data="anonymous_call=${privacy_hide_number}" /> <action application="set" data="default_language=de" /> <action application="socket" data="127.0.0.1:8025 async full" /> <action application="log" data="DEBUG Back from Socket"/> </condition> </extension>
To simulate the server we can use nc. We start it with nc –l –p 8025 and then initiate a test call. On the nc command line we then type the following commands:
connect
myevents
sendmsg call-command: execute execute-app-name: answer
sendmsg call-command: execute execute-app-name: hangup
exit
When we execute after the call „show channels“ on the freeswitch CLI, we can see that the channels are hanging in „CS_REPORTING STATE“:
uuid,direction,created,created_epoch,name,state,cid_name,cid_num,ip_addr,dest,application,application_data,dialplan,context,read_codec,read_rate,read_bit_rate,write_codec,write_rate,write_bit_rate,secure,hostname,presence_id,presence_data,callstate,callee_name,callee_num,callee_direction,call_uuid 66e3c608-50b9-11e0-adad-db99c44ff3d1,inbound,2011-03-17 18:10:04,1300381804,FreeTDM/1:1/02214006783109,CS_REPORTING,,22155400323,,02214006783109,socket,127.0.0.1:8025 async full,XML,default,PCMA,8000,64000,PCMA,8000,64000,,VOXBACKCGN001,,,HANGUP,,,, a6cc3aac-50b9-11e0-adaf-db99c44ff3d1,inbound,2011-03-17 18:11:51,1300381911,FreeTDM/1:3/02214006783109,CS_REPORTING,,22155400323,,02214006783109,hangup,,XML,default,PCMA,8000,64000,PCMA,8000,64000,,VOXBACKCGN001,,,HANGUP,,,,
If we do not send „myevents“ the channel is closed correctly after the hangup. We upgraded from FreeSWITCH Version 1.0.head (git-10d696e 2011-02-02 00-01-38 -0500), with this version we did not have that problem, the channel was closed correctly after the call.
Any help would be appreciated
Markus
_______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire 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 googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
I think bug was just resolved in latest git (minutes ago). Update and try again. /Peter ________________________________________ Från: freeswitch-dev-bounces@lists.freeswitch.org [freeswitch-dev-bounces@lists.freeswitch.org] för mbo [mbodbg@gmx.net] Skickat: den 17 mars 2011 18:37 Till: freeswitch-dev@lists.freeswitch.org Ämne: [Freeswitch-dev] Calls are hanging in State CS_REPORTING when processing call via mod_event_socket After an upgrade to the latest freeswitch version (FreeSWITCH Version 1.0.head (git-9c40e8e 2011-03-16 20-50-32 -0500)) we have a problem that sessions are not properly closed after a call. To reproduce the error we can use the following dialplan: <extension name="socket"> <condition field="destination_number" expression="^(\d{5,20})$"> <action application="set" data="transfer_ringback=%(1000, 4000, 425.0, 425.0)" /> <action application="set" data="ringback=%(1000, 4000, 425.0, 425.0)" /> <action application="set" data="continue_on_fail=true" /> <action application="set" data="ignore_early_media=true" /> <action application="set" data="hangup_after_bridge=true" /> <action application="set" data="anonymous_call=${privacy_hide_number}" /> <action application="set" data="default_language=de" /> <action application="socket" data="127.0.0.1:8025 async full" /> <action application="log" data="DEBUG Back from Socket"/> </condition> </extension> To simulate the server we can use nc. We start it with nc –l –p 8025 and then initiate a test call. On the nc command line we then type the following commands: connect myevents sendmsg call-command: execute execute-app-name: answer sendmsg call-command: execute execute-app-name: hangup exit When we execute after the call „show channels“ on the freeswitch CLI, we can see that the channels are hanging in „CS_REPORTING STATE“: uuid,direction,created,created_epoch,name,state,cid_name,cid_num,ip_addr,dest,application,application_data,dialplan,context,read_codec,read_rate,read_bit_rate,write_codec,write_rate,write_bit_rate,secure,hostname,presence_id,presence_data,callstate,callee_name,callee_num,callee_direction,call_uuid 66e3c608-50b9-11e0-adad-db99c44ff3d1,inbound,2011-03-17 18:10:04,1300381804,FreeTDM/1:1/02214006783109,CS_REPORTING,,22155400323,,02214006783109,socket,127.0.0.1:8025 async full,XML,default,PCMA,8000,64000,PCMA,8000,64000,,VOXBACKCGN001,,,HANGUP,,,, a6cc3aac-50b9-11e0-adaf-db99c44ff3d1,inbound,2011-03-17 18:11:51,1300381911,FreeTDM/1:3/02214006783109,CS_REPORTING,,22155400323,,02214006783109,hangup,,XML,default,PCMA,8000,64000,PCMA,8000,64000,,VOXBACKCGN001,,,HANGUP,,,, If we do not send „myevents“ the channel is closed correctly after the hangup. We upgraded from FreeSWITCH Version 1.0.head (git-10d696e 2011-02-02 00-01-38 -0500), with this version we did not have that problem, the channel was closed correctly after the call. Any help would be appreciated Markus _______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org !DSPAM:4d82471832765713110334!
participants (5)
-
Anthony Minessale
-
Frankie Yiu
-
mbo
-
Peter Olsson
-
Steven Ayre