On Tue, Jun 06, 2017 at 12:40:21AM +0200, Hans-Peter Jansen wrote:
> > Yes, something like if they can't fix the R-URI:
> > exten => X_.,n,Set(TO=${CUT(SIP_HEADER(To),@,1)})
> > exten => X_.,n,Set(TO=${CUT(TO,:,2)})
> > exten => X_.,n,Goto(somewhereelsetopreventloops${TO},1)
> 
> Sorry for the silly question, but how do I feed the TO variable back to the 
> usual pattern matching? Assign to $EXTEN?

The goto does that (with fixed typo):
exten => X_.,n,Goto(somewhereelsetopreventloops,${TO},1)
 
The reason to send to another context  where you handle specific DIDs is
to prevent loops. _X. is kind of a wildcard, if there is no DID for the
TO this will loop in _X.


-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
      https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to