<div dir="ltr"><div>This works fine for me,</div><div><br></div><div> $dialstatus = $agi->get_variable("DIALSTATUS");</div><div> $cdr['dialstatus'] = $dialstatus['data'];</div>
<br class="Apple-interchange-newline"><div dir="ltr">Try as it is, I believe it's because of concatenation.</div><div dir="ltr"><br></div><div dir="ltr">Regards,<br>Zohair Raza<div><br></div></div><br>
<br><br><div class="gmail_quote">On Fri, Dec 2, 2011 at 4:27 PM, Tony Mountifield <span dir="ltr"><<a href="mailto:tony@softins.co.uk">tony@softins.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
In article <SNT142-W54267269808AFD17BCCD5891B60@phx.gbl>,<br>
<div class="im">Kamlesh Kumar <<a href="mailto:kamlesh_kmr@hotmail.com">kamlesh_kmr@hotmail.com</a>> wrote:<br>
> In addition to my reply:<br>
><br>
> I used to fetch the value using print_r function but that also tells that there is no value<br>
> in data section.<br>
> $dialstatus=$agi->get_variable(DIALSTATUS);<br>
> print_r($dialstatus);<br>
><br>
> <SIP/10036-000000b8>AGI Rx << GET VARIABLE DIALSTATUS<br>
> <SIP/10036-000000b8>AGI Tx >> 200 result=1 (CANCEL)<br>
> <SIP/10036-000000b8>AGI Rx << Array<br>
> <SIP/10036-000000b8>AGI Tx >> 510 Invalid or unknown command<br>
> [Dec 3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe<br>
> <SIP/10036-000000b8>AGI Rx << (<br>
> <SIP/10036-000000b8>AGI Tx >> 510 Invalid or unknown command<br>
> [Dec 3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe<br>
> <SIP/10036-000000b8>AGI Rx << [code] => 200<br>
> <SIP/10036-000000b8>AGI Tx >> 510 Invalid or unknown command<br>
> [Dec 3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe<br>
> <SIP/10036-000000b8>AGI Rx << [result] => 1<br>
> <SIP/10036-000000b8>AGI Tx >> 510 Invalid or unknown command<br>
> [Dec 3 01:18:47] ERROR[24839]: utils.c:1128 ast_carefulwrite: write() returned error: Broken pipe<br>
> <SIP/10036-000000b8>AGI Rx << [data] =><br>
<br>
</div>Well since the AGI return string does indeed contain the value, shown<br>
above as (CANCEL), that suggests there is definitely a bug in php-agi.<br>
It appears to be creating a ['data'] element, but not setting it.<br>
You will have to study the source code and work out how to fix it.<br>
I did a quick google for "php agi get variable" and found other reports<br>
of it not working properly, but I didn't see anyone offer a solution.<br>
It's only programming, so it shouldn't be hard to fix.<br>
<div class="HOEnZb"><div class="h5"><br>
Cheers<br>
Tony<br>
--<br>
Tony Mountifield<br>
Work: <a href="mailto:tony@softins.co.uk">tony@softins.co.uk</a> - <a href="http://www.softins.co.uk" target="_blank">http://www.softins.co.uk</a><br>
Play: <a href="mailto:tony@mountifield.org">tony@mountifield.org</a> - <a href="http://tony.mountifield.org" target="_blank">http://tony.mountifield.org</a><br>
<br>
--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</div></div></blockquote></div><br></div>