[asterisk-users] 'Start' in extension rules

Philipp Kempgen philipp.kempgen at amooma.de
Sat Oct 13 18:56:20 CDT 2007


Turbo Fredriksson wrote:

> Quoting Philipp Kempgen <philipp.kempgen at amooma.de>:
> 
>>> exten => s,1,Answer()
>>> exten => s,n,Goto(s-${DIALSTATUS},1)
>> This still doesn't make sense because you did not Dial()
>> before jumping based on ${DIALSTATUS}.
> 
> Ok, make sense. But still no go:
> 
> ----- s n i p -----
> [default]
> exten => s,1,Answer()
> exten => s,2,Dial(SIP/${EXTEN},20,t)
> exten => s,4,Goto(default,s-${DIALSTATUS},1)
> 
> exten => s-CANCEL,1,Hangup()
> exten => s-DONTCALL,1,Voicemail(${EXTEN},u)
> exten => s-NOANSWER,1,Voicemail(${EXTEN},u)
> exten => s-BUSY,1,Voicemail(${EXTEN},b)
> 
> exten => 2403,1,Hangup()
> 
> exten => _X.,1,Playback(pbx-invalid)
> exten => _X.,2,Hangup()
> ----- s n i p -----

> The 's,...' part is STILL not 'executed'...!

No, because if you dial 2403 in your default context it would
match the 2403 extension not the s extension.

>>>> exten => _X.,1,Dial(SIP/${EXTEN},20)
>>>> exten => _X.,n,Goto(s-${DIALSTATUS},1)
>>>> Well, I don't want the first part 
>> Then maybe
>>
>> [default]
>> exten => _X.,1,Dial(SIP/${EXTEN},20)
>> exten => _X.,n,Goto(s-${DIALSTATUS},1)
> 
> How are these different?

They are not. But the part you left out is different. :)

>> Or you could define every extension and use a macro. There's an example
>> in the default extensions.conf file (if you ran `make samples`).
> 
> Ah, got it... A little modifications for my need, and of I went!
[snip]
> One line per extension, exactly how I wanted it originally.

Great!

Regards,
  Philipp Kempgen

-- 
amooma GmbH - Bachstr. 126 - 56566 Neuwied - http://www.amooma.de
    Let's use IT to solve problems and not to create new ones.
          Asterisk? -> http://www.das-asterisk-buch.de

Geschäftsführer: Stefan Wintermeyer
Handelsregister: Neuwied B 14998



More information about the asterisk-users mailing list