hello
Can any one tell me how can i Restrict a perticular sip extension not to dial an internation no. 92212789320…I dont want this to effect to the rest of the extensions
How can i do that…do i have to make a seprate dialplan for that sip user perticularly…can anyone tell me
Thanks
Hasnain
you shouldn’t have to create a separate dialplan. you could either :
a) create a new context for this user with a single extension matching this number that just went to Congestion(). then #include the rest of the dialplan.
b) create some pattern-matching in the dialplan that went to Congestion() (or any other message you want) if the CallerID(Num) matched the user in question when dialling that destination.
hello
I really appreciate your help… actaully im a bit new to it, can you pleae create a sample of what you said…so that i could past it there after some customization…it would really help me alot
Thanks
Hasnain
[quote=“hasnain110”]I really appreciate your help… actaully im a bit new to it, can you pleae create a sample of what you said…so that i could past it there after some customization…it would really help me alot
[/quote]
scenario a : [from-internal-restricted]
exten => _92212789320,1,NoOp(Disallowed International Call)
exten => _92212789320,2,Congestion()
exten => _92212789320,3,Hangup()
#include = from-internal ; this is where the rest of your internal dialplan is kept
scenario b : [from-internal]
exten => _92212789320,1,NoOp(Checking for Disallowed International Call)
exten => _92212789320,2,GotoIf($["${CALLERIDNUM}" = "INSERT EXTENSION NUMBER HERE"]?3:5)
exten => _92212789320,3,Congestion()
exten => _92212789320,4,Hangup()
exten => _92212789320,5,Dial(INSERT YOUR DIALSTRING HERE)
exten => _92212789320,6,Hangup()
; rest of dialplan follows
the wiki is your friend. we were all new once, it’s up to you how much you learn. voip-info.org/wiki/index.php … cmd+GotoIf
hello
Thanks alot for the help…ill try these codes and ill let you know , again thanks alot
i like baconbutties way of having separate contexts…this is how our system is set up and it has proved to be IMMENSELY flexible…
[internal]
include => local-extensions
include => toll-free
include => long-distance
include => local
include => international
[internal-restricted]
include => local-extensions
include => toll-free
include => local
[internal-only]
include => local-extensions
;;;;;;;;;;;;;;
[local-extensions]
exten => 101,1,Dial(SIP/101,15)…
; and so on
i’m not going to code out all of the outbound dialing contexts - basically it’s the same as what baconbuttie already posted, but with _9NXXNXXXXXX instead of the actual number, but you get the idea.
nested contexts are probably the BEST way to streamline your dialplan. between that and file includes (#include “filename.conf”) you can break everything up into bite-size pieces, which makes modifying and adjusting thigns VERY easy…
sorry to go off like this, but if this helps anyone it’s worth it.