Friends, how can I give hungup on a call where the callerid (origin) is the same as the dialed number (destination), does asterisk have to do this comparison and hang up the call?
Thank you
Yes, you have to write the code that compares yourself, but why do you answer the call in the first place?
The comparison may not be as simple as it seems, because you may have to consider different representations of the same number.
The number will always be 10 or 11 digits, do you have any rule examples I can do in extensions?
Basically you need to compare {CallerId(num)} with {EXTEN}, but you need to consider the following assuming that you are only using global phone numbers. An American number may start with 1, +1, or 001, so you cannot simply compare strings.
In my case the callerid field will always be 11 digits, if the user dial in addition to 11 digits will be hungup. example: callerid 55667788990 and dial 55667788990 after the comparison will be hungup. The user can change the callerid by pbx, but can not change the extensions rules! So if it changes the callerid to any number that is 11 digits the asterisk would have to compare and give hungup if the numbers are the same! Can you help me with this rule?
I am not sure whether I understand what you are trying to do.
If the user changes the own CallerID, the numbers do not match, so these calls should be allowed.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.