POSSA / freepbx-Call_Status

Forked from http://sysadminman.net/blog/2013/asterisk-outbound-call-status-page-5600 and modified for FreePBX
Other
19 stars 18 forks source link

Display issues with Asterisk 12 #1

Open GWilson255 opened 9 years ago

GWilson255 commented 9 years ago

I'm running freepbx 12.0.9 / Asterisk 12.6.1 / Linux version 2.6.32-431.el6.x86_64 The issues I see; The timer and outgoing CID still work, but the destination number isn’t being included and the channel info is some sort of a weird hash (or is this what is was supposed to be?). I’m currently running it from var/www/html/call-status as I couldn’t get past the permissions to include the status.php from the admin directory.

lgaetz commented 9 years ago

The information for display is parsed from the output of the command core show channels concise.It is known to work with Asterisk 11, so my guess is that changes were introduced in 12 that cause issues. At the Asterisk CLI, with active calls the command produces output like this on 11:

pbx*CLI> core show channels concise
SIP/SIPvoip.ms-0000029e!from-trunk!!1!Up!AppDial!(Outgoing Line)!442xxxx!NAME!NAME!3!9!SIP/106-0000029d!1415983500.1362
SIP/106-0000029d!macro-dialout-trunk!s!31!Up!Dial!SIP/SIPvoip.ms/1xxxyyyyyyy,300,!1yyyxxxxxxx!Name!Name!3!10!SIP/SIPvoip.ms-0000029e!1415983499.1361

Each channel gets a separate line, and each of 12 parameters per channel is separated by a ! character. What do you get on a 12 system?

GWilson255 commented 9 years ago

I now see where this hash-like channel info was coming from.Here’s the response.

SIP/242-000004a9!macro-dial!s!1!Up!AppDial!(Outgoing Line)!242!!!3!7!fb885ad8-53c4-40c0-98ff-c9740cee3c4d!1415985028.210584 SIP/221-000004a5!macro-dialout-trunk!s!22!Up!Dial!SIP/Voipms/416297XXXX,300,Tt!416297XXXX!!!3!7!8cf62859-7b26-4998-8739-7c39fd91248f!1415985027.210576 SIP/Voipms-000004a7!macro-dial!s!7!Up!Dial!SIP/241&SIP/242&SIP/243&SIP/224&SIP/251&SIP/252,45,TtrM(auto-blkvm)!416297XXXX!!!3!7!fb885ad8-53c4-40c0-98ff-c9740cee3c4d!1415985027.210580 SIP/Voipms-000004a6!from-trunk!!1!Up!AppDial!(Outgoing Line)!242!!!3!7!8cf62859-7b26-4998-8739-7c39fd91248f!1415985027.210578

tm1000 commented 9 years ago

Asterisk 12 does not use channel masquerading any more so there could definitely be an issue there.

lgaetz commented 9 years ago

Okay, well Call Status is faithfully parsing out the data provided by Asterisk 12. There may be some other way of getting the necessary information from Asterisk, but will require a rather different approach than what is currently employed. The fix may not be along any time soon.

GWilson255 commented 9 years ago

Here's the info from the "core show channels concise" from a recent inbound call; SIP/222-000004bb!macro-parked-call!s!18!Up!ParkedCall!default,201!222!!!3!507!e87b3d53-43c4-490d-8d33-4feb760fc753!1415986852.211142 SIP/221-000004b6!macro-dial-one!s!1!Up!AppDial!(Outgoing Line)!221!!!3!557!!1415986802.211084 SIP/ghtel-000004b3!ext-queues!111!42!Up!Queue!111,tR,,,,,,,,!905726XXXX!!!3!571!308fa44d-bc1a-41a3-990b-4a23e59c1d6d!1415986788.211054 Local/221@from-queue-0000480a;1!from-queue!111!1!Up!AppQueue!(Outgoing Line)!221!!!3!557!308fa44d-bc1a-41a3-990b-4a23e59c1d6d!1415986802.211068 Local/221@from-queue-0000480a;2!macro-dial-one!s!43!Up!Dial!SIP/221,15,TtrM(auto-blkvm)!905726XXXX!!!3!557!e87b3d53-43c4-490d-8d33-4feb760fc753!1415986802.211070

The attached capture image is from the web page output of the same call.

4-FLOSS-Free-Libre-Open-Source-Software commented 4 years ago

number to (outnum) not showing

pjsip FreePBX Framework15.0.16.64

works for me with asterisk 17 and pjsip by changing

``

        $regex = '/PJSIP\/(.*)@/';
        preg_match($regex,$pieces[6],$to);

echo "<td class='large';>" . $to[1] . "</td>";