Ah ha, it wasn't finding dialparties to execute it. I had to give
extensions.conf the full path name so it could find it. once I did that
and had debuging enabled I got the following result.


    -- Executing [...@macro-dial:3] AGI("SIP/1011006182-b6cee870",
"/var/www/admin/modules/core/agi-bin/dialparties.agi") in new stack
    -- Launched AGI Script
/var/www/admin/modules/core/agi-bin/dialparties.agi
<SIP/1011006182-b6cee870>AGI Tx >> agi_request:
/var/www/admin/modules/core/agi-bin/dialparties.agi
<SIP/1011006182-b6cee870>AGI Tx >> agi_channel: SIP/1011006182-b6cee870
<SIP/1011006182-b6cee870>AGI Tx >> agi_language: en
<SIP/1011006182-b6cee870>AGI Tx >> agi_type: SIP
<SIP/1011006182-b6cee870>AGI Tx >> agi_uniqueid: 1256936063.1
<SIP/1011006182-b6cee870>AGI Tx >> agi_version: 1.6.2.0~rc2-0ubuntu1
<SIP/1011006182-b6cee870>AGI Tx >> agi_callerid: 1011006182
<SIP/1011006182-b6cee870>AGI Tx >> agi_calleridname: Darryl
<SIP/1011006182-b6cee870>AGI Tx >> agi_callingpres: 0
<SIP/1011006182-b6cee870>AGI Tx >> agi_callingani2: 0
<SIP/1011006182-b6cee870>AGI Tx >> agi_callington: 0
<SIP/1011006182-b6cee870>AGI Tx >> agi_callingtns: 0
<SIP/1011006182-b6cee870>AGI Tx >> agi_dnid: 13
<SIP/1011006182-b6cee870>AGI Tx >> agi_rdnis: unknown
<SIP/1011006182-b6cee870>AGI Tx >> agi_context: macro-dial
<SIP/1011006182-b6cee870>AGI Tx >> agi_extension: s
<SIP/1011006182-b6cee870>AGI Tx >> agi_priority: 3
<SIP/1011006182-b6cee870>AGI Tx >> agi_enhanced: 0.0
<SIP/1011006182-b6cee870>AGI Tx >> agi_accountcode:
<SIP/1011006182-b6cee870>AGI Tx >> agi_threadid: -1230361744
<SIP/1011006182-b6cee870>AGI Tx >>
<SIP/1011006182-b6cee870>AGI Rx <<
<SIP/1011006182-b6cee870>AGI Tx >> 510 Invalid or unknown command
<SIP/1011006182-b6cee870>AGI Rx << Warning:
require_once(/usr/share/asterisk/agi-bin/phpagi.php): failed to open
stream: Permission denied in
/var/www/admin/modules/core/agi-bin/dialparties.agi on line 30
<SIP/1011006182-b6cee870>AGI Tx >> 510 Invalid or unknown command
<SIP/1011006182-b6cee870>AGI Rx <<
<SIP/1011006182-b6cee870>AGI Tx >> 510 Invalid or unknown command
<SIP/1011006182-b6cee870>AGI Rx << Fatal error: require_once(): Failed
opening required '/usr/share/asterisk/agi-bin/phpagi.php'
(include_path='.:/usr/share/php:/usr/share/pear') in
/var/www/admin/modules/core/agi-bin/dialparties.agi on line 30
<SIP/1011006182-b6cee870>AGI Tx >> 510 Invalid or unknown command
    -- <SIP/1011006182-b6cee870>AGI Script
/var/www/admin/modules/core/agi-bin/dialparties.agi completed, returning 0


Darryl Moore wrote:
> Yeah, I would have thought so too.
> 
> asterisk*CLI>
> asterisk*CLI> agi set debug on
> AGI Debugging Enabled
> asterisk*CLI>
> 
> I also tried running dialparties from bash, and found that I had to
> include /usr/share/asterisk/agi-bin/ in the path so that phpagi.php and
> phpagi-asmanager.php would load. (They were not loading before that)
> 
> after making that change I can run it from bash it will will patiently
> sit there and wait for input as I would expect when it works.
> 
> 
> 
> Andre Courchesne wrote:
>> agi debug should have given more info than that.
>>
>> ---
>>
>> Andre Courchesne - Consultant
>>
>> http://www.net-forces.com
>>
>> MSN: [email protected]
>>
>> Skype: VoipForces
>>
>>
>>
>> L'information contenue dans le présent document est la propriété de
>> Andre Courchesne. Et est divulguée en toute confidentialité. Cette
>> information ne doit pas être utilisée, divulguée à d'autres personnes ou
>> reproduite sans le consentement écrit explicite de Andre Courchesne.
>>
>> The information contained in this document is confidential and property
>> of Andre Courchesne. It shall not be used, disclosed to others or
>> reproduced without the express written consent of Andre Courchesne.
>>
>>
>>
>>
>> On 2009-10-30, at 4:40 PM, Darryl Moore wrote:
>>
>>> Well thanks for the idea
>>>
>>> I did that by typing: "agi set debug on" on the CLI
>>>
>>> I then returned the code to as it was and tried dialing an extension. It
>>> yielded the same result:
>>>
>>>
>>>    -- Executing [...@macro-exten-vm:4] Set("SIP/1011006182-b725a920",
>>> "EXTTOCALL=1011004797") in new stack
>>>    -- Executing [...@macro-exten-vm:5] Set("SIP/1011006182-b725a920",
>>> "CFUEXT=") in new stack
>>>    -- Executing [...@macro-exten-vm:6] Set("SIP/1011006182-b725a920",
>>> "CFBEXT=") in new stack
>>>    -- Executing [...@macro-exten-vm:7] Set("SIP/1011006182-b725a920",
>>> "RT=""") in new stack
>>>    -- Executing [...@macro-exten-vm:8] Macro("SIP/1011006182-b725a920",
>>> "record-enable,1011004797,IN") in new stack
>>>    -- Executing [...@macro-record-enable:1]
>>> GotoIf("SIP/1011006182-b725a920", "1?check") in new stack
>>>    -- Goto (macro-record-enable,s,4)
>>>    -- Executing [...@macro-record-enable:4]
>>> AGI("SIP/1011006182-b725a920",
>>> "recordingcheck,20091030-163733,1256935053.3") in new stack
>>>    -- Executing [...@macro-record-enable:5]
>>> MacroExit("SIP/1011006182-b725a920", "") in new stack
>>>    -- Executing [...@macro-exten-vm:9] Macro("SIP/1011006182-b725a920",
>>> "dial,"",tr,1011004797") in new stack
>>>    -- Executing [...@macro-dial:1] GotoIf("SIP/1011006182-b725a920",
>>> "1?dial") in new stack
>>>    -- Goto (macro-dial,s,3)
>>>    -- Executing [...@macro-dial:3] AGI("SIP/1011006182-b725a920",
>>> "dialparties.agi") in new stack
>>>    -- Executing [...@macro-dial:4] NoOp("SIP/1011006182-b725a920",
>>> "Returned from dialparties with no extensions to call and DIALSTATUS: ")
>>> in new stack
>>>    -- Executing [...@macro-exten-vm:10] GotoIf("SIP/1011006182-b725a920",
>>> "0?exit,return") in new stack
>>>
>>> Andre Courchesne wrote:
>>>> Actualy, without dialparties, DND, callforward, ringgroup, and a lot of
>>>> other functionality. Maybe you are missing a php dependancy for
>>>> dialparties.
>>>>
>>>> you can try doing a call with agi debug enabled.
>>>>
>>>>
>>>> ---
>>>>
>>>> Andre Courchesne - Consultant
>>>>
>>>> http://www.net-forces.com
>>>>
>>>> MSN: [email protected]
>>>>
>>>> Skype: VoipForces
>>>>
>>>>
>>>>
>>>> L'information contenue dans le présent document est la propriété de
>>>> Andre Courchesne. Et est divulguée en toute confidentialité. Cette
>>>> information ne doit pas être utilisée, divulguée à d'autres personnes ou
>>>> reproduite sans le consentement écrit explicite de Andre Courchesne.
>>>>
>>>> The information contained in this document is confidential and property
>>>> of Andre Courchesne. It shall not be used, disclosed to others or
>>>> reproduced without the express written consent of Andre Courchesne.
>>>>
>>>>
>>>>
>>>>
>>>> On 2009-10-30, at 4:04 PM, Darryl Moore wrote:
>>>>
>>>>> Hi TAUG, at the risk of wearing out my welcome, I'm going to add a
>>>>> little more to what I've discovered.
>>>>>
>>>>> dialparties.agi is a php script which can be found here:
>>>>> /var/www/admin/modules/core/agi-bin/
>>>>>
>>>>> I was able to get my extensions to work by removing the call to this
>>>>> code and calling the internal Dial() function directly as follows
>>>>>
>>>>> [macro-dial]
>>>>> ;exten => s,1,GotoIf($["${MOHCLASS}" = ""]?dial)
>>>>> ;exten => s,n,SetMusicOnHold(${MOHCLASS})
>>>>> ;exten => s,n(dial),AGI(dialparties.agi)
>>>>> ;exten => s,n,NoOp(Returned from dialparties with no extensions to call
>>>>> and DIALSTATUS: ${DIALSTATUS})
>>>>>
>>>>> exten => s,1,Dial(SIP/${EXTTOCALL},5,A(beep))
>>>>> ;exten => s,n+2(normdial),Dial(${ds})                               ;
>>>>> dialparties will set the priority to 10 if $ds is not null
>>>>> exten => s,n,Set(DIALSTATUS=${IF($["${DIALSTATUS_CW}"!=""
>>>>> ]?${DIALSTATUS_CW}:${DIALSTATUS})})
>>>>> exten => s,n,GosubIf($["${SCREEN}" != ""]?${DIALSTATUS},1)
>>>>>
>>>>>
>>>>> The commented out lines are what I had do remove to make it work. The
>>>>> line with the Dial(SIP.... command is what I had to add.
>>>>>
>>>>> With the above changes I'm able to dial extensions properly. I suspect
>>>>> DND no longer work, as well as probably a few other things.
>>>>>
>>>>> I'm a little confused as to why all this would have been necessary. I
>>>>> suppose to find out, I'll have to debug dialparties to see why it was
>>>>> not returning the dial strings it should have been.
>>>>>
>>>>> I think I will start by submitting this, as well as the FreePBX ubuntu
>>>>> bugs I discovered before, to the Asterisk people. I assume they have a
>>>>> bug reporting forum.
>>>>>
>>>>> cheers,
>>>>> darryl
>>>>>
>>>>>
>>>>> Darryl Moore wrote:
>>>>>> Hi again TAUGers,
>>>>>>
>>>>>> Asterisk and FreePBX are now playing nicely together on Ubuntu.
>>>>>>
>>>>>> There are still some interesting issues with these two programs. Maybe
>>>>>> some other FreePBX users have seen this.
>>>>>>
>>>>>> I have no issue dialing features such as *60 or *43 or out to my VOIP
>>>>>> provider from any extension. I do have issues when I try dialing
>>>>>> between
>>>>>> internal extensions. Here is the verbose output:
>>>>>>
>>>>>> -----------------------------------------------
>>>>>>
>>>>>>
>>>>>>  -- Executing [...@macro-exten-vm:2] Set("SIP/1011006182-b5a97198",
>>>>>> "RingGroupMethod=none") in new stack
>>>>>>   -- Executing [...@macro-exten-vm:3] Set("SIP/1011006182-b5a97198",
>>>>>> "VMBOX=novm") in new stack
>>>>>>   -- Executing [...@macro-exten-vm:4] Set("SIP/1011006182-b5a97198",
>>>>>> "EXTTOCALL=1011002490") in new stack
>>>>>>   -- Executing [...@macro-exten-vm:5] Set("SIP/1011006182-b5a97198",
>>>>>> "CFUEXT=") in new stack
>>>>>>   -- Executing [...@macro-exten-vm:6] Set("SIP/1011006182-b5a97198",
>>>>>> "CFBEXT=") in new stack
>>>>>>   -- Executing [...@macro-exten-vm:7] Set("SIP/1011006182-b5a97198",
>>>>>> "RT=""") in new stack
>>>>>>   -- Executing [...@macro-exten-vm:8] Macro("SIP/1011006182-b5a97198",
>>>>>> "record-enable,1011002490,IN") in new stack
>>>>>>   -- Executing [...@macro-record-enable:1]
>>>>>> GotoIf("SIP/1011006182-b5a97198", "1?check") in new stack
>>>>>>   -- Goto (macro-record-enable,s,4)
>>>>>>   -- Executing [...@macro-record-enable:4]
>>>>>> AGI("SIP/1011006182-b5a97198",
>>>>>> "recordingcheck,20091030-124613,1256921173.8") in new stack
>>>>>>   -- Executing [...@macro-record-enable:5]
>>>>>> MacroExit("SIP/1011006182-b5a97198", "") in new stack
>>>>>>   -- Executing [...@macro-exten-vm:9] Macro("SIP/1011006182-b5a97198",
>>>>>> "dial,"",tr,1011002490") in new stack
>>>>>>   -- Executing [...@macro-dial:1] GotoIf("SIP/1011006182-b5a97198",
>>>>>> "1?dial") in new stack
>>>>>>   -- Goto (macro-dial,s,3)
>>>>>>   -- Executing [...@macro-dial:3] AGI("SIP/1011006182-b5a97198",
>>>>>> "dialparties.agi") in new stack
>>>>>>   -- Executing [...@macro-dial:4] NoOp("SIP/1011006182-b5a97198",
>>>>>> "Returned from dialparties with no extensions to call and
>>>>>> DIALSTATUS: ")
>>>>>> in new stack
>>>>>>   -- Executing [...@macro-exten-vm:10] GotoIf("SIP/1011006182-b5a97198",
>>>>>> "0?exit,return") in new stack
>>>>>>   -- Executing [...@macro-exten-vm:11] Set("SIP/1011006182-b5a97198",
>>>>>> "SV_DIALSTATUS=") in new stack
>>>>>>   -- Executing [...@macro-exten-vm:12]
>>>>>> GosubIf("SIP/1011006182-b5a97198", "0?docfu,1") in new stack
>>>>>>   -- Executing [...@macro-exten-vm:13]
>>>>>> GosubIf("SIP/1011006182-b5a97198", "0?docfb,1") in new stack
>>>>>>   -- Executing [...@macro-exten-vm:14] Set("SIP/1011006182-b5a97198",
>>>>>> "DIALSTATUS=") in new stack
>>>>>>   -- Executing [...@macro-exten-vm:15] NoOp("SIP/1011006182-b5a97198",
>>>>>> "Voicemail is 'novm'") in new stack
>>>>>>   -- Executing [...@macro-exten-vm:16] GotoIf("SIP/1011006182-b5a97198",
>>>>>> "1?s-,1") in new stack
>>>>>>   -- Goto (macro-exten-vm,s-,1)
>>>>>>   -- Executing [1011002...@from-internal:2]
>>>>>> Goto("SIP/1011006182-b5a97198", ",return,1") in new stack
>>>>>>   -- Goto (from-internal,return,1)
>>>>>>   -- Sent into invalid extension 'return' in context 'from-internal'
>>>>>> on SIP/1011006182-b5a97198
>>>>>>   -- Executing [...@from-internal:1] Playback("SIP/1011006182-b5a97198",
>>>>>> "privacy-incorrect") in new stack
>>>>>>   -- <SIP/1011006182-b5a97198> Playing 'privacy-incorrect.gsm'
>>>>>> (language 'en')
>>>>>>
>>>>>>
>>>>>> ----------------------------------
>>>>>>
>>>>>>> From this I can see that it is trying to dial the other extension
>>>>>>> properly
>>>>>> Macro("SIP/1011006182-b5a97198", "dial,"",tr,1011002490")
>>>>>>
>>>>>>
>>>>>> but after executing this line in the dial macro:
>>>>>> AGI("SIP/1011006182-b5a97198", "dialparties.agi")
>>>>>>
>>>>>> it returns "Returned from dialparties with no extensions to call and
>>>>>> DIALSTATUS:"
>>>>>>
>>>>>> The extension above is right. (Those handsets have very long hard
>>>>>> coded
>>>>>> extension numbers) but this function dialparties.agi fails.
>>>>>>
>>>>>> I did some googling to find out what this function is so I can figure
>>>>>> out what is going on but am having little luck. Does anyone here know
>>>>>> anything of this dialparties.agi thingamawidget?
>>>>>>
>>>>>> Again this is using all the FreePBX dialplan programming  so I'm
>>>>>> sot of
>>>>>> guessing that my issue is somewhere in the FreePBX macros. My only
>>>>>> issue
>>>>>> is that I'm not overly faliliar with this macro language, but I'm
>>>>>> working on it.
>>>>>>
>>>>>> cheers,
>>>>>> darryl
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: [email protected]
>>>>>> For additional commands, e-mail: [email protected]
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: [email protected]
>>>>> For additional commands, e-mail: [email protected]
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [email protected]
>>>> For additional commands, e-mail: [email protected]
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [email protected]
>>> For additional commands, e-mail: [email protected]
>>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to