Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

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

[asterisk-users] pattern regexten and dialing to trunk


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





PostPosted: Tue Aug 25, 2015 1:59 pm    Post subject: [asterisk-users] pattern regexten and dialing to trunk Reply with quote

Hi list! I'm currently stucked and don't know how to properly resolve
next situation:

I'm using asterisk with regcontext and regexten, so far its works: NoOps
with prio 1 dynammicaly added or removed as expected.

Example: 3 trunks: tr1 with regexten _1XXX; tr2 with regexten _2XXX and
tr3 with regexten _3XXX

'_1XXX' => 1. NoOp(tr1) [SIP]
'_1XXX' => 2. Dial(SIP/tr1/${EXTEN})
[pbx_config]
'_2XXX' => 1. NoOp(tr2) [SIP]
'_2XXX' => 2. Dial(SIP/tr2/${EXTEN})
[pbx_config]
'_3XXX' => 1. NoOp(tr3) [SIP]
'_3XXX' => 2. Dial(SIP/tr3/${EXTEN})
[pbx_config]

I can't just write _X.,2,Dial(SIP/${EXTEN}) because it is trunks, and i
have to write extension with priority 2 for each trunk i have.

It is possible somehow use _X.,2,Dial(..) in this situation? because
when it is just 3 trunks it is not a big problem, but when their amount
is about hundred...

....


I'm thinking about adding additional option "regapp" to set custom app
instead of default NoOp. Something like this:

sip.config:

[general]
regcontext = internal
regapp = Set(CALLED_TRUNK={$name})

[tr1]
...
regexten = _1XXX
...

dialplan show internal:

[ Context 'internal' created by 'pbx_config' ]
'_1XXX' => 1. Set(CALLED_TRUNK=tr1) [SIP]
'_2XXX' => 1. Set(CALLED_TRUNK=tr2) [SIP]
'_3XXX' => 1. Set(CALLED_TRUNK=tr3) [SIP]
'_X.' => 2. Dial(SIP/${CALLED_TRUNK}/${EXTEN})
[pbx_config]

But i hope it is possible to achieve this with default options...


--
_____________________________________________________________________
-- 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