Hi,<br><br>I was trying to use 2 of asterisk servers and interconnected, one of them as a peer to other sever (configured in sip.conf), so all the calls to server 1 will just be passed to server 2 (has PRI Card, TE 412P, only one PRI connected), i was sending calls to server 1 and that would send to server 2 and then dial out using Dahdi, but the problem that i got was the hangup cause codes, i was not able to pass the appropriate ones to the server 0 (Test server) that sent a call to server 1. For example, when the user at server 0 (test server) made a call to server 1, that sends it to server 2 and connects to the appropriate destination, but in the mean while if we just cancel the call, we need to see the SIP error code as 487 - Request terminated, but I was only able to see the ISDN core in PRI debug on server 2, but was not able to see '487' in sip debug, even though if i am handling the error code conditions........Is there any way of handling the error codes properly....?<br>
<br>Asterisk version: 1.4.22.1<br>Libpri: 1.4.10.1<br>dahdi: 2.2.0.2 are the versions that I am using.<br><br><br>The way I was handling the codes for the server 2:<br><br><br>[macro-result]<br>exten => s,1,Wait(1)<br>
exten => s,2,ResetCDR(w)<br>exten => s,3,NoCDR()<br>exten => s,4,GotoIf($[${ISNULL(${ARG1})}]?7:5)<br>exten => s,5,Set(RC=${ARG1})<br>exten => s,6,Goto(s|9)<br>exten => s,7,GotoIf($[${ISNULL(${DIALSTATUS})}]?8:rc-${DIALSTATUS}|1)<br>
exten => s,8,Set(RC=${IF($[${ISNULL(${HANGUPCAUSE})}]?0:${HANGUPCAUSE})})<br>exten => s,9,Goto(rc-${RC}|1)<br>exten => s,10,Hangup(${RC})<br>exten => i,1,Set(RC=0)<br>exten => i,2,Goto(s|9)<br><br>exten => rc-ANSWER,1,Set(RC=16)<br>
exten => rc-ANSWER,2,Goto(s|9)<br><br>exten => rc-BUSY,1,Set(RC=17)<br>exten => rc-BUSY,2,Goto(s|9)<br><br>exten => rc-CANCEL,1,Set(RC=16)<br>exten => rc-CANCEL,2,Goto(s|9)<br><br>exten => rc-CHANUNAVAIL,1,Set(RC=44)<br>
exten => rc-CHANUNAVAIL,2,Goto(s|9)<br><br>exten => rc-CONGESTION ,1,Set(RC=19)<br>exten => rc-CONGESTION ,2,Goto(s|9)<br><br>;exten => rc-NOANSWER,1,Set(RC=19)<br>;exten => rc-NOANSWER,2,Goto(s|9)<br><br>exten => rc-0,1,NoOp(NOTDEFINED)<br>
exten => rc-0,n,Goto(s|10)<br><br>exten => rc-1,1,NoOp(UNALLOCATED)<br>exten => rc-1,n,Goto(s|10)<br><br>exten => rc-2,1,NoOp(NO_ROUTE_TRANSIT_NET)<br>exten => rc-2,n,Goto(s|10)<br><br>exten => rc-3,1,NoOp(NO_ROUTE_DESTINATION)<br>
exten => rc-3,n,Goto(s|10)<br><br>exten => rc-6,1,NoOp(CHANNEL_UNACCEPTABLE)<br>exten => rc-6,n,Goto(s|10)<br><br>exten => rc-7,1,NoOp(CALL_AWARDED_DELIVERED)<br>exten => rc-7,n,Goto(s|10)<br><br>exten => rc-16,1,NoOp(NORMAL_CLEARING)<br>
exten => rc-16,n,Goto(s|10)<br><br>exten => rc-17,1,NoOp(USER_BUSY)<br>;exten => rc-17,n,Busy() <br>exten => rc-17,n,Goto(s|10)<br><br>exten => rc-18,1,NoOp(NO_USER_RESPONSE)<br>exten => rc-18,n,Goto(s|10)<br>
<br>exten => rc-19,1,NoOp(NO_ANSWER)<br>exten => rc-19,n,Goto(s|10)<br><br>exten => rc-21,1,NoOp(CALL_REJECTED)<br>exten => rc-21,n,Goto(s|10)<br><br><br>exten => rc-28,1,NoOp(INVALID_NUMBER_FORMAT)<br>exten => rc-28,n,Goto(s|10)<br>
<br>exten => rc-29,1,NoOp(FACILITY_REJECTED)<br>exten => rc-29,n,Goto(s|10)<br><br>exten => rc-30,1,NoOp(RESPONSE_TO_STATUS_ENQUIRY)<br>exten => rc-30,n,Goto(s|10)<br><br>exten => rc-31,1,NoOp(NORMAL_UNSPECIFIED)<br>
exten => rc-31,n,Goto(s|10)<br><br>exten => rc-34,1,NoOp(NORMAL_CIRCUIT_CONGESTION)<br>exten => rc-34,n,Congestion()<br>exten => rc-34,n,Goto(s|10)<br><br>Thank you for your help.<br><br>Regards<br>Sandesh<br>