Creating an outbound route that does not use domain-variables

Voipy

Member
Feb 5, 2026
76
8
8
56
A number of our customers use PIN codes. We use a few global outbound routes. The easiest way to add pin codes is to simply add pin_number.lua in the domain variables. This works fine - except when someone has a call forward set to an external number as it will need a PIN code to dial out.

We can create a separate outbound route for a call forward. But how would I make that route ignore some of the domain variables? I know I can unset any domain variable in that route before it hits the gateway but in this case that does not help as it will hit the lua script - there is nothing to unset really.

We get around it currently by NOT using domain variables for this but to just create outbound routes that are not global for those customers who want this. But seeing that we have 5 outbound routes with different patterns it would be less work if we didn't have to do this.

Does anyone know of a way to make only one route just ignoring specific domain variables? I fear that this is not possible but on the off chance that someone says "of course, this is how" I am posting it anyway :-)
 
If call forward is being set with the system feature code and NOT through the endpoint itself, you can potentially check for the SIP diversion header as a condition
 
@ja133 the issue is not so much that - the problem is that the call goes out through an outbound route, and because we have a domain variable set that add a PIN code request before the call goes out to the gateway, any outbound route for that domain is subjected to this. I am trying to see if there is a way to remove a domain variable (but I guess THAT's why it's called a domain variable ;) ) on just one outbound route
 
I am reading the reply again and only now see that you can also set a condition under domain variables - so @ja133 that means that this may indeed be possible. Thanks for that input!
 
  • Like
Reactions: ja133