Re: [asterisk-users] extensions ending with "#"...

2009-02-15 Thread Matt Riddell
On 6/02/2009 6:45 p.m., f...@hotbox.ru wrote:
> Benoit wrote:
>> f...@hotbox.ru a écrit :
>>> Hi everyone!
>>>
>>> I've set up asterisk ip-pbx to implement IVR menu and encountered such a 
>>> problem: when users dial the destinaion phone number and end it up with 
>>> "#" asterisk still waits until timeout in WaitExten() is reached.

Just use the read application:

[internal]
exten => _X.,1,Read(myvar)
exten => _X.,n,Goto(outgoing,${myvar},1)

[outgoing]
exten => _1234.,1,Dial(DAHDI/g0/${EXTEN})

-- 
Kind Regards,

Matt Riddell
Director
___

http://www.venturevoip.com (Great new VoIP end to end solution)
http://www.venturevoip.com/news.php (Daily Asterisk News - html)
http://www.venturevoip.com/newrssfeed.php (Daily Asterisk News - rss)

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] extensions ending with "#"...

2009-02-05 Thread flux
f...@hotbox.ru wrote:
> Benoit wrote:
>> f...@hotbox.ru a écrit :
>>> Hi everyone!
>>>
>>> I've set up asterisk ip-pbx to implement IVR menu and encountered such a 
>>> problem: when users dial the destinaion phone number and end it up with 
>>> "#" asterisk still waits until timeout in WaitExten() is reached.
>>>   
>> Well i don't see anything in the doc implying that the pound key should 
>> terminate the WaitExten timeout,
>> however this is the case for Read() but it's not the same use
>>> // Here comes the context where user is prompted for a dest. number:
>>> context ivr-dialout {
>>>  s => {
>>> Background(enter-your-dest-number);
>>>  WaitExten(15);
>>>  };
>>>
>>>  _X. => {
>>>  Dial(SIP/${EXTEN});
>>>  Hangup;
>>>  };
>>>
>>> How should I avoid this behavior and force asterisk not to wait for 15 
>>> seconds everytime and proceed dialing immediatly after pound key is 
>>> pressed? Any suggestions would be appreciated.
>>>   
>> Maybe a extension pattern like that:
>> _X.# =>
>> This would help asterisk know that they he has a full extension match 
>> when reach the pound sign
>>
> 
> Actually _X.# won't work, bacause this pattern will match any number. 
> "#" at the end of the pattern won't make sense. I've tried. So the thing 
> is I had to create an external application to handle numbers with "#" 
> and without "#" to issue a correct dial.
> 
>  _X. => {
>  AGI(parseExten.agi);
>  if(${AGISTATUS} = SUCCESS) {
>  Dial(SIP/${EXTEN});
>  Hangup;
>  }
>  Dial(SIP/${EXTEN:0:-1});
>  Hangup;
>  };
> 
> parseExten.agi in my case returns SUCCESS when a user didn't append "#" 
> and FAILURE when there's "#" symbol. If FAILURE is returned I get rid of 
> ending "#" and perform Dial().
> AFAICS asterisk can't handle immediate dialing after a pound key is 
> pressed. The extension _X.[#]! that would perform this function doesn't 
> work.
> 
> Watch this:
> http://www.mail-archive.com/asterisk-...@lists.digium.com/msg28135.html
> 
>> Or use Read() instead

I've tried to use Read() function just like you said, Benoit.

context ivr-dialout {
 s => {

Read(dest-num,prepaid-enter-dest,16);
Dial(SIP/${dest-num})

It works now and I don't need any external app to handle # now. Thank 
you very much.


>>> Thank you.
>>>   
>> Your welcome
>>
>> ___
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>>
>>
>>
>>
>>
> 
> 
> ___
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
> 
> 
> 
> 
> 
> 


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] extensions ending with "#"...

2009-02-05 Thread flux
Benoit wrote:
> f...@hotbox.ru a écrit :
>> Hi everyone!
>>
>> I've set up asterisk ip-pbx to implement IVR menu and encountered such a 
>> problem: when users dial the destinaion phone number and end it up with 
>> "#" asterisk still waits until timeout in WaitExten() is reached.
>>   
> 
> Well i don't see anything in the doc implying that the pound key should 
> terminate the WaitExten timeout,
> however this is the case for Read() but it's not the same use
>> // Here comes the context where user is prompted for a dest. number:
>> context ivr-dialout {
>>  s => {
>>  Background(enter-your-dest-number);
>>  WaitExten(15);
>>  };
>>
>>  _X. => {
>>  Dial(SIP/${EXTEN});
>>  Hangup;
>>  };
>>
>> How should I avoid this behavior and force asterisk not to wait for 15 
>> seconds everytime and proceed dialing immediatly after pound key is 
>> pressed? Any suggestions would be appreciated.
>>   
> 
> Maybe a extension pattern like that:
> _X.# =>
> This would help asterisk know that they he has a full extension match 
> when reach the pound sign
> 

Actually _X.# won't work, bacause this pattern will match any number. 
"#" at the end of the pattern won't make sense. I've tried. So the thing 
is I had to create an external application to handle numbers with "#" 
and without "#" to issue a correct dial.

 _X. => {
 AGI(parseExten.agi);
 if(${AGISTATUS} = SUCCESS) {
 Dial(SIP/${EXTEN});
 Hangup;
 }
 Dial(SIP/${EXTEN:0:-1});
 Hangup;
 };

parseExten.agi in my case returns SUCCESS when a user didn't append "#" 
and FAILURE when there's "#" symbol. If FAILURE is returned I get rid of 
ending "#" and perform Dial().
AFAICS asterisk can't handle immediate dialing after a pound key is 
pressed. The extension _X.[#]! that would perform this function doesn't 
work.

Watch this:
http://www.mail-archive.com/asterisk-...@lists.digium.com/msg28135.html

> Or use Read() instead
>> Thank you.
>>   
> Your welcome
> 
> ___
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
> 
> 
> 
> 
> 
> 


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] extensions ending with "#"...

2009-02-05 Thread Benoit
f...@hotbox.ru a écrit :
> Hi everyone!
>
> I've set up asterisk ip-pbx to implement IVR menu and encountered such a 
> problem: when users dial the destinaion phone number and end it up with 
> "#" asterisk still waits until timeout in WaitExten() is reached.
>   

Well i don't see anything in the doc implying that the pound key should 
terminate the WaitExten timeout,
however this is the case for Read() but it's not the same use
> // Here comes the context where user is prompted for a dest. number:
> context ivr-dialout {
>  s => {
>   Background(enter-your-dest-number);
>  WaitExten(15);
>  };
>
>  _X. => {
>  Dial(SIP/${EXTEN});
>  Hangup;
>  };
>
> How should I avoid this behavior and force asterisk not to wait for 15 
> seconds everytime and proceed dialing immediatly after pound key is 
> pressed? Any suggestions would be appreciated.
>   

Maybe a extension pattern like that:
_X.# =>
This would help asterisk know that they he has a full extension match 
when reach the pound sign

Or use Read() instead
> Thank you.
>   
Your welcome

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] extensions ending with "#"...

2009-02-05 Thread flux
Hi everyone!

I've set up asterisk ip-pbx to implement IVR menu and encountered such a 
problem: when users dial the destinaion phone number and end it up with 
"#" asterisk still waits until timeout in WaitExten() is reached.

// Here comes the context where user is prompted for a dest. number:
context ivr-dialout {
 s => {
Background(enter-your-dest-number);
 WaitExten(15);
 };

 _X. => {
 Dial(SIP/${EXTEN});
 Hangup;
 };

How should I avoid this behavior and force asterisk not to wait for 15 
seconds everytime and proceed dialing immediatly after pound key is 
pressed? Any suggestions would be appreciated.

Thank you.


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users