[Asterisk-Users] DISA() context restrictions

Michael George george at mutualdata.com
Tue Nov 9 17:51:08 MST 2004


I'm working on using DISA() to allow us to call into our * box from the
outside and grab an internal line to dial out on.  Pretty standard stuff.

I've got the 1.0.x CVS version of * built and when I specify a context to the
call, the first DTMF sent will cause * to hang up the line.

I suspect there might be restrictions on contexts which DISA() can examine,
but I cannot find anything in the wiki or archives to suggest that.

I have been able to utilize the default DISA() context, but that doesn't leave
it free for the other uses of DISA() I have in mind.

The only difference to my extensions.conf file is that if I have:
exten => s,2,DISA(no-password, disa)

then the next button press will hang up the line.  If I have:
exten => s,2,DISA(no-password)

then the next button-press in resolved in the "disa" context.  I would expect,
though, that both would act the same way.  I have tried with and w/o a
passcode, but the results are the same.

I've also checked "show application disa" to see if perhaps semantics have
changed but the docs had not, but there seems to be no change from the info
on the wiki.

Looking at the logs, on a failed call I see:

    -- Accepting AUTHENTICATED call from 216.157.203.105, requested format =
2, actual format = 2
    -- Executing NoOp("IAX2/pewamo at pewamo/6", "internal-voip| s| 1| "Michael
George" <206>") in new stack
    -- Executing DISA("IAX2/pewamo at pewamo/6", "no-password| disa") in new
stack
Nov  9 19:50:33 DEBUG[14521]: app_disa.c:160 disa_exec: Context:  disa
Nov  9 19:50:33 DEBUG[14521]: app_disa.c:165 disa_exec: DISA no-password login
success
Nov  9 19:50:33 DEBUG[14521]: channel.c:1128 ast_settimeout: Scheduling timer
at 160 sample intervals
Nov  9 19:50:33 DEBUG[14451]: chan_iax2.c:5307 socket_read: Ooh, voice format
changed to 2
Nov  9 19:50:33 DEBUG[14521]: channel.c:1379 ast_read: Generator got voice,
switching to phase locked mode
Nov  9 19:50:33 DEBUG[14521]: channel.c:1128 ast_settimeout: Scheduling timer
at 0 sample intervals
Nov  9 19:50:34 DEBUG[14521]: channel.c:1128 ast_settimeout: Scheduling timer
at 0 sample intervals
***************************************************************************
Nov  9 19:50:34 DEBUG[14451]: chan_iax2.c:5489 socket_read: Immediately
destroying 6, having received hangup
  == Spawn extension (internal-voip, s, 2) exited non-zero on
'IAX2/pewamo at pewamo/6'
Nov  9 19:50:34 DEBUG[14521]: chan_iax2.c:2403 iax2_hangup: We're hanging up
IAX2/pewamo at pewamo/6 now...
Nov  9 19:50:34 DEBUG[14521]: chan_iax2.c:2412 iax2_hangup: Really destroying
IAX2/pewamo at pewamo/6 now...
    -- Hungup 'IAX2/pewamo at pewamo/6'

and on a successful call I see:

Nov  9 19:52:09 DEBUG[14618]: app_disa.c:160 disa_exec: Context: disa
Nov  9 19:52:09 DEBUG[14618]: app_disa.c:165 disa_exec: DISA no-password login
success
Nov  9 19:52:09 DEBUG[14618]: channel.c:1128 ast_settimeout: Scheduling timer
at 160 sample intervals
Nov  9 19:52:10 DEBUG[14451]: chan_iax2.c:5307 socket_read: Ooh, voice format
changed to 2
Nov  9 19:52:10 DEBUG[14618]: channel.c:1379 ast_read: Generator got voice,
switching to phase locked mode
Nov  9 19:52:10 DEBUG[14618]: channel.c:1128 ast_settimeout: Scheduling timer
at 0 sample intervals
Nov  9 19:52:12 DEBUG[14618]: channel.c:1128 ast_settimeout: Scheduling timer
at 0 sample intervals
***********************************************************************
Nov  9 19:52:12 WARNING[14618]: cdr.c:286 ast_cdr_init: CDR already
initialized on 'IAX2/pewamo at pewamo/7'
    -- Executing NoOp("IAX2/pewamo at pewamo/7", "disa context") in new stack
    -- Executing Playback("IAX2/pewamo at pewamo/7", "tt-monkeysintro") in new
stack
Nov  9 19:52:12 DEBUG[14618]: channel.c:1128 ast_settimeout: Scheduling timer
at 160 sample intervals
    -- Playing 'tt-monkeysintro' (language 'en')
Nov  9 19:52:13 DEBUG[14451]: chan_iax2.c:5793 socket_read: Sending VNAK
    -- Registered to '69.73.19.178', who sees us as 24.11.146.21:4569
Nov  9 19:52:14 DEBUG[14451]: chan_iax2.c:3753 raw_hangup: Raw Hangup
69.73.19.178:4569, src=6, dst=230
Nov  9 19:52:14 DEBUG[14451]: chan_iax2.c:3753 raw_hangup: Raw Hangup
69.73.19.178:4569, src=6, dst=230
Nov  9 19:52:14 DEBUG[14618]: channel.c:1128 ast_settimeout: Scheduling timer
at 0 sample intervals
Nov  9 19:52:14 DEBUG[14618]: channel.c:1128 ast_settimeout: Scheduling timer
at 0 sample intervals
    -- Executing Playback("IAX2/pewamo at pewamo/7", "tt-allbusy") in new stack
Nov  9 19:52:14 DEBUG[14618]: channel.c:1128 ast_settimeout: Scheduling timer
at 160 sample intervals
    -- Playing 'tt-allbusy' (language 'en')
Nov  9 19:52:15 DEBUG[14451]: chan_iax2.c:5489 socket_read: Immediately
destroying 7, having received hangup
Nov  9 19:52:15 DEBUG[14618]: channel.c:1128 ast_settimeout: Scheduling timer
at 0 sample intervals
  == Spawn extension (disa, 8, 3) exited non-zero on 'IAX2/pewamo at pewamo/7'
Nov  9 19:52:15 DEBUG[14618]: chan_iax2.c:2403 iax2_hangup: We're hanging up
IAX2/pewamo at pewamo/7 now...
Nov  9 19:52:15 DEBUG[14618]: chan_iax2.c:2412 iax2_hangup: Really destroying
IAX2/pewamo at pewamo/7 now...
    -- Hungup 'IAX2/pewamo at pewamo/7'

The difference occurs at the ***************, where the failed call shows a
hangup having been received by chan_iax.  So maybe the problem is with
chan_iax rather than disa itself.  But why would it happen only with a call
to disa() wich a context argument?

I will have to try this same test from a zap line and a SIP line when I am in
the office.

Any see something I might be doing wrong, or have a hint as to what I might do
to debug further?

Thanks!

-- 
-M

There are 10 kinds of people in this world:
	Those who can count in binary and those who cannot.



More information about the asterisk-users mailing list