[Asterisk-Dev] LOCAL channel issue for calls originating on IAX2

steve at daviesfam.org steve at daviesfam.org
Thu Jul 15 06:33:53 MST 2004


I've been fiddling with Mark's astcc stuff.

Amongst other things, I added a "LOCAL" technology such that the dialout 
from the card AGI can be handled via extensions.conf.

But - I've found that the astcc.agi never sees a originator hangup when
the originator is from IAX2.

My test was to call into my test system (called hannah) using IAX2 from 
another system (called bob).

My inbound call went to a context with a greeting and waiting for a 
number.  I then dialled *22*, to call the AGI:

exten=>*22*,1,Agi,astcc.agi

In astcc I entered my card number, then dialled *324*.  Via a route that 
ended up DIALing LOCAL/*324*@cc-features/n

[cc-features]
exten=>*324*,1,Answer
exten=>*324*,2,Echo

So far that works great - I hear the echo application at work.

The weirdness is when I disconnect.

Here's what happens:

Phone number is *324*
Matching pattern is ^\\*.*
This call will cost 0 cents per minute + 0 connect fee
Credit 493600, conn 0, cost 0
    -- AGI Script Executing Application: (DIAL) Options: (LOCAL/*324*@cc-features/n|45|HS(0))
    -- Setting call duration limit to 0 seconds.
    -- Called *324*@cc-features/n
    -- Local/*324*@cc-features-abe2,1 answered IAX2[bob at bob]/5
>>>Originating end hangs up now<<<
    -- Hungup 'IAX2[bob at bob]/5'


I get the IAX2/... Hungup message, but don't get any message saying the
AGI is finished, nor does the astcc.agi log a CDR record, nor does it
increment the card spent balance.

Compare to the same test but calling in over CAPI:

Phone number is *324*
Matching pattern is ^\\*.*
This call will cost 0 cents per minute + 0 connect fee
Credit 493600, conn 0, cost 0
    -- AGI Script Executing Application: (DIAL) Options: (LOCAL/*324*@cc-features/n|45|HS(0))
    -- Setting call duration limit to 0 seconds.
    -- Called *324*@cc-features/n
    -- Local/*324*@cc-features-9aa8,1 answered CAPI[contr1/2727]/3
res is ANSWER, answered time is
Adjusted time is 0, cost is 0 with 0 fee
Total cost is 0
Total used is now 6400
>>>Originating end hung up now<<<
    -- AGI Script astcc.agi completed, returning 0
    -- CAPI Hangingup
       > sent DISCONNECT_REQ PLCI=0x101
    -- removed pipe for PLCI = 0x101


It looks like the AGI never sees a return from the DIAL in the case that 
the call is IAX2->agi->LOCAL->Echo, but that it works properly for the 
CAPI->agi->LOCAL->Echo case...???

Where do I look for the problem - in chan_local, chan_iax2, app_agi, 
pbx.c....??

Regards,
Steve




More information about the asterisk-dev mailing list