Hello,

I'm developping a little agi for asterisk and I have a strange error.
One call out of ten freezes after I sent :
VERBOSE "     EXEC DIAL SIP/spyroux-0&IAX2/spyroux-1||r" 3

Asterisk doesn't send any '200 result...' so my php script is waiting
and waiting...

When it freezes, it's every time after the same command.

When the script is working fine, I have this output in the cli (I added
some tabulation in order to read easier):
------------------------
AGI Rx << VERBOSE "     EXEC DIAL SIP/spyroux-0&IAX2/spyroux-1||r" 3
        --  /usr/share/obelisk/agi_obelisk.php:     EXEC DIAL
SIP/spyroux-0&IAX2/spyroux-1||r
AGI Tx >> 200 result=1
AGI Rx << EXEC DIAL SIP/spyroux-0&IAX2/spyroux-1||r
        -- AGI Script Executing Application: (DIAL) Options:
(SIP/spyroux-0&IAX2/spyroux-1||r)
Sep  1 10:23:29 NOTICE[11754]: app_dial.c:764 dial_exec: Unable to
create channel of type 'SIP'
        -- Called spyroux-1
...
-------------------------

and when it fails, I have the folowing output : 
-------------------------
AGI Rx << VERBOSE "     EXEC DIAL SIP/spyroux-0&IAX2/spyroux-1||r" 3
        --  /usr/share/obelisk/agi_obelisk.php:     EXEC DIAL
SIP/spyroux-0&IAX2/spyroux-1||r
[FREEZE]
--------------------------

I launch my script as a deadAGI in order to do some little things after
the 'hangup'. When the script freezes the channel is still open and I
have to restart asterisk in order to close the channel.

do you think I made a mistake in my agi script ?

thanks 
Arnaud Ligot

PS: I'm running a debian system with a 1.0.9 asterisk that I just
compiled this morning.
PPS: I attached full log (log1 : works / log2 : freeze)
        -- Launched AGI Script /usr/share/obelisk/agi_obelisk.php
AGI Tx >> agi_request: /usr/share/obelisk/agi_obelisk.php
AGI Tx >> agi_channel: IAX2/[EMAIL PROTECTED]/4
AGI Tx >> agi_language: fr
AGI Tx >> agi_type: IAX2
AGI Tx >> agi_uniqueid: 1125563009.24
AGI Tx >> agi_callerid: "151" <501151>
AGI Tx >> agi_dnid: unknown
AGI Tx >> agi_rdnis: unknown
AGI Tx >> agi_context: obelisk-iax-pep
AGI Tx >> agi_extension: 55555
AGI Tx >> agi_priority: 1
AGI Tx >> agi_enhanced: 0.0
AGI Tx >> agi_accountcode:
AGI Tx >>     
AGI Rx <<     
AGI Tx >> 510 Invalid or unknown command
AGI Rx << VERBOSE "$agivar[request] set to 
'/usr/share/obelisk/agi_obelisk.php'" 4
        >  /usr/share/obelisk/agi_obelisk.php: $agivar[request] set to 
'/usr/share/obelisk/
agi_obelisk.php'
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "$agivar[channel] set to 'IAX2/[EMAIL PROTECTED]/4'" 4
        >  /usr/share/obelisk/agi_obelisk.php: $agivar[channel] set to 
'IAX2/[EMAIL PROTECTED]/
4'            
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "$agivar[language] set to 'fr'" 4
        >  /usr/share/obelisk/agi_obelisk.php: $agivar[language] set to 'fr'
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "$agivar[type] set to 'IAX2'" 4
        >  /usr/share/obelisk/agi_obelisk.php: $agivar[type] set to 'IAX2'
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "$agivar[uniqueid] set to '1125563009.24'" 4
        >  /usr/share/obelisk/agi_obelisk.php: $agivar[uniqueid] set to 
'1125563009.24'
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "$agivar[callerid] set to '\"151\" <501151>'" 4
        >  /usr/share/obelisk/agi_obelisk.php: $agivar[callerid] set to '"151" 
<501151>'
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "$agivar[dnid] set to 'unknown'" 4
        >  /usr/share/obelisk/agi_obelisk.php: $agivar[dnid] set to 'unknown'
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "$agivar[rdnis] set to 'unknown'" 4
        >  /usr/share/obelisk/agi_obelisk.php: $agivar[rdnis] set to 'unknown'
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "$agivar[context] set to 'obelisk-iax-pep'" 4
        >  /usr/share/obelisk/agi_obelisk.php: $agivar[context] set to 
'obelisk-iax-pep'
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "$agivar[extension] set to '55555'" 4
        >  /usr/share/obelisk/agi_obelisk.php: $agivar[extension] set to '55555'
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "$agivar[priority] set to '1'" 4
        >  /usr/share/obelisk/agi_obelisk.php: $agivar[priority] set to '1'
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "$agivar[enhanced] set to '0.0'" 4
        >  /usr/share/obelisk/agi_obelisk.php: $agivar[enhanced] set to '0.0'
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "$agivar[accountcode] set to ''" 4
        >  /usr/share/obelisk/agi_obelisk.php: $agivar[accountcode] set to ''
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "agi_dial(55555, 501151, \"151\" <501151>)" 4
        >  /usr/share/obelisk/agi_obelisk.php: agi_dial(55555, 501151, "151" 
<501151>)
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "agi_dial(): extension 55555 is handeled by : people" 3
        --  /usr/share/obelisk/agi_obelisk.php: agi_dial(): extension 55555 is 
handeled by : people          
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "people_dial(): 501151 : 55555 -> 
'SIP/spyroux-0&IAX2/spyroux-1'" 4
        >  /usr/share/obelisk/agi_obelisk.php: people_dial(): 501151 : 55555 -> 
'SIP/spyroux-0&IAX2/spyroux-1'
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "agi_call : SIP/spyroux-0&IAX2/spyroux-1, 0, 0, 501151, 
\"151\" <501151>" 4            
        >  /usr/share/obelisk/agi_obelisk.php: agi_call : 
SIP/spyroux-0&IAX2/spyroux-1, 0, 0, 501151, "151" <501151>
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "obelisk_write(EXEC DIAL SIP/spyroux-0&IAX2/spyroux-1||r)" 4
        >  /usr/share/obelisk/agi_obelisk.php: obelisk_write(EXEC DIAL 
SIP/spyroux-0&IAX2/spyroux-1||r)   
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "     EXEC DIAL SIP/spyroux-0&IAX2/spyroux-1||r" 3
        --  /usr/share/obelisk/agi_obelisk.php:     EXEC DIAL 
SIP/spyroux-0&IAX2/spyroux-1||r
AGI Tx >> 200 result=1
AGI Rx << EXEC DIAL SIP/spyroux-0&IAX2/spyroux-1||r
        -- AGI Script Executing Application: (DIAL) Options: 
(SIP/spyroux-0&IAX2/spyroux-1||r)
Sep  1 10:23:29 NOTICE[11754]: app_dial.c:764 dial_exec: Unable to create 
channel of type 'SIP'         
        -- Called spyroux-1
        -- Call accepted by 192.168.3.205 (format gsm)
        -- Format for call is gsm
        -- IAX2/spyroux-1/5 is ringing
        -- Hungup 'IAX2/spyroux-1/5'
AGI Tx >> 200 result=-1
AGI Rx << VERBOSE "agi_check()" 4
        >  /usr/share/obelisk/agi_obelisk.php: agi_check()
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "agi_read() : \"200 result=-1\"" 3
        --  /usr/share/obelisk/agi_obelisk.php: agi_read() : "200 result=-1"
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "obelisk_write(GET VARIABLE \"ANSWEREDTIME\")" 4
        >  /usr/share/obelisk/agi_obelisk.php: obelisk_write(GET VARIABLE 
"ANSWEREDTIME")
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "     GET VARIABLE \"ANSWEREDTIME\"" 3
        --  /usr/share/obelisk/agi_obelisk.php:     GET VARIABLE "ANSWEREDTIME"
AGI Tx >> 200 result=1
AGI Rx << GET VARIABLE "ANSWEREDTIME"
AGI Tx >> 200 result=0
AGI Rx << VERBOSE "agi_check()" 4
        >  /usr/share/obelisk/agi_obelisk.php: agi_check()
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "agi_read() : \"200 result=0\"" 3
        --  /usr/share/obelisk/agi_obelisk.php: agi_read() : "200 result=0"
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "agi_getVar 'ANSWEREDTIME' = '0'" 4
        >  /usr/share/obelisk/agi_obelisk.php: agi_getVar 'ANSWEREDTIME' = '0'
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "obelisk_write(GET VARIABLE \"DIALSTATUS\")" 4
        >  /usr/share/obelisk/agi_obelisk.php: obelisk_write(GET VARIABLE 
"DIALSTATUS")
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "     GET VARIABLE \"DIALSTATUS\"" 3
        --  /usr/share/obelisk/agi_obelisk.php:     GET VARIABLE "DIALSTATUS"
AGI Tx >> 200 result=1
AGI Rx << GET VARIABLE "DIALSTATUS"
AGI Tx >> 200 result=1 (CANCEL)
AGI Rx << VERBOSE "agi_check()" 4
        >  /usr/share/obelisk/agi_obelisk.php: agi_check()
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "agi_read() : \"200 result=1 (CANCEL)\"" 3
        --  /usr/share/obelisk/agi_obelisk.php: agi_read() : "200 result=1 
(CANCEL)"
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "agi_getVar 'DIALSTATUS' = 'CANCEL'" 4
        >  /usr/share/obelisk/agi_obelisk.php: agi_getVar 'DIALSTATUS' = 
'CANCEL'
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "agi_dial : 55555 -> SIP/spyroux-0&IAX2/spyroux-1 : CANCEL : 
0" 3
        --  /usr/share/obelisk/agi_obelisk.php: agi_dial : 55555 -> 
SIP/spyroux-0&IAX2/spyroux-1 : CANCEL : 0
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "agi_logCall : 55555, 501151, NULL, 0, 0, CANCEL" 3
        --  /usr/share/obelisk/agi_obelisk.php: agi_logCall : 55555, 501151, 
NULL, 0, 0, CANCEL              
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "insert into AgiLog values (DEFAULT, NULL, now(), 501151, 
55555, 0, 0, 'CANCEL')" 4    
        >  /usr/share/obelisk/agi_obelisk.php: insert into AgiLog values 
(DEFAULT, NULL, now(), 501151, 55555, 0, 0, 'CANCEL')
AGI Tx >> 200 result=1
        -- AGI Script /usr/share/obelisk/agi_obelisk.php completed, returning 0
        -- Hungup 'IAX2/[EMAIL PROTECTED]/4'

        -- Executing DeadAGI("IAX2/[EMAIL PROTECTED]/11", 
"/usr/share/obelisk/agi_obelisk.php") in
new stack    
        -- Launched AGI Script /usr/share/obelisk/agi_obelisk.php
AGI Tx >> agi_request: /usr/share/obelisk/agi_obelisk.php
AGI Tx >> agi_channel: IAX2/[EMAIL PROTECTED]/11
AGI Tx >> agi_language: fr
AGI Tx >> agi_type: IAX2
AGI Tx >> agi_uniqueid: 1125562776.22
AGI Tx >> agi_callerid: "151" <501151>
AGI Tx >> agi_dnid: unknown
AGI Tx >> agi_rdnis: unknown
AGI Tx >> agi_context: obelisk-iax-pep
AGI Tx >> agi_extension: 55555
AGI Tx >> agi_priority: 1
AGI Tx >> agi_enhanced: 0.0
AGI Tx >> agi_accountcode:
AGI Tx >>     
AGI Rx <<     
AGI Tx >> 510 Invalid or unknown command
AGI Rx << VERBOSE "$agivar[request] set to 
'/usr/share/obelisk/agi_obelisk.php'" 4
        >  /usr/share/obelisk/agi_obelisk.php: $agivar[request] set to 
'/usr/share/obelisk/
agi_obelisk.php'
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "$agivar[channel] set to 'IAX2/[EMAIL PROTECTED]/11'" 4
        >  /usr/share/obelisk/agi_obelisk.php: $agivar[channel] set to 
'IAX2/[EMAIL PROTECTED]/
11'           
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "$agivar[language] set to 'fr'" 4
        >  /usr/share/obelisk/agi_obelisk.php: $agivar[language] set to 'fr'
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "$agivar[type] set to 'IAX2'" 4
        >  /usr/share/obelisk/agi_obelisk.php: $agivar[type] set to 'IAX2'
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "$agivar[uniqueid] set to '1125562776.22'" 4
        >  /usr/share/obelisk/agi_obelisk.php: $agivar[uniqueid] set to 
'1125562776.22'
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "$agivar[callerid] set to '\"151\" <501151>'" 4
        >  /usr/share/obelisk/agi_obelisk.php: $agivar[callerid] set to '"151" 
<501151>'
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "$agivar[dnid] set to 'unknown'" 4
        >  /usr/share/obelisk/agi_obelisk.php: $agivar[dnid] set to 'unknown'
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "$agivar[rdnis] set to 'unknown'" 4
        >  /usr/share/obelisk/agi_obelisk.php: $agivar[rdnis] set to 'unknown'
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "$agivar[context] set to 'obelisk-iax-pep'" 4
        >  /usr/share/obelisk/agi_obelisk.php: $agivar[context] set to 
'obelisk-iax-pep'
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "$agivar[extension] set to '55555'" 4
        >  /usr/share/obelisk/agi_obelisk.php: $agivar[extension] set to '55555'
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "$agivar[priority] set to '1'" 4
        >  /usr/share/obelisk/agi_obelisk.php: $agivar[priority] set to '1'
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "$agivar[enhanced] set to '0.0'" 4
        >  /usr/share/obelisk/agi_obelisk.php: $agivar[enhanced] set to '0.0'
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "$agivar[accountcode] set to ''" 4
        >  /usr/share/obelisk/agi_obelisk.php: $agivar[accountcode] set to ''
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "agi_dial(55555, 501151, \"151\" <501151>)" 4
        >  /usr/share/obelisk/agi_obelisk.php: agi_dial(55555, 501151, "151" 
<501151>)
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "agi_dial(): extension 55555 is handeled by : people" 3
        --  /usr/share/obelisk/agi_obelisk.php: agi_dial(): extension 55555 is 
handeled by : people
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "people_dial(): 501151 : 55555 -> 
'SIP/spyroux-0&IAX2/spyroux-1'" 4
        >  /usr/share/obelisk/agi_obelisk.php: people_dial(): 501151 : 55555 -> 
'SIP/spyroux-0&IAX2/spyroux-1'
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "agi_call : SIP/spyroux-0&IAX2/spyroux-1, 0, 0, 501151, 
\"151\" <501151>" 4
        >  /usr/share/obelisk/agi_obelisk.php: agi_call : 
SIP/spyroux-0&IAX2/spyroux-1, 0, 0, 501151, "151" <501151>
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "obelisk_write(EXEC DIAL SIP/spyroux-0&IAX2/spyroux-1||r)" 4
        >  /usr/share/obelisk/agi_obelisk.php: obelisk_write(EXEC DIAL 
SIP/spyroux-0&IAX2/spyroux-1||r)
AGI Tx >> 200 result=1
AGI Rx << VERBOSE "     EXEC DIAL SIP/spyroux-0&IAX2/spyroux-1||r" 3
--  /usr/share/obelisk/agi_obelisk.php:     EXEC DIAL 
SIP/spyroux-0&IAX2/spyroux-1||r

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Asterisk-Dev mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-dev
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to