Call fails to transfer with out force trunk CID enabled - Help!

I have a PBX that is set up with incoming/outgoing trunks to vitelity lets call it PBX A. I have a few other PBX units that connect to PBX A, we will call them PBX B, PBX C.

If I call a end point that is attached directly to PBX A and hit the transfer button to send to a outside NPA end point all works good. The call is transfered to my cell phone and it shows the transfered parties CID.

If I call a end point that is attached to PBX B and hit the transfer button to send the call to a outside NPA end point PBX A rejects the call with “chan_sip.c:16385 check_auth: username mismatch”

I have a sip account set up in between PBX A and PBX B, I have tried to use Friend, Peer, and User as the connection types.

Still No Joy!

Any one know how to get PBX A to accept the calls?


PBX A log of non working call, PBX B set to pass CID of transfered party.

– Executing [s@macro-dial-one:45] Dial(“SIP/9853847040-00005765”, “SIP/9859185200,TtrI”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called SIP/9859185200
– Connected line update to SIP/9853847040-00005765 prevented.
– SIP/9859185200-00005766 is ringing
– SIP/9859185200-00005766 is ringing
– Connected line update to SIP/9853847040-00005765 prevented.
– SIP/9859185200-00005766 answered SIP/9853847040-00005765
[2016-10-06 18:19:35] WARNING[5744][C-0000307c]: chan_sip.c:16385 check_auth: username mismatch, have <9853847040>, digest has <9859185200>
[2016-10-06 18:19:35] NOTICE[5744][C-0000307c]: chan_sip.c:25560 handle_request_invite: Failed to authenticate device sip:[email protected];tag=as6cf127ee
– Executing [h@macro-dial-one:1] Macro(“SIP/9853847040-00005765”, “hangupcall,”) in new stack
– Executing [s@macro-hangupcall:1] ExecIf(“SIP/9853847040-00005765”, “0?Set(CDR(recordingfile)=.wav)”) in new stack
– Executing [s@macro-hangupcall:2] GotoIf(“SIP/9853847040-00005765”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,4)
– Executing [s@macro-hangupcall:4] Hangup(“SIP/9853847040-00005765”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘SIP/9853847040-00005765’ in macro ‘hangupcall’
== Spawn extension (macro-dial-one, h, 1) exited non-zero on ‘SIP/9853847040-00005765’
== Spawn extension (macro-dial-one, s, 45) exited non-zero on ‘SIP/9853847040-00005765’ in macro ‘dial-one’
== Spawn extension (macro-exten-vm, s, 9) exited non-zero on ‘SIP/9853847040-00005765’ in macro ‘exten-vm’
== Spawn extension (ext-local, 9859185200, 2) exited non-zero on ‘SIP/9853847040-00005765’


PBX B log of non working call, PBX B set to pass CID of transfered party.

– Executing [s@macro-dialout-trunk:22] Dial(“SIP/9859185200-000000b3”, “SIP/Bayou-Outbound/19854989838,300,Tt”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called SIP/Bayou-Outbound/19854989838
[2016-10-06 18:19:35] WARNING[2012][C-0000027c]: chan_sip.c:23028 handle_response_invite: Received response: “Forbidden” from ‘sip:[email protected];tag=as6cf127ee’
== Everyone is busy/congested at this time (1:0/0/1)
– Executing [s@macro-dialout-trunk:23] NoOp(“SIP/9859185200-000000b3”, “Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 21”) in new stack
– Executing [s@macro-dialout-trunk:24] GotoIf(“SIP/9859185200-000000b3”, “0?continue,1:s-CHANUNAVAIL,1”) in new stack
– Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
– Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] Set(“SIP/9859185200-000000b3”, “RC=21”) in new stack
– Executing [s-CHANUNAVAIL@macro-dialout-trunk:2] Goto(“SIP/9859185200-000000b3”, “21,1”) in new stack
– Goto (macro-dialout-trunk,21,1)
– Executing [21@macro-dialout-trunk:1] Goto(“SIP/9859185200-000000b3”, “continue,1”) in new stack
– Goto (macro-dialout-trunk,continue,1)
– Executing [continue@macro-dialout-trunk:1] NoOp(“SIP/9859185200-000000b3”, “TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 21 - failing through to other trunks”) in new stack
– Executing [continue@macro-dialout-trunk:2] Set(“SIP/9859185200-000000b3”, “CALLERID(number)=”) in new stack
– Executing [9854989838@from-internal-xfer:7] Macro(“SIP/9859185200-000000b3”, “outisbusy,”) in new stack
– Executing [s@macro-outisbusy:1] Progress(“SIP/9859185200-000000b3”, “”) in new stack
– Executing [s@macro-outisbusy:2] GotoIf(“SIP/9859185200-000000b3”, “0?emergency,1”) in new stack
– Executing [s@macro-outisbusy:3] GotoIf(“SIP/9859185200-000000b3”, “0?intracompany,1”) in new stack
– Executing [s@macro-outisbusy:4] Playback(“SIP/9859185200-000000b3”, “all-circuits-busy-now&pls-try-call-later, noanswer”) in new stack
– <SIP/9859185200-000000b3> Playing ‘all-circuits-busy-now.ulaw’ (language ‘en’)
– <SIP/9859185200-000000b3> Playing ‘pls-try-call-later.ulaw’ (language ‘en’)
– Executing [s@macro-outisbusy:5] Congestion(“SIP/9859185200-000000b3”, “20”) in new stack
== Spawn extension (macro-outisbusy, s, 5) exited non-zero on ‘SIP/9859185200-000000b3’ in macro ‘outisbusy’
== Spawn extension (from-internal-xfer, 9854989838, 7) exited non-zero on ‘SIP/9859185200-000000b3’
– Executing [h@from-internal-xfer:1] Macro(“SIP/9859185200-000000b3”, “hangupcall”) in new stack
– Executing [s@macro-hangupcall:1] ExecIf(“SIP/9859185200-000000b3”, “0?Set(CDR(recordingfile)=.wav)”) in new stack
– Executing [s@macro-hangupcall:2] GotoIf(“SIP/9859185200-000000b3”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,4)
– Executing [s@macro-hangupcall:4] Hangup(“SIP/9859185200-000000b3”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘SIP/9859185200-000000b3’ in macro ‘hangupcall’
== Spawn extension (from-internal-xfer, h, 1) exited non-zero on ‘SIP/9859185200-000000b3’


PBX A log of working call, PBX B set to force CID of trunk.

– Executing [s@macro-dialout-trunk:22] Dial(“SIP/9859185200-0000576f”, “SIP/vitel-outbound/19854989838,300,Tt”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called SIP/vitel-outbound/19854989838
– SIP/vitel-outbound-00005770 is making progress passing it to SIP/9859185200-0000576f
– SIP/vitel-outbound-00005770 is ringing
– SIP/vitel-outbound-00005770 answered SIP/9859185200-0000576f
– Executing [h@macro-dialout-trunk:1] Macro(“SIP/9859185200-0000576f”, “hangupcall,”) in new stack
– Executing [s@macro-hangupcall:1] ExecIf(“SIP/9859185200-0000576f”, “0?Set(CDR(recordingfile)=out-19854989838-9859185200-20161006-182842-1475796522.23746.wav)”) in new stack
– Executing [s@macro-hangupcall:2] GotoIf(“SIP/9859185200-0000576f”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,4)
– Executing [s@macro-hangupcall:4] Hangup(“SIP/9859185200-0000576f”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘SIP/9859185200-0000576f’ in macro ‘hangupcall’
== Spawn extension (macro-dialout-trunk, h, 1) exited non-zero on ‘SIP/9859185200-0000576f’
== Spawn extension (macro-dialout-trunk, s, 22) exited non-zero on ‘SIP/9859185200-0000576f’ in macro ‘dialout-trunk’
== Spawn extension (restrictedroute-453e406dcee4d18174d4ff623f52dcd8, 19854989838, 6) exited non-zero on ‘SIP/9859185200-0000576f’
== MixMonitor close filestream (mixed)
== End MixMonitor Recording SIP/9859185200-0000576f
– Executing [h@macro-dial-one:1] Macro(“SIP/9853847040-0000576d”, “hangupcall,”) in new stack
– Executing [s@macro-hangupcall:1] ExecIf(“SIP/9853847040-0000576d”, “0?Set(CDR(recordingfile)=.wav)”) in new stack
– Executing [s@macro-hangupcall:2] GotoIf(“SIP/9853847040-0000576d”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,4)
– Executing [s@macro-hangupcall:4] Hangup(“SIP/9853847040-0000576d”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘SIP/9853847040-0000576d’ in macro ‘hangupcall’
== Spawn extension (macro-dial-one, h, 1) exited non-zero on ‘SIP/9853847040-0000576d’
== Spawn extension (macro-dial-one, s, 45) exited non-zero on ‘SIP/9853847040-0000576d’ in macro ‘dial-one’
== Spawn extension (macro-exten-vm, s, 9) exited non-zero on ‘SIP/9853847040-0000576d’ in macro ‘exten-vm’
== Spawn extension (ext-local, 9859185200, 2) exited non-zero on ‘SIP/9853847040-0000576d’


PBX B log of working call, PBX B set to force CID of trunk.

– Executing [s@macro-dialout-trunk:22] Dial(“SIP/9859185200-000000b8”, “SIP/Bayou-Outbound/19854989838,300,Tt”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called SIP/Bayou-Outbound/19854989838
– SIP/Bayou-Outbound-000000ba is making progress passing it to SIP/9859185200-000000b8
– SIP/Bayou-Outbound-000000ba is ringing
– SIP/Bayou-Outbound-000000ba answered SIP/9859185200-000000b8
– Executing [h@macro-dialout-trunk:1] Macro(“SIP/9859185200-000000b8”, “hangupcall,”) in new stack
– Executing [s@macro-hangupcall:1] ExecIf(“SIP/9859185200-000000b8”, “0?Set(CDR(recordingfile)=.wav)”) in new stack
– Executing [s@macro-hangupcall:2] GotoIf(“SIP/9859185200-000000b8”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,4)
– Executing [s@macro-hangupcall:4] Hangup(“SIP/9859185200-000000b8”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘SIP/9859185200-000000b8’ in macro ‘hangupcall’
== Spawn extension (macro-dialout-trunk, h, 1) exited non-zero on ‘SIP/9859185200-000000b8’


4 Days… Bump…

Have you tried working with the IntraCompany Route settings? These do a lot less Caller ID manipulation and may allow you to do this without a lot of hoop jumping.

I can turn the CID manipulation off and all works good. The issue is people want to see the transferred parties CID when a call is transferred to the users cell phone… We also have this issue when you use the follow me. When the user on any of the sub PBX units have a call that is attempted to be transferred to a outside line the call is rejected by PBX A.

I was thinking of setting up IAX2 trunks instead of the sip and see if the issues still exist.

Sam