[Asterisk-Users] extensions question

Kevin Walsh kevin at cursor.biz
Fri Jun 11 18:25:28 MST 2004


Christian Gatti [cgatti at vo.lu] wrote:
> 
> part of extensions.conf:
> ------------------------
> ...
> exten => 99999996,1,Wait(1)
> exten => 99999996,2,Playback(userisoffline)
> exten => 99999996,3,Hangup()
> 
> ... other extensions with more than 3 priority levels
> 
> exten => _.,1,Dial,ZAP/g1/${EXTEN}
> exten => _.,2,Hangup()
> ...
> 
> and the output in asterisk:
> ---------------------------
> 
> Connected to Asterisk CVS-05/26/04-02:55:14 currently running on sip (pid = 7472)
>     -- Remote UNIX connection
>     -- Executing Wait("SIP/-083601e0", "1") in new stack
>     -- Executing Playback("SIP/-083601e0", "userisoffline") in new stack
>     -- Playing 'userisoffline' (language 'en')
>     -- Executing Hangup("SIP/-083601e0", "") in new stack
>   == Spawn extension (from-ser, 99999996, 3) exited non-zero on 'SIP/-083601e0'
>     -- Executing Dial("SIP/-083601e0", "ZAP/g1/h") in new stack
>     -- Called g1/h
>     -- Channel 1, span 1 got hangup
> Jun 11 23:39:43 WARNING[491541]: app_dial.c:349 wait_for_answer: Unable to forward voice
> Jun 11 23:39:43 WARNING[491541]: app_dial.c:349 wait_for_answer: Unable to forward voice
>     -- Hungup 'Zap/1-1'
>   == No one is available to answer at this time
>     -- Executing Hangup("SIP/-083601e0", "") in new stack
>   == Spawn extension (from-ser, h, 2) exited non-zero on 'SIP/-083601e0'
> 
You dialled 99999996 which did as it was told - it played back
"userisoffline" and hungup.  The hangup caused the "h" extension to be
called.  You have a "_." extension which catches everything (including
"h") so that was called.  The "h" extension did as it was told and tried
to dial "ZAP/g1/h".

My suggestion would be to be more selective in your catchall.  In your
case, perhaps "_X." would be more appropriate.

My view is that "h" and "o" etc. should not be extensions (as defined
by using "exten");  Asterisk should allow them to be defined separately,
while remaining in context, perhaps as:

    catch => hangup,1,Hangup
    catch => key_star,1,VoiceMailMain2
    catch => key_star,2,Hangup

instead of:

    exten => h,1,Hangup
    catch => a,1,VoiceMailMain2
    catch => a,2,Hangup

This obviously doesn't help you with your problem, but the above "_X."
suggestion might.

-- 
   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin at cursor.biz
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/




More information about the asterisk-users mailing list