[asterisk-users] R2-Unicall Asterisk as CPE and as CO
Victor Toofic
toofics at gmail.com
Fri Jan 18 09:41:07 CST 2008
Hi!
Im having some troubles trying to configure * as a bridge between a telco
and a pbx with R2, the scenario is this:
------------ E1/R2 --------- E1/R2 ------------
| Telco |-------------| * |-------------| PBX |
| (Telmex) | --------- | |
------------ ------------
I can receive calls from the telco and can place calls to the pbx, I also
can place calls to the telco.. but I can't receive any calls from the pbx.
When receive a call from the pbx I get this:
cause 32771 - T3 timed out
If I connect the pbx directly to the telco there is no problem, the calls
are stablished correctly.
Im using the package at:
http://www.moythreads.com/astunicall/downloads/
http://www.moythreads.com/astunicall/files/astunicall-1.2.25-0.1.tar.gz
that contains:
asterisk-1.2.25
spandsp-0.0.4
unicall-0.0.5pre1
libmfcr2-0.0.3
libsupertone-0.0.2
libunicall-0.0.3
zaptel-1.2.22
My zaptel.conf is this:
loadzone=mx
defaultzone=mx
span=1,1,0,cas,hdb3
span=2,1,0,cas,hdb3
span=3,0,0,cas,hdb3
span=4,0,0,cas,hdb3
cas=1-15:1101
cas=17-31:1101
cas=32-46:1101
cas=48-62:1101
cas=63-77:1101
cas=79-93:1101
cas=94-103:1101
cas=110-124:1101
and unicall.conf is this:
[channels]
usecallerid=no
hidecallerid=no
callwaitingcallerid=no
threewaycalling=no
transfer=no
cancallforward=no
callreturn=no
echocancel=yes
echocancelwhenbridged=yes
rxgain=0.0
txgain=0.0
immediate=yes
loglevel=255
protocolclass=mfcr2
protocolvariant=mx,10,4,16
group=1
protocolend=cpe
context=incoming1
channel => 1-15
channel => 17-31
group=2
protocolend=cpe
context=incoming2
channel => 32-46
channel => 48-62
protocolvariant=mx,10,8
group=3
immediate=yes
usecallerid=yes
protocolend=co
context=incoming3
channel => 63-77
channel => 79-93
group=4
protocolend=co
context=incoming4
channel => 94-103
channel => 110-124
The port #1 of a TE405P card is connected to the telco and the port #3 is
connected to the pbx.
I've changed the line (chan_unicall.c):
uc_callparm_calling_party_category(callparms,
UC_CALLER_CATEGORY_NATIONAL_SUBSCRIBER_CALL);
to
uc_callparm_calling_party_category(callparms,
UC_CALLER_CATEGORY_NATIONAL_PRIORITY_SUBSCRIBER_CALL);
because without this I cant receive calls from the telco. With or without this I
can't place calls to the pbx.
When I receive a call from the telco I place it directly to the pbx.. and
that works ok:
Jan 16 12:27:01 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 <- 0001
[1/IDLE /Idle /Idle ]
Jan 16 12:27:01 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 Detected
Jan 16 12:27:01 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 Creating a
new call with CRN 32770
Jan 16 12:27:01 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 1101 ->
[2/DETECTED/Seize ack /Seize ack ]
Jan 16 12:27:01 NOTICE[4136] chan_unicall.c: Unicall/2 event Detected
Jan 16 12:27:01 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 <- 4 on
[2/DETECTED/Seize ack /Seize ack ]
Jan 16 12:27:01 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 6 on ->
[2/DETECTED/Group C /Category req ]
Jan 16 12:27:01 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 <- 4 off
[2/DETECTED/Group C /Category req ]
Jan 16 12:27:01 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 6 off ->
[2/DETECTED/Group C /Category req ]
Jan 16 12:27:01 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 <- 2 on
[2/DETECTED/Group C /Category req ]
Jan 16 12:27:01 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 1 on ->
[2/DETECTED/Group C /ANI request ]
Jan 16 12:27:01 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 <- 2 off
[2/DETECTED/Group C /ANI request ]
Jan 16 12:27:01 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 1 off ->
[2/DETECTED/Group C /ANI request ]
Jan 16 12:27:01 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 <- F on
[2/DETECTED/Group C /ANI request ]
Jan 16 12:27:01 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 5 on ->
[2/DETECTED/Group A /DNIS request ]
Jan 16 12:27:01 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 <- F off
[2/DETECTED/Group A /DNIS request ]
Jan 16 12:27:01 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 5 off ->
[2/DETECTED/Group A /DNIS request ]
Jan 16 12:27:01 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 <- 6 on
[2/DETECTED/Group A /DNIS request ]
Jan 16 12:27:01 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 1 on ->
[2/DETECTED/Group A /DNIS request ]
Jan 16 12:27:01 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 <- 6 off
[2/DETECTED/Group A /DNIS request ]
Jan 16 12:27:01 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 1 off ->
[2/DETECTED/Group A /DNIS request ]
Jan 16 12:27:01 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 <- 0 on
[2/DETECTED/Group A /DNIS request ]
Jan 16 12:27:01 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 1 on ->
[2/DETECTED/Group A /DNIS request ]
Jan 16 12:27:01 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 <- 0 off
[2/DETECTED/Group A /DNIS request ]
Jan 16 12:27:01 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 1 off ->
[2/DETECTED/Group A /DNIS request ]
Jan 16 12:27:01 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 <- 0 on
[2/DETECTED/Group A /DNIS request ]
Jan 16 12:27:01 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 3 on ->
[2/DETECTED/Group B /Go to grp II ]
Jan 16 12:27:01 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 <- 0 off
[2/DETECTED/Group B /Go to grp II ]
Jan 16 12:27:01 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 3 off ->
[2/DETECTED/Group B /Go to grp II ]
Jan 16 12:27:02 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 <- 2 on
[2/DETECTED/Group B /Go to grp II ]
Jan 16 12:27:02 NOTICE[4136] chan_unicall.c: Unicall/2 event Offered
Jan 16 12:27:02 NOTICE[4136] chan_unicall.c: CRN 32770 - Offered on
channel 0 (ANI: , DNIS: 4600, Cat: 1)
Jan 16 12:27:02 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 Call
control(5)
Jan 16 12:27:02 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 Accept call
Jan 16 12:27:02 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 1 on ->
[2/OFFERED /Group B /Accepted Paid]
Jan 16 12:27:02 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 <- 2 off
[2/OFFERED /Group B /Accepted Paid]
Jan 16 12:27:02 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 1 off ->
[2/OFFERED /Group B /Accepted Paid]
Jan 16 12:27:02 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 Answer guard
expired
Jan 16 12:27:02 NOTICE[4136] chan_unicall.c: Unicall/2 event Accepted
Jan 16 12:27:02 DEBUG[4136] chan_unicall.c: MFC/R2 UniCall/2 Channel gains
Jan 16 12:27:02 DEBUG[4146] pbx.c: Function result is ''
Jan 16 12:27:02 NOTICE[4146] chan_unicall.c: Answer Call
Jan 16 12:27:02 DEBUG[4146] chan_unicall.c: MFC/R2 UniCall/2 Call
control(6)
Jan 16 12:27:02 DEBUG[4146] chan_unicall.c: MFC/R2 UniCall/2 Answer call
Jan 16 12:27:02 DEBUG[4146] chan_unicall.c: MFC/R2 UniCall/2 0101 ->
[1/ACCEPTED/Answer /Accepted Paid]
Jan 16 12:27:02 DEBUG[4146] chan_unicall.c: unicall_call called -
'g3/4600'
Jan 16 12:27:02 DEBUG[4146] chan_unicall.c: MFC/R2 UniCall/64 Call
control(1)
Jan 16 12:27:02 DEBUG[4146] chan_unicall.c: MFC/R2 UniCall/64 Make call
Jan 16 12:27:02 DEBUG[4146] chan_unicall.c: MFC/R2 UniCall/64 Creating a
new call with CRN 32770
Jan 16 12:27:02 DEBUG[4146] chan_unicall.c: MFC/R2 UniCall/64 0001 ->
[1/DIALING /Seize /Idle ]
Jan 16 12:27:02 NOTICE[4146] chan_unicall.c: Unicall/64 event Dialing
Jan 16 12:27:02 NOTICE[4146] chan_unicall.c: Unicall/2 event Answered
Jan 16 12:27:02 DEBUG[4146] chan_unicall.c: MFC/R2 UniCall/2 Channel echo
cancel
Jan 16 12:27:02 DEBUG[4146] chan_unicall.c: Enabled echo cancellation on
channel 2
Jan 16 12:27:02 DEBUG[4146] chan_unicall.c: Exception on 72, channel 64
Jan 16 12:27:02 DEBUG[4146] chan_unicall.c: MFC/R2 UniCall/64 <- 1101
[1/DIALING /Seize /Idle ]
Jan 16 12:27:02 DEBUG[4146] chan_unicall.c: MFC/R2 UniCall/64 4 on ->
[2/DIALING /Group I /DNIS ]
Jan 16 12:27:02 DEBUG[4146] chan_unicall.c: MFC/R2 UniCall/64 <- 1 on
[2/DIALING /Group I /DNIS ]
Jan 16 12:27:02 DEBUG[4146] chan_unicall.c: MFC/R2 UniCall/64 4 off ->
[2/DIALING /Group I /DNIS ]
Jan 16 12:27:02 DEBUG[4146] chan_unicall.c: MFC/R2 UniCall/64 <- 1
off [2/DIALING /Group I /DNIS ]
Jan 16 12:27:02 DEBUG[4146] chan_unicall.c: MFC/R2 UniCall/64 6 on ->
[2/DIALING /Group I /DNIS ]
Jan 16 12:27:02 DEBUG[4146] chan_unicall.c: MFC/R2 UniCall/64 <- 1 on
[2/DIALING /Group I /DNIS ]
Jan 16 12:27:02 DEBUG[4146] chan_unicall.c: MFC/R2 UniCall/64 6 off ->
[2/DIALING /Group I /DNIS ]
Jan 16 12:27:02 DEBUG[4146] chan_unicall.c: MFC/R2 UniCall/64 <- 1
off [2/DIALING /Group I /DNIS ]
Jan 16 12:27:02 DEBUG[4146] chan_unicall.c: MFC/R2 UniCall/64 0 on ->
[2/DIALING /Group I /DNIS ]
Jan 16 12:27:02 DEBUG[4146] chan_unicall.c: MFC/R2 UniCall/64 <- 1 on
[2/DIALING /Group I /DNIS ]
Jan 16 12:27:02 DEBUG[4146] chan_unicall.c: MFC/R2 UniCall/64 0 off ->
[2/DIALING /Group I /DNIS ]
Jan 16 12:27:03 DEBUG[4146] chan_unicall.c: MFC/R2 UniCall/64 <- 1
off [2/DIALING /Group I /DNIS ]
Jan 16 12:27:03 DEBUG[4146] chan_unicall.c: MFC/R2 UniCall/64 0 on ->
[2/DIALING /Group I /DNIS ]
Jan 16 12:27:03 DEBUG[4146] chan_unicall.c: MFC/R2 UniCall/64 <- 3 on
[2/DIALING /Group I /DNIS ]
Jan 16 12:27:03 DEBUG[4146] chan_unicall.c: MFC/R2 UniCall/64 0 off ->
[2/DIALING /Group I /DNIS ]
Jan 16 12:27:03 DEBUG[4146] chan_unicall.c: MFC/R2 UniCall/64 <- 3
off [2/DIALING /Group I /DNIS ]
Jan 16 12:27:03 DEBUG[4146] chan_unicall.c: MFC/R2 UniCall/64 2 on ->
[2/PROCEED /Group II /Category ]
Jan 16 12:27:03 NOTICE[4146] chan_unicall.c: Unicall/64 event Proceeding
Jan 16 12:27:03 DEBUG[4146] chan_unicall.c: MFC/R2 UniCall/64 <- 1 on
[2/PROCEED /Group II /Category ]
Jan 16 12:27:03 DEBUG[4146] chan_unicall.c: MFC/R2 UniCall/64 2 off ->
[2/PROCEED /Group II /Category ]
Jan 16 12:27:03 DEBUG[4146] chan_unicall.c: MFC/R2 UniCall/64 <- 1
off [2/PROCEED /Group II /Category ]
Jan 16 12:27:03 NOTICE[4146] chan_unicall.c: Unicall/64 event Alerting
Jan 16 12:27:27 DEBUG[4146] chan_unicall.c: Exception on 72, channel 64
Jan 16 12:27:27 DEBUG[4146] chan_unicall.c: MFC/R2 UniCall/64 <- 0101
[1/ALERTING/Await answer /Category ]
Jan 16 12:27:27 NOTICE[4146] chan_unicall.c: Unicall/64 event Connected
Jan 16 12:27:27 DEBUG[4146] chan_unicall.c: MFC/R2 UniCall/64 Channel echo
cancel
Jan 16 12:27:27 DEBUG[4146] chan_unicall.c: Enabled echo cancellation on
channel 64
Jan 16 12:27:27 DEBUG[4146] chan_unicall.c: needanswer
Jan 16 12:27:27 DEBUG[4146] chan_unicall.c: unicall_bridge called
Jan 16 12:27:27 DEBUG[4146] chan_unicall.c: Stoping tones on 2/0 talking
to 64/0
Jan 16 12:27:27 DEBUG[4146] chan_unicall.c: Stoping tones on 64/0 talking
to 2/0
Jan 16 12:27:27 DEBUG[4146] chan_unicall.c: Making 64 slave to master 2
Jan 16 12:27:27 DEBUG[4146] chan_unicall.c: Added 72 to conference
3848/1023
Jan 16 12:27:27 DEBUG[4146] chan_unicall.c: Added 12 to conference
3848/1023
Jan 16 12:27:27 DEBUG[4146] chan_unicall.c: Updated conferencing on 2,
with 2 conference users
Jan 16 12:27:27 DEBUG[4146] chan_unicall.c: Updated conferencing on 64,
with 0 conference users
But when I receive a call from the pbx.. I get this:
Jan 16 12:20:39 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 <- 0001
[1/IDLE /Idle /Idle ]
Jan 16 12:20:39 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 Detected
Jan 16 12:20:39 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 Creating a
new call with CRN 32770
Jan 16 12:20:39 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 1101 ->
[2/DETECTED/Seize ack /Seize ack ]
Jan 16 12:20:39 NOTICE[4085] chan_unicall.c: Unicall/65 event Detected
Jan 16 12:20:41 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 <- 8 on
[2/DETECTED/Seize ack /Seize ack ]
Jan 16 12:20:41 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 1 on ->
[2/DETECTED/Group A /DNIS request ]
Jan 16 12:20:41 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 <- 8
off [2/DETECTED/Group A /DNIS request ]
Jan 16 12:20:41 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 1 off ->
[2/DETECTED/Group A /DNIS request ]
Jan 16 12:20:41 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/64 R2 prot.
err. [2/DETECTED/Group C /Category req ] cause 32771 - T3 timed out
Jan 16 12:20:41 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/64 1001 ->
[1/IDLE /Idle /Idle ]
Jan 16 12:20:41 NOTICE[4085] chan_unicall.c: Unicall/64 event Protocol
failure
Jan 16 12:20:41 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/64 Channel echo
cancel
Jan 16 12:20:41 DEBUG[4085] chan_unicall.c: disabled echo cancellation on
channel 64
Jan 16 12:20:41 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/64 <- 1001
[1/IDLE /Idle /Idle ]
Jan 16 12:20:41 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/64 1001 ->
[1/IDLE /Idle /Idle ]
Jan 16 12:20:41 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 <- 2 on
[2/DETECTED/Group A /DNIS request ]
Jan 16 12:20:41 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 1 on ->
[2/DETECTED/Group A /DNIS request ]
Jan 16 12:20:41 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 <- 2
off [2/DETECTED/Group A /DNIS request ]
Jan 16 12:20:41 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 1 off ->
[2/DETECTED/Group A /DNIS request ]
Jan 16 12:20:41 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 <- 4 on
[2/DETECTED/Group A /DNIS request ]
Jan 16 12:20:41 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 1 on ->
[2/DETECTED/Group A /DNIS request ]
Jan 16 12:20:41 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 <- 4
off [2/DETECTED/Group A /DNIS request ]
Jan 16 12:20:41 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 1 off ->
[2/DETECTED/Group A /DNIS request ]
Jan 16 12:20:42 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 <- 5 on
[2/DETECTED/Group A /DNIS request ]
Jan 16 12:20:42 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 1 on ->
[2/DETECTED/Group A /DNIS request ]
Jan 16 12:20:42 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 <- 5
off [2/DETECTED/Group A /DNIS request ]
Jan 16 12:20:42 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 1 off ->
[2/DETECTED/Group A /DNIS request ]
Jan 16 12:20:43 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 <- 5 on
[2/DETECTED/Group A /DNIS request ]
Jan 16 12:20:43 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 1 on ->
[2/DETECTED/Group A /DNIS request ]
Jan 16 12:20:43 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 <- 5
off [2/DETECTED/Group A /DNIS request ]
Jan 16 12:20:43 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 1 off ->
[2/DETECTED/Group A /DNIS request ]
Jan 16 12:20:43 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 <- 0 on
[2/DETECTED/Group A /DNIS request ]
Jan 16 12:20:43 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 1 on ->
[2/DETECTED/Group A /DNIS request ]
Jan 16 12:20:43 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 <- 0
off [2/DETECTED/Group A /DNIS request ]
Jan 16 12:20:43 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 1 off ->
[2/DETECTED/Group A /DNIS request ]
Jan 16 12:20:44 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 <- 0 on
[2/DETECTED/Group A /DNIS request ]
Jan 16 12:20:44 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 1 on ->
[2/DETECTED/Group A /DNIS request ]
Jan 16 12:20:44 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 <- 0
off [2/DETECTED/Group A /DNIS request ]
Jan 16 12:20:44 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 1 off ->
[2/DETECTED/Group A /DNIS request ]
Jan 16 12:20:45 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 <- 7 on
[2/DETECTED/Group A /DNIS request ]
Jan 16 12:20:45 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 6 on ->
[2/DETECTED/Group C /Category req ]
Jan 16 12:20:45 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 <- 7
off [2/DETECTED/Group C /Category req ]
Jan 16 12:20:45 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 6 off ->
[2/DETECTED/Group C /Category req ]
Jan 16 12:20:50 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 R2 prot.
err. [2/DETECTED/Group C /Category req ] cause 32771 - T3 timed out
Jan 16 12:20:50 DEBUG[4085] chan_unicall.c: MFC/R2 UniCall/65 1001 ->
[1/IDLE /Idle /Idle ]
Jan 16 12:20:50 NOTICE[4085] chan_unicall.c: Unicall/65 event Protocol
failure
I've tried a lot of variations with these variables:
protocolvariant=mx,10,8
group=3
immediate=yes
usecallerid=yes
protocolend=co
adding 8 16 24 at the end of protocolvariant (4th param), using immediate=no,
usecallerid=no, protocolend=cpe and protocolend=co.. I mean.. I've tried a
lot of combinations without success.
Dont know if this is a configuration related problem.. or there is
something else I am missing ?? Hope someone could help me. Thanks...
PS. Sorry for the long mail.
--
Greetings..
Victor Toofic
More information about the asterisk-users
mailing list