Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] Setting the causecode when no matching extension is found?


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
lists at binarus.de
Guest





PostPosted: Sat Oct 10, 2015 12:24 am    Post subject: [asterisk-users] Setting the causecode when no matching exte Reply with quote

Dear colleagues,

I have made fairly complex dialplan which uses REGEXP matching for allowing or disallowing certain calls, depending on the called extension. This works great so far, but there is one problem which I wasn't able to solve:

The plan does not handle all possible extensions a user could dial. For example, I have respected the advice which is given in the documents and avoided the extension pattern "_.", meaning that the respective context won't handle the case where a user dials an extension which is a single digit (e.g. "1"). If a user does so, Asterisk cancels the call (as it should be), thereby sending the message "not found" to the respective phone.

I would like to change that message (code) to "forbidden". I have found out that I can send the "forbidden" code to the phones by doing something like "Hangup(21)" in the dialplan. Naturally, this only works in cases where I am in control of the Hangup; it won't work in case Asterisk cancels the call automatically. Could anybody please tell me how I could change the code which is sent to phones when Asterisk can't find a matching extension (pattern) in the dialplan? Is there some hook to manipulate the causecode?

There seem to be some dialplan applications which are sending codes for "busy" or "congestion" to the other party, but I couldn't find an application for sending "forbidden" ...

Thank you very much,

Recursive



--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services