<span style="font-family: Arial, Helvetica, Sans-Serif; font-size: 12px"><div>Jean</div>

<div> </div>

<div>If you moved the exten => _.   Lines to the bottom of the context then you should like be able to get away from having to have two separate contexts. I use that method quiet often, but was in a hurry to get you a response and did not think remember that nuance.</div>

<div> </div>

<div>I will have to try this as we are a heavy grandstream shop. It has been something on the list. </div>

<div> </div>

<div>Thanks<br />
<br />
Bryant Zimmerman (ZK Tech Inc.)<br />
616-855-1030 Ext. 2003</div>

<div> </div>

<hr align="center" size="2" width="100%" />
<div><span style="font-family: tahoma,arial,sans-serif; font-size: 10pt;"><b>From</b>: "Jean-Denis Girard" <jd.girard@sysnux.pf><br />
<b>Sent</b>: Friday, February 19, 2016 11:53 AM<br />
<b>To</b>: asterisk-users@lists.digium.com<br />
<b>Subject</b>: Re: [asterisk-users] Grandstream Early Dial</span>

<div> </div>
-----BEGIN PGP SIGNED MESSAGE-----<br />
Hash: SHA1<br />
<br />
Hi Bryant,<br />
<br />
Thanks for your reply.<br />
<br />
It didn't work immediately, I had to create a second context, or else it<br />
was looping between the second and first line. This seems to work:<br />
<br />
[earlydial] ; Test Early Dial<br />
exten => _.,1,Set(l_Extension=${EXTEN})<br />
exten => _.,n,Goto(earlydial2,${l_Extension},1)<br />
<br />
[earlydial2]<br />
exten => _.,n,Goto(noMatch,1)<br />
exten => noMatch,1, Incomplete(n)<br />
<br />
exten => i,1,Goto(noMatch,1)<br />
exten => t,1,Goto(noMatch,1)<br />
<br />
exten => _1XX,1,Verbose(2, Dialed ${EXTEN})<br />
same => n,Playback(extension)<br />
same => n,SayDigits(${EXTEN})<br />
same => n,Hangup()<br />
<br />
<br />
<br />
Best regards,<br />
- --<br />
Jean-Denis Girard<br />
<br />
SysNux Systèmes Linux en Polynésie française<br />
http://www.sysnux.pf/ Tél: +689 40.50.10.40 / GSM: +689 87.79.75.27<br />
<br />
Le 19/02/2016 03:31, Bryant Zimmerman a écrit :<br />
> Jean-Denis Girard<br />
><br />
> I have not used the Incomplete yet, but you might be able to do<br />
> something like this.<br />
><br />
> [earlydial]<br />
><br />
> exten => _.,1,Set(l_Extension = ${EXTEN})<br />
> exten => _.,n,Goto(${l_Extension},1)<br />
> exten => _.,n,Goto(noMatch,1)<br />
><br />
> exten => i,1,Goto(noMatch,1)<br />
><br />
> exten => noMatch,1, Incomplete(n)<br />
><br />
> exten => _1XX,1,Verbose(2, Dialed ${EXTEN})<br />
> same => n,Playback(extension)<br />
> same => n,SayDigits(${EXTEN})<br />
> same => n,Hangup()<br />
><br />
><br />
> I wrote this in this message and have not tested this so use with<br />
> caution. There may be syntactical issues, but the concept might work f<br />
or<br />
> you.<br />
><br />
> Bryant<br />
><br />
> ----------------------------------------------------------------------<br />
- --<br />
> *From*: "Jean-Denis Girard" <jd.girard@sysnux.pf><br />
> *Sent*: Thursday, February 18, 2016 8:02 PM<br />
> *To*: asterisk-users@lists.digium.com<br />
> *Subject*: Re: [asterisk-users] Grandstream Early Dial<br />
><br />
> Le 18/02/2016 11:03, Richard Mudgett a écrit :<br />
>> I've been using Grandstream phones for more than 10 years, but onl<br />
> y<br />
>> yesterday tried to use Early Dial... and I failed. What is needed<br />
> on the<br />
>> Asterisk side to reply 484 to INVITE? Phones are talking to chan_p<br />
> jsip<br />
>> on Asterisk-13.7.1.<br />
><br />
><br />
>> Look into the Incomplete application.<br />
>> https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_In<br />
c<br />
> omplete<br />
><br />
> Thanks for prompt answer Richard.<br />
><br />
> Actually I had already tried the Incomplete application, but failed to<br />
> add the "n" option, and this seems mandatory for SIP. I find the help<br />
> text misleading : "NOTE: Most channel types need to be in Answer state<br />
> in order to receive DTMF".<br />
><br />
> This is my test dialplan:<br />
><br />
> [earlydial] ; Test Early Dial<br />
> exten => 1,1,Verbose(2,Incomplete 1 test)<br />
> same => n,Incomplete(n)<br />
><br />
> exten => _1X,1,Verbose(2,Incomplete 1X test)<br />
> same => n,Incomplete(n)<br />
><br />
> exten => _1XX,1,Verbose(2, Dialed ${EXTEN})<br />
> same => n,Playback(extension)<br />
> same => n,SayDigits(${EXTEN})<br />
> same => n,Hangup()<br />
><br />
> It works, but seems a bit complicated: is this the correct way to use<br />
> Incomplete ?<br />
><br />
><br />
> Thanks,<br />
><br />
> --<br />
> _____________________________________________________________________<br />
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --<br />
> New to Asterisk? Join us for a live introductory webinar every Thurs:<br />
> http://www.asterisk.org/hello<br />
><br />
> asterisk-users mailing list<br />
> To UNSUBSCRIBE or update options visit:<br />
> http://lists.digium.com/mailman/listinfo/asterisk-users<br />
><br />
><br />
><br />
<br />
-----BEGIN PGP SIGNATURE-----<br />
<br />
iEYEARECAAYFAlbHSGkACgkQuu7Rv+oOo/gZxACfbdgJl2eKFmO+D8R8MbsayKFm<br />
QkEAoK9JXYXS1XMyMcEKSt+FbzP1Ic1v<br />
=hMTP<br />
-----END PGP SIGNATURE-----<br />
<br />
--<br />
_____________________________________________________________________<br />
-- Bandwidth and Colocation Provided by http://www.api-digital.com --<br />
New to Asterisk? Join us for a live introductory webinar every Thurs:<br />
http://www.asterisk.org/hello<br />
<br />
asterisk-users mailing list<br />
To UNSUBSCRIBE or update options visit:<br />
http://lists.digium.com/mailman/listinfo/asterisk-users<br />
 </div></span>