Author Topic: route not work  (Read 2242 times)

Bamper

  • Newbie
  • *
  • Posts: 4
    • View Profile
route not work
« on: November 18, 2014, 08:59:17 PM »
I have some problem width regexroute module

my config:
accfile.conf
Code: [Select]
[sip_1]
enabled=yes
protocol=sip
username=941234567
authname=941234567
password=1111
registrar=sip.domain.com (example)
domain=sip.domain.com (example)


regfile.conf
Code: [Select]
[941234567]
password=123456789

[100]
password=123456789


regexroute.conf
Code: [Select]
[default]
^38\(.*\)$=sip/sip:\1;line=sip_1;osip_From=<sip:941234567@MY_SERVER_IP>
^sip_1$=route/941234567

function route works only when username (from accfile.conf) = sip user
if I change the 941234567 on 100 - get error:
Code: [Select]
<sip/1:MILD> Call rejected error='noroute' reason='No route to call target'

marian

  • Sr. Member
  • ****
  • Posts: 385
    • View Profile
Re: route not work
« Reply #1 on: November 19, 2014, 06:27:34 AM »
The right side of the '=' in route handlers is the target to route the call to.
E.g. for sip is sip/...
What target is route/ ?
Do you have a module executing the call when the target starts with 'route/'?

Bamper

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: route not work
« Reply #2 on: November 19, 2014, 10:41:07 AM »
if I delete all rules from regexroute.conf
all incoming calls are still receives sip-user 941234567

marian

  • Sr. Member
  • ****
  • Posts: 385
    • View Profile
Re: route not work
« Reply #3 on: November 19, 2014, 10:48:47 AM »
What do you mean by 'all incoming calls are still receives sip-user 941234567'?

Calls to 941234567 are sent to registered user '941234567'?
This is ok, regfile has its own call.route handler and route calls to registered users.

Bamper

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: route not work
« Reply #4 on: November 19, 2014, 01:46:30 PM »
yes
but I want send all incoming calls to registered sip-user 100

how I can did it?

marian

  • Sr. Member
  • ****
  • Posts: 385
    • View Profile
Re: route not work
« Reply #5 on: November 19, 2014, 01:54:51 PM »
Set a lower value in regexroute call.route handler.
regexroute.conf:
[priorities]
route=90

This will allow regexroute to handle call.route before regfile.

Changed called number to 100 and let the call.route be handle by regfile:

[default]
.*=return false;called=100

Bamper

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: route not work
« Reply #6 on: November 19, 2014, 04:12:00 PM »
Thanks!!!
it works!