简体   繁体   中英

Asterisk 13 , agi 'DIALSTATUS' not work

i was setup a new Rasperry Pi 3 Plus with Stretch, php7 and Asterisk 13 via apt-get etc...

so i have a problem with that

 $agi->get_variable('DIALSTATUS');

i got a no usefull data

some like this with print_r

Array([code] => 200,[result] => 1,[data] =>)

or i get

 Array([code] => 510,[result] => -1,[data] =>)

is there is fix for that or is phpagi for Asterisk 13 obsolet in some Funktions?

On my old Working Pi with Jessy and Asterisk 11.13.1 ist that working for me.

<SIP/2000-0000006c>AGI Tx >> 200 result=-1
<SIP/2000-0000006c>AGI Rx << GET VARIABLE DIALSTATUS
<SIP/2000-0000006c>AGI Tx >> 200 result=1 (ANSWER)
<SIP/2000-0000006c>AGI Rx << DialStatus : Invalid or unknown command 
<SIP/2000-0000006c>AGI Rx << print_r : Array
<SIP/2000-0000006c>AGI Rx << (
<SIP/2000-0000006c>AGI Rx <<     [code] => 510
<SIP/2000-0000006c>AGI Rx <<     [result] =>
<SIP/2000-0000006c>AGI Rx <<     [data] => Invalid or unknown command
<SIP/2000-0000006c>AGI Rx << )
<SIP/2000-0000006c>AGI Rx <<
<SIP/2000-0000006c>AGI Rx <<

my Temporary fix is for me that at the Moment...

[Macro-Dial-Trunk]
exten => s,1,Verbose(--->>>Debug:DoCall agi );
exten => s,n,AGI(_Extention_Dial_000.agi,${ARG1},${ARG2},${ARG3},${ARG4})
exten => s,n,Verbose(0,DIALSTATUS:${DIALSTATUS})
exten => s,n,Set(ARG5=${DIALSTATUS})    
exten =>     s,n,AGI(_Extention_Dial_000.agi,${ARG1},${ARG2},${ARG3},${ARG4},${ARG5})
exten => s,n,hangup()

Somone any Idea ???

Will be nice to get help...

DIALSTATUS will be set only after Dial command executed.

You can check what exactly agi do using

asterisk -r
agi set debug on

maybe, you can use channel_status function.

$agi->channel_status()

https://www.voip-info.org/channel-status

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM