Hi, I’ve this code in perl AGI:
my $tel = $AGI->get_data(‘custom/VEHICULO-TELEFONO’, 6000, 10);
$sqlfm = “UPDATE Solicitudes SET Teldigitado=$tel WHERE Idsolicitud=’$ult’”;
$rows_affected = $dbh->do($sqlfm);
$sth1->finish();
$dbh->disconnect;
$AGI->exec(‘GoTo’,‘timeconditions,1,1’);
$AGI->stream_file(‘custom/PREDIO-AMABLE’);
But I dont know why Asterisk don’t bring to another context in the dialplan. This de AGI debug:
<IAX2/3339-169>AGI Rx << GET DATA custom/VEHICULO-TELEFONO 6000 10
– <IAX2/3339-169> Playing ‘custom/VEHICULO-TELEFONO.slin’ (language ‘en’)
<IAX2/3339-169>AGI Tx >> 200 result=3118093516
<IAX2/3339-169>AGI Rx << EXEC GoTo “timeconditions,1,1”
– AGI Script Executing Application: (GoTo) Options: (timeconditions,1,1)
– Goto (timeconditions,1,1)
<IAX2/3339-169>AGI Tx >> 200 result=0
<IAX2/3339-169>AGI Rx << STREAM FILE custom/PREDIO-AMABLE “”
– <IAX2/3339-169> Playing ‘custom/PREDIO-AMABLE.slin’ (escape_digits=) (sample_offset 0) (language ‘en’)
<IAX2/3339-169>AGI Tx >> 200 result=0 endpos=25520
This the context “timeconditions” in dialplan:
[timeconditions]
exten => 1,1,Set(DB(TC/1/INUSESTATE)=INUSE)
exten => 1,n,Set(DB(TC/1/NOT_INUSESTATE)=NOT_INUSE)
exten => 1,n,GotoIfTime(08:00-12:00,sat,1-31,jan-dec?truestate)
exten => 1,n,GotoIfTime(08:00-12:00,mon-fri,1-31,jan-dec?truestate)
exten => 1,n,GotoIfTime(13:00-21:30,mon-fri,1-31,jan-dec?truestate)
…