Yate server > Other Yate server issues

Round Robin in regexroute.conf

(1/3) > >>

bnaetsch:
Hello

I dont understand why this
^.*$=fork $(index,$idx00,|sip/sip:\0@62.XXX.XX.XX0:5065,|sip/sip:\0@213.XX.XX.XX0:5065)
not works

It should distribute all incomming calls to more than one telephonie systems

I followed your example in the documentation
http://docs.yate.ro/wiki/Round_Robin_Routing

If I dont use round robin, like this
.*$=sip/sip:\0@62.XXX.XX.XX0:5065
it works fine

Here the Log
20160107114728.768263 <sip/2:ALL> YateSIPConnection::YateSIPConnection(0x6e69800658f0,0x6e6980065090) [0x6e6980065d40]
20160107114728.768731 <sip/2:ALL> NAT address is '(null)' [0x6e6980065d40]
20160107114728.769961 <sip/2:ALL> Set media: audio=alaw,mulaw [0x6e6980065d40]
20160107114728.771294 <INFO> Classifying caller '+493512XXXXX' in context 'inbound' in 273 usec
20160107114728.771470 <cdrbuild:INFO> Got message 'call.route' for untracked id 'sip/2'
20160107114728.772071 <INFO> Routing call to '+493518XXXXXX' in context 'inbound' via 'fork |sip/sip:+493518XXXXXX@213.XX.XX.XX0:5065' in 355 usec
20160107114728.772146 <sip/2:ALL> NAT address is '(null)' [0x6e6980065d40]
20160107114728.772928 <callfork:MILD> Call 'sip/2' ignoring modifier 'sip/sip:+493518XXXXXX@213.XX.XX.XX0:5065'
20160107114728.772989 <sip/2:ALL> YateSIPConnection::disconnected() '(null)' [0x6e6980065d40]
20160107114728.773215 <sip/2:MILD> Call rejected error='(null)' reason='(null)' [0x6e6980065d40]
20160107114728.775265 <sip/2:ALL> YateSIPConnection::hangup() state=0 trans=0x6e6980065090 error='failure' code=500 reason='(null)' [0x6e6980065d40]
20160107114728.775379 <sip/2:ALL> YateSIPConnection::~YateSIPConnection() [0x6e6980065d40]
20160107114728.775687 <sip:INFO> 'udp:0.0.0.0:5060' sending code 500 0x3927af0 to 85.XXX.XXX.206:5060 [0x390ddb0]

or

20160107111057.003374 <sip/1:ALL> YateSIPConnection::YateSIPConnection(0x6e6980058090,0x6e6980059f90) [0x6e698005a480]
20160107111057.003981 <sip/1:ALL> NAT address is '(null)' [0x6e698005a480]
20160107111057.005136 <sip/1:ALL> Set media: audio=alaw,mulaw [0x6e698005a480]
20160107111057.006194 <INFO> Classifying caller '+493512XXXXX' in context 'inbound' in 236 usec
20160107111057.006602 <cdrbuild:INFO> Got message 'call.route' for untracked id 'sip/1'
20160107111057.007068 <INFO> Routing call to '+493518XXXXXX' in context 'inbound' via 'fork |sip/sip:+493518XXXXXX@62.XXX.XX.XX0:5065' in 340 usec
20160107111057.007241 <sip/1:ALL> NAT address is '(null)' [0x6e698005a480]
20160107111057.008891 <callfork:MILD> Call 'sip/1' ignoring modifier 'sip/sip:+493518XXXXXX@62.XXX.XX.XX0:5065'
20160107111057.008921 <sip/1:ALL> YateSIPConnection::disconnected() '(null)' [0x6e698005a480]
20160107111057.009072 <sip/1:MILD> Call rejected error='(null)' reason='(null)' [0x6e698005a480]
20160107111057.009426 <sip/1:ALL> YateSIPConnection::hangup() state=0 trans=0x6e6980059f90 error='failure' code=500 reason='(null)' [0x6e698005a480]
20160107111057.009464 <sip/1:ALL> YateSIPConnection::~YateSIPConnection() [0x6e698005a480]
20160107111057.010929 <sip:INFO> 'udp:0.0.0.0:5060' sending code 500 0x3925ba0 to 85.131.161.206:5060 [0x390ddb0]

Thank you for your advice
Regards
Burkhard

marian:
The pipe character '|' is a target by itself.
In your case you should either insert a space between | and next target or remove the pipe character: you have only one target.

More that that:
Since you have only one target you don't need the fork module, just route the call to sip:
^.*$=sip/sip:\0@$(index,$idx00,62.XXX.XX.XX0:5065,213.XX.XX.XX0:5065)

bnaetsch:
Thanks for your advice

it works fine

Regards
Burkhard

ky4k0b:
marian,

how can I round-robin between lines configured in accfile?
for instance I have two lines :

--- Code: ---[123]
enabled=yes
protocol=sip
username=123
password=123
registrar=sip.registrar.com:5260

[456]
enabled=yes
protocol=sip
username=456
password=456
registrar=sip.registrar.com:5260

--- End code ---

will this line in regexroute work? I mean if I have incoming call to dnis 123 will it be routed to line 123 and dnis 456 to according line 456?

--- Code: ---^\(.*\)$=line/\1;line=\1
--- End code ---

marian:
If you want to route called number to its line: yes

Navigation

[0] Message Index

[#] Next page

Go to full version