El requerimiento es que las troncales tengan el mismo nombre seguido de un número, empezando con el cero. En el ejemplo mis troncales se llaman R0,R1,R2,R3.
include => dialroundrobin
include => roundrobin
exten => _1X.,1,Set(last=$[(${DB(rr/last)}+1)%2]) ;cambiar el valor 2 por la cantidad de troncales en su RR
exten => _1X.,n,Set(DB(rr/last)=${last})
exten => _1X.,n,Dial(SIP/R${last}/${EXTEN}) ;Cambiar R por el nombre de su troncal
exten => _1X.,n,GotoIf(${DIALSTATUS}="BUSY",1,fin)
exten => _1X.,n(fin),Hangup
[dialroundrobin]
exten => _1X.,1,Goto(roundrobin,${EXTEN},1)
-------------------------------------------------------------------------------------------------------------------
PRUEBA EXITOSA
-----------------------------------------------------------------------------------------------------------------
-- Executing [1809754@from-internal:1] Goto("SIP/1200-00000024", "roundrobin,1809754,1") in new stack
-- Goto (roundrobin,1809754,1)
-- Executing [1809754@roundrobin:1] Set("SIP/1200-00000024", "last=1") in new stack
-- Executing [1809754@roundrobin:2] Set("SIP/1200-00000024", "DB(rr/last)=1") in new stack
-- Executing [1809754@roundrobin:3] Dial("SIP/1200-00000024", "SIP/R1/1809754") in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Called SIP/R1/1809754
> 0x2d0e650 -- Strict RTP learning after remote address set to: 192.168.50.63:16414
-- SIP/R1-00000025 is making progress passing it to SIP/1200-00000024
== Spawn extension (roundrobin, 1809754, 3) exited non-zero on 'SIP/1200-00000024'
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
> 0x7fc74c008c20 -- Strict RTP learning after remote address set to: 192.168.50.20:9172
-- Executing [1809754@from-internal:1] Goto("SIP/1200-00000026", "roundrobin,1809754,1") in new stack
-- Goto (roundrobin,180975,1)
-- Executing [1809754@roundrobin:1] Set("SIP/1200-00000026", "last=0") in new stack
-- Executing [1809754@roundrobin:2] Set("SIP/1200-00000026", "DB(rr/last)=0") in new stack
-- Executing [1809754@roundrobin:3] Dial("SIP/1200-00000026", "SIP/R0/1809754") in new stack
No comments:
Post a Comment