Asterisk control goip ports

hello,

we are trying to make asterisk control GOIP ports by sending port number before dialing (for example 04 + number) will send call to port number 4 in goip, anyway, i wrote a php script to make call rotation (if call comes to port 1 and end the next call will go port 2), it works fine for small number for calls less than 5 but if concurrent call more than 5 something go wrong:

my extension

[test]
exten => _X.,1,agi(agi_live.php)
exten => h,1,agi(set_ports_down.php,${callid})

it likely the code will not reach line 2 where we set ports down.

how to force code to continue even if any error occured in line 1?

best regards

This issue is related to your PHP script, If the script works fine with less than 5 calls you should debug what change when you have more than 5

hello,

thank you for reply.

it’s not easy to monitor calls, there are currently 50 per sec. anyway, in my php code sometime not complete after execute the line or i think error will come after execute the line below

$agi->exec_dial(‘SIP’,$identifier,60,‘tTS(’.$min.’)’);

is there a way to monitor were this error happened?

Enable error reporting on the php.ini file or on your script side, also you can enable Asterisk debug