[asterisk-users] DIALSTATUS Values

Kamlesh Kumar kamlesh_kmr at hotmail.com
Wed Jan 4 23:40:33 CST 2012


Can anybody please reply on this?
 
Regards,
Kamlesh
 



From: kamlesh_kmr at hotmail.com
To: asterisk-users at lists.digium.com
Date: Tue, 27 Dec 2011 09:49:21 +0000
Subject: Re: [asterisk-users] DIALSTATUS Values





Hello,
 
After investing some time, I could come to know the reason for not getting the data value is that if I use system command with any of asterisk cli command as given below, data value is returned blank.
 
$output=system("/usr/sbin/asterisk -rx 'sip show peers' | grep OK | cut -f 1 -d / | grep '100' ")
 
Could you please suggest now how to rectify this?
 
Regards,
Kamlesh
 


> To: asterisk-users at lists.digium.com
> From: tony at softins.co.uk
> Date: Fri, 2 Dec 2011 12:27:19 +0000
> Subject: Re: [asterisk-users] DIALSTATUS Values
> 
> In article <SNT142-W54267269808AFD17BCCD5891B60 at phx.gbl>,
> Kamlesh Kumar <kamlesh_kmr at hotmail.com> wrote:
> > In addition to my reply:
> > 
> > I used to fetch the value using print_r function but that also tells that there is no value
> > in data section.
> > $dialstatus=$agi->get_variable(DIALSTATUS);
> > print_r($dialstatus);
> > 
> > <SIP/10036-000000b8>AGI Rx << GET VARIABLE DIALSTATUS
> > <SIP/10036-000000b8>AGI Tx >> 200 result=1 (CANCEL)
> > <SIP/10036-000000b8>AGI Rx << Array
> > <SIP/10036-000000b8>AGI Tx >> 510 Invalid or unknown command
> > [Dec 3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
> > <SIP/10036-000000b8>AGI Rx << (
> > <SIP/10036-000000b8>AGI Tx >> 510 Invalid or unknown command
> > [Dec 3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
> > <SIP/10036-000000b8>AGI Rx << [code] => 200
> > <SIP/10036-000000b8>AGI Tx >> 510 Invalid or unknown command
> > [Dec 3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
> > <SIP/10036-000000b8>AGI Rx << [result] => 1
> > <SIP/10036-000000b8>AGI Tx >> 510 Invalid or unknown command
> > [Dec 3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe
> > <SIP/10036-000000b8>AGI Rx << [data] =>
> 
> Well since the AGI return string does indeed contain the value, shown
> above as (CANCEL), that suggests there is definitely a bug in php-agi.
> It appears to be creating a ['data'] element, but not setting it.
> You will have to study the source code and work out how to fix it.
> I did a quick google for "php agi get variable" and found other reports
> of it not working properly, but I didn't see anyone offer a solution.
> It's only programming, so it shouldn't be hard to fix.
> 
> Cheers
> Tony
> -- 
> Tony Mountifield
> Work: tony at softins.co.uk - http://www.softins.co.uk
> Play: tony at mountifield.org - http://tony.mountifield.org
> 
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
> http://www.asterisk.org/hello
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users

-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120105/9cc73280/attachment.htm>


More information about the asterisk-users mailing list