[Freeswitch-users] get channel status

Michael Collins mcollins at fcnetwork.com
Fri Oct 3 10:54:40 PDT 2008

To add to Brian's thought...


The "answer event" that you receive does have lots of information. You
are interested in only one piece of that information, no? You'll need to
parse the reply and grab only the line that contains "Answer-State:


Did you say that you are using PHP for this? I'm 99.9% sure that PHP can
easily parse something like this. You could probably even use a regex
sledgehammer parse by doing something like this (Perl5 regex syntax):


m/Answer-State: (\w+)/m    <== The 'm' modifier is needed because of
embedded newline chars in CHANNEL_ANSWER event


$1 will contain 'answered' or whatever the answer state value is.


Hope this helps.




From: freeswitch-users-bounces at lists.freeswitch.org
[mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of
Brian West
Sent: Friday, October 03, 2008 10:20 AM
To: freeswitch-users at lists.freeswitch.org
Subject: Re: [Freeswitch-users] get channel status


Yes if you parse the event using something like perl, ruby, php and get




On Oct 3, 2008, at 12:10 PM, Gopal krishnan wrote:

File attached

On Fri, Oct 3, 2008 at 10:36 PM, Gopal krishnan <saigop at gmail.com>



  By giving event channel_answer in telnet console I get lots of
variables, I am attaching it as a text file with this email. And my
query is for example If I want to pickup only Answer state from that
output,  is that possible?



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20081003/0a9713a0/attachment-0002.html 

More information about the FreeSWITCH-users mailing list