Asterisk phpagi - DIalplan connection

Анульовано Опубліковано %project.relative_time Оплачується при отриманні
Анульовано Оплачується при отриманні

Iam facing some problems here regarding AGI. we are running (freepbx 2.8) asterisk 11.6 and php [url removed, login to view] we have to check the caller id in dial plan with caller id stored in external CRM by using AGI. For testing purpose we made a rough scenario having script in agi-bin, and calling it from and back to dial plan

DIALPLAN:

exten => 5678,1,NoOp(*** agi testing***)

same => n,AGI([url removed, login to view],${CALLERID(num)})

same => n,NoOp(*** the result from script is ${result} *** )

PHPAGI SCRIPT:

#!/usr/bin/php -q

<?php

set_time_limit(30);

require('[url removed, login to view]');

error_reporting(E_ALL);

$agi = new AGI();

ob_implicit_flush(true);

$agi->answer();

$mob=$avgv[1];

$agi->set_variable('result',$mob);

CLI OUTPUT:

-- Launched AGI Script /var/lib/asterisk/agi-bin/[url removed, login to view]

<SIP/1000-00000012>AGI Tx >> agi_request: [url removed, login to view]

<SIP/1000-00000012>AGI Tx >> agi_channel: SIP/1000-00000012

<SIP/1000-00000012>AGI Tx >> agi_language: en

<SIP/1000-00000012>AGI Tx >> agi_type: SIP

<SIP/1000-00000012>AGI Tx >> agi_uniqueid: 1386330214.18

<SIP/1000-00000012>AGI Tx >> agi_version: 11.6.0

<SIP/1000-00000012>AGI Tx >> agi_callerid: 1000

<SIP/1000-00000012>AGI Tx >> agi_calleridname: 1000

<SIP/1000-00000012>AGI Tx >> agi_callingpres: 0

<SIP/1000-00000012>AGI Tx >> agi_callingani2: 0

<SIP/1000-00000012>AGI Tx >> agi_callington: 0

<SIP/1000-00000012>AGI Tx >> agi_callingtns: 0

<SIP/1000-00000012>AGI Tx >> agi_dnid: 5678

<SIP/1000-00000012>AGI Tx >> agi_rdnis: unknown

<SIP/1000-00000012>AGI Tx >> agi_context: newagitest

<SIP/1000-00000012>AGI Tx >> agi_extension: 5678

<SIP/1000-00000012>AGI Tx >> agi_priority: 3

<SIP/1000-00000012>AGI Tx >> agi_enhanced: 0.0

<SIP/1000-00000012>AGI Tx >> agi_accountcode:

<SIP/1000-00000012>AGI Tx >> agi_threadid: -1259586704

<SIP/1000-00000012>AGI Tx >> agi_arg_1: 1000

<SIP/1000-00000012>AGI Tx >>

-- <SIP/1000-00000012>AGI Script [url removed, login to view] completed, returning 0

-- Auto fallthrough, channel 'SIP/1000-00000012' status is 'UNKNOWN'

we are not getting variable (${result}) back to dialplan.

we need exact php script and Dialplan for getting the variable back to dialplan.

Hope you can help me out of this.

Asterisk PBX

ID Проекту: #5232695

Про проект

2 заявок(-ки) Дистанційний проект Остання активність Dec 16, 2013

2 фрілансерів(-и) готові виконати цю роботу у середньому за ₹2317

voipexpert05

Hi, I have done this before and can do this for you. Please check my feedback. Let me know when we can start. Thanks vivek

₹3333 INR за 1 день
(32 відгуків(и))
5.9
blckshdw

you're php script has a typo. I can help resolve this today for you. Look forward to hearing from you

₹1300 INR за 3 дні(-в)
(0 відгуків(и))
0.0