Put the _X below the first 4 extensions. -----Original Message----- From: asterisk-users-admin@lists.digium.com [mailto:asterisk-users-admin@lists.digium.com] On Behalf Of firedude@shorelinuxsolutions.com Sent: Wednesday, July 23, 2003 5:14 PM To: asterisk-users@lists.digium.com Subject: [Asterisk-Users] how do I do s extensions with PRI I would like to know how to define the s extension when I have an incoming PRI line? Currently I have 5 incoming DID numbers. Four of these DID numbers I have going to specific extensions, the fifth number which is the main number I wish to go to a background sound where callers can hear message, get directory, dial extension, whatever. I see that the way to normally do this would be to define s extensions and then step up the priorities for each action I wished to be taken. However, with the PRI line it seems that I can't use the s extension. I can use exten => _X. but this screws up the other four DID numbers which I have going to specific extensions. Is there a way with a PRI that I can define an s extension or something like it to save from having to type an entire 10 digit string multiple places? Thanks for any suggestions. AJ _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users
firedude@shorelinuxsolutions.com
2003-Jul-23 14:14 UTC
[Asterisk-Users] how do I do s extensions with PRI
I would like to know how to define the s extension when I have an incoming PRI line? Currently I have 5 incoming DID numbers. Four of these DID numbers I have going to specific extensions, the fifth number which is the main number I wish to go to a background sound where callers can hear message, get directory, dial extension, whatever. I see that the way to normally do this would be to define s extensions and then step up the priorities for each action I wished to be taken. However, with the PRI line it seems that I can't use the s extension. I can use exten => _X. but this screws up the other four DID numbers which I have going to specific extensions. Is there a way with a PRI that I can define an s extension or something like it to save from having to type an entire 10 digit string multiple places? Thanks for any suggestions. AJ
The way I do this is to create a separate context that has a
"match-all" statement, and then jump to a supplemental context that
does the real matching. Just use ${EXTEN} in the Goto jump. You can
also just put the _X. in front of the other extensions in the same
context, but I like to keep things a little bit apart to prevent
ordering confusion.
[generic1]
exten => _X.,1,SetVar(FOO=BAR)
exten => _X.,2,BogoApplication(some-variables)
exten => _X.,3,Goto(generic2,${EXTEN},1)
[generic2]
exten => _345.,1,Dial(SIP/345)
.
.
.
(etc. - all of your "real" matches in here)
JT
>I would like to know how to define the s extension when I have an incoming
>PRI line? Currently I have 5 incoming DID numbers. Four of these DID
>numbers I have going to specific extensions, the fifth number which is the
>main number I wish to go to a background sound where callers can hear
>message, get directory, dial extension, whatever. I see that the way to
>normally do this would be to define s extensions and then step up the
>priorities for each action I wished to be taken. However, with the PRI
>line it seems that I can't use the s extension. I can use exten =>
_X.
>but this screws up the other four DID numbers which I have going to
>specific extensions. Is there a way with a PRI that I can define an s
>extension or something like it to save from having to type an entire 10
>digit string multiple places?
>
>Thanks for any suggestions.
>AJ
>
>_______________________________________________
>Asterisk-Users mailing list
>Asterisk-Users@lists.digium.com
>http://lists.digium.com/mailman/listinfo/asterisk-users
Steven Critchfield
2003-Jul-23 16:27 UTC
[Asterisk-Users] how do I do s extensions with PRI
A PRI Does not have a s extension as all calls will have a DID assigned to the call. At best, on your 5th DID place a Goto to the s|1 and be done with it. On Wed, 2003-07-23 at 16:14, firedude@shorelinuxsolutions.com wrote:> I would like to know how to define the s extension when I have an incoming > PRI line? Currently I have 5 incoming DID numbers. Four of these DID > numbers I have going to specific extensions, the fifth number which is the > main number I wish to go to a background sound where callers can hear > message, get directory, dial extension, whatever. I see that the way to > normally do this would be to define s extensions and then step up the > priorities for each action I wished to be taken. However, with the PRI > line it seems that I can't use the s extension. I can use exten => _X. > but this screws up the other four DID numbers which I have going to > specific extensions. Is there a way with a PRI that I can define an s > extension or something like it to save from having to type an entire 10 > digit string multiple places? > > Thanks for any suggestions. > AJ > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users-- Steven Critchfield <critch@basesys.com>