Yate Community Forum
General Category => Yate users hangout place => Topic started by: dan@etrixs.co.uk on February 24, 2015, 04:10:25 AM
-
Hi I'm struggling to understand the documentation so was hoping someone can help me.
I've installed YATE on ubuntu as default. So I understand this is a simple sip server.
I've setup four users/extensions.
100
200
300
400
And they all work great. They can all dial each other and have conversations.
Now my next step is to do the following
I want to change the line 100 so that it becomes an alias for my external voip provider (voip studio)
I've setup my voip account in accfile.conf and I can see from the logs that it's connected to my voip account successfully.
The problem comes when I try to setup the routing.... and I think it's because I don't understand what is happening.
Basically, I want the following to happen, if I dial a number on extension 100 I want it to use my Voip Provider. If someone rings my voip external number then my extension 100 will ring.
So in regexroute.conf i've tried the following 2 expressions but neither seem to work.
^100$=line/100;line=voip_studio
or
^.*$=line/\0;line=voip_studio
Please can you help me solve this issue.
-
Configure regfile the have a route priority with a greater value then regexroute (this way regexroute will route first).
Avoid the same value: the order of handling will depend on module load order.
OR:
In preroute handler of regexroute change the called number and handle it in route:
[contexts]
${called}^100$=return;ORIG_CALLED=${called};CALL_TO_LINE=voip_studio;called
[default]
${CALL_TO_LINE}.=line/${ORIG_CALLED};line=${CALL_TO_LINE};called=${ORIG_CALLED}