SIP Trunk not outbound routing correctly

Hi,

This is my first post here, so hello to Asterisk’s forum members!

I’m here now because I’m finally having an issue that nobody local can help me with. Here’s the deal:

I’ve recently bought a trunk and DID for use with Asterisk in hopes to connect a voxeo XMLto an extension. The voxeo extension should call out and deliver a message. As of a few days ago, this all was working just fine, at least to soft phones on the asterisk network (I could call an asterisk extension).

So, we got a sip trunk and a DID, and some of the features worked correctly: I could call out from an asterisk extension to an external phone, or I could call into the DID from an external phone to connect to an asterisk extension. In an attempt to get voxeo to make outbound calls to actual phones, some of the trunking stuff got changed, and now I can only call into the DID number; I cannot make outbound calls from my soft phone and still cannot do anything voxeo.

On top of all that, I can no longer call Voxeo’s extension from a soft phone to get an application. Calling out from voxeo to a soft phone also does not work.

The call log when I try to make an outbound call from Asterisk is as follows:

== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Executing [phone number@from-internal:1] Macro(“SIP/1001-00000014”, “user-callerid,LIMIT,”) in new stack
– Executing [s@macro-user-callerid:1] Set(“SIP/1001-00000014”, “AMPUSER=1001”) in new stack
– Executing [s@macro-user-callerid:2] GotoIf(“SIP/1001-00000014”, “0?report”) in new stack
– Executing [s@macro-user-callerid:3] ExecIf(“SIP/1001-00000014”, “1?Set(REALCALLERIDNUM=1001)”) in new stack
– Executing [s@macro-user-callerid:4] Set(“SIP/1001-00000014”, “AMPUSER=1001”) in new stack
– Executing [s@macro-user-callerid:5] Set(“SIP/1001-00000014”, “AMPUSERCIDNAME=Test”) in new stack
– Executing [s@macro-user-callerid:6] GotoIf(“SIP/1001-00000014”, “0?report”) in new stack
– Executing [s@macro-user-callerid:7] Set(“SIP/1001-00000014”, “AMPUSERCID=1001”) in new stack
– Executing [s@macro-user-callerid:8] Set(“SIP/1001-00000014”, “CALLERID(all)=“Test” <1001>”) in new stack
– Executing [s@macro-user-callerid:9] GotoIf(“SIP/1001-00000014”, “0?limit”) in new stack
– Executing [s@macro-user-callerid:10] ExecIf(“SIP/1001-00000014”, “1?Set(GROUP(concurrency_limit)=1001)”) in new stack
– Executing [s@macro-user-callerid:11] ExecIf(“SIP/1001-00000014”, “0?Set(CHANNEL(language)=)”) in new stack
– Executing [s@macro-user-callerid:12] GosubIf(“SIP/1001-00000014”, “7?sub-ccss,s,1(from-internal,phone number)”) in new stack
– Executing [s@sub-ccss:1] ExecIf(“SIP/1001-00000014”, “0?Return()”) in new stack
– Executing [s@sub-ccss:2] Set(“SIP/1001-00000014”, “CCSS_SETUP=TRUE”) in new stack
– Executing [s@sub-ccss:3] GosubIf(“SIP/1001-00000014”, “0?monitor_config,1(from-internal,phone number):monitor_default,1(from-internal,phone number)”) in new stack
– Executing [monitor_default@sub-ccss:1] GotoIf(“SIP/1001-00000014”, “0?is_exten”) in new stack
– Executing [monitor_default@sub-ccss:2] StackPop(“SIP/1001-00000014”, “”) in new stack
– Executing [monitor_default@sub-ccss:3] Return(“SIP/1001-00000014”, “FALSE”) in new stack
– Executing [s@macro-user-callerid:13] GotoIf(“SIP/1001-00000014”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,26)
– Executing [s@macro-user-callerid:26] Set(“SIP/1001-00000014”, “CALLERID(number)=1001”) in new stack
– Executing [s@macro-user-callerid:27] Set(“SIP/1001-00000014”, “CALLERID(name)=Test”) in new stack
– Executing [s@macro-user-callerid:28] Set(“SIP/1001-00000014”, “CHANNEL(language)=en”) in new stack
– Executing [phone number@from-internal:2] Set(“SIP/1001-00000014”, “MOHCLASS=default”) in new stack
– Executing [phone number@from-internal:3] Set(“SIP/1001-00000014”, “_NODEST=”) in new stack
– Executing [phone number@from-internal:4] Macro(“SIP/1001-00000014”, “record-enable,1001,OUT,”) in new stack
– Executing [s@macro-record-enable:1] GotoIf(“SIP/1001-00000014”, “1?check”) in new stack
– Goto (macro-record-enable,s,4)
– Executing [s@macro-record-enable:4] ExecIf(“SIP/1001-00000014”, “0?MacroExit()”) in new stack
– Executing [s@macro-record-enable:5] GotoIf(“SIP/1001-00000014”, “0?Group:OUT”) in new stack
– Goto (macro-record-enable,s,14)
– Executing [s@macro-record-enable:14] GotoIf(“SIP/1001-00000014”, “0?IN”) in new stack
– Executing [s@macro-record-enable:15] ExecIf(“SIP/1001-00000014”, “1?MacroExit()”) in new stack
– Executing [phone number@from-internal:5] Macro(“SIP/1001-00000014”, “dialout-trunk,2,phone number,”) in new stack
– Executing [s@macro-dialout-trunk:1] Set(“SIP/1001-00000014”, “DIAL_TRUNK=2”) in new stack
– Executing [s@macro-dialout-trunk:2] GosubIf(“SIP/1001-00000014”, “0?sub-pincheck,s,1”) in new stack
– Executing [s@macro-dialout-trunk:3] GotoIf(“SIP/1001-00000014”, “0?disabletrunk,1”) in new stack
– Executing [s@macro-dialout-trunk:4] Set(“SIP/1001-00000014”, “DIAL_NUMBER=phone number”) in new stack
– Executing [s@macro-dialout-trunk:5] Set(“SIP/1001-00000014”, “DIAL_TRUNK_OPTIONS=tr”) in new stack
– Executing [s@macro-dialout-trunk:6] Set(“SIP/1001-00000014”, “OUTBOUND_GROUP=OUT_2”) in new stack
– Executing [s@macro-dialout-trunk:7] GotoIf(“SIP/1001-00000014”, “1?nomax”) in new stack
– Goto (macro-dialout-trunk,s,9)
– Executing [s@macro-dialout-trunk:9] GotoIf(“SIP/1001-00000014”, “0?skipoutcid”) in new stack
– Executing [s@macro-dialout-trunk:10] Set(“SIP/1001-00000014”, “DIAL_TRUNK_OPTIONS=”) in new stack
– Executing [s@macro-dialout-trunk:11] Macro(“SIP/1001-00000014”, “outbound-callerid,2”) in new stack
– Executing [s@macro-outbound-callerid:1] ExecIf(“SIP/1001-00000014”, “0?Set(CALLERPRES()=)”) in new stack
– Executing [s@macro-outbound-callerid:2] ExecIf(“SIP/1001-00000014”, “0?Set(REALCALLERIDNUM=1001)”) in new stack
– Executing [s@macro-outbound-callerid:3] GotoIf(“SIP/1001-00000014”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,6)
– Executing [s@macro-outbound-callerid:6] Set(“SIP/1001-00000014”, “USEROUTCID=DID number”) in new stack
– Executing [s@macro-outbound-callerid:7] Set(“SIP/1001-00000014”, “EMERGENCYCID=”) in new stack
– Executing [s@macro-outbound-callerid:8] Set(“SIP/1001-00000014”, “TRUNKOUTCID=DID number”) in new stack
– Executing [s@macro-outbound-callerid:9] GotoIf(“SIP/1001-00000014”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,12)
– Executing [s@macro-outbound-callerid:12] ExecIf(“SIP/1001-00000014”, “1?Set(CALLERID(all)=DID number)”) in new stack
– Executing [s@macro-outbound-callerid:13] ExecIf(“SIP/1001-00000014”, “1?Set(CALLERID(all)=DID number)”) in new stack
– Executing [s@macro-outbound-callerid:14] ExecIf(“SIP/1001-00000014”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [s@macro-outbound-callerid:15] ExecIf(“SIP/1001-00000014”, “0?Set(CALLERPRES()=prohib_passed_screen)”) in new stack
– Executing [s@macro-dialout-trunk:12] GosubIf(“SIP/1001-00000014”, “1?sub-flp-2,s,1”) in new stack
– Executing [s@sub-flp-2:1] ExecIf(“SIP/1001-00000014”, “0?Set(TARGET_FLP_2=4041phone number)”) in new stack
– Executing [s@sub-flp-2:2] GotoIf(“SIP/1001-00000014”, “0?match”) in new stack
– Executing [s@sub-flp-2:3] ExecIf(“SIP/1001-00000014”, “0?Set(TARGET_FLP_2=11phone number)”) in new stack
– Executing [s@sub-flp-2:4] GotoIf(“SIP/1001-00000014”, “0?match”) in new stack
– Executing [s@sub-flp-2:5] Return(“SIP/1001-00000014”, “”) in new stack
– Executing [s@macro-dialout-trunk:13] Set(“SIP/1001-00000014”, “OUTNUM=1phone number”) in new stack
– Executing [s@macro-dialout-trunk:14] Set(“SIP/1001-00000014”, “custom=SIP/trunkusername”) in new stack
– Executing [s@macro-dialout-trunk:15] ExecIf(“SIP/1001-00000014”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default))”) in new stack
– Executing [s@macro-dialout-trunk:16] ExecIf(“SIP/1001-00000014”, “0?Set(DIAL_TRUNK_OPTIONS=M(confirm))”) in new stack
– Executing [s@macro-dialout-trunk:17] Macro(“SIP/1001-00000014”, “dialout-trunk-predial-hook,”) in new stack
– Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“SIP/1001-00000014”, “”) in new stack
– Executing [s@macro-dialout-trunk:18] GotoIf(“SIP/1001-00000014”, “0?bypass,1”) in new stack
– Executing [s@macro-dialout-trunk:19] GotoIf(“SIP/1001-00000014”, “0?customtrunk”) in new stack
– Executing [s@macro-dialout-trunk:20] Dial(“SIP/1001-00000014”, “SIP/trunkusername/1phone number,300,”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called SIP/trunkusername/phone number
[2011-09-22 10:04:18] WARNING[3761]: chan_sip.c:3622 retrans_pkt: Retransmission timeout reached on transmission 0d73ae29322b9939624432336c0aa032@trunkIP:5060 for seqno 102 (Critical Request) – See wiki.asterisk.org/wiki/display/ … nsmissions
Packet timed out after 32018ms with no response
[2011-09-22 10:04:18] WARNING[3761]: chan_sip.c:3651 retrans_pkt: Hanging up call 0d73ae29322b9939624432336c0aa032@trunkIP:5060 - no reply to our critical packet (see wiki.asterisk.org/wiki/display/ … nsmissions).
== Everyone is busy/congested at this time (1:0/0/1)
– Executing [s@macro-dialout-trunk:21] NoOp(“SIP/1001-00000014”, “Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 111”) in new stack
– Executing [s@macro-dialout-trunk:22] Goto(“SIP/1001-00000014”, “s-CHANUNAVAIL,1”) in new stack
– Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
– Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] Set(“SIP/1001-00000014”, “RC=111”) in new stack
– Executing [s-CHANUNAVAIL@macro-dialout-trunk:2] Goto(“SIP/1001-00000014”, “111,1”) in new stack
– Goto (macro-dialout-trunk,111,1)
– Executing [111@macro-dialout-trunk:1] Goto(“SIP/1001-00000014”, “continue,1”) in new stack
– Goto (macro-dialout-trunk,continue,1)
– Executing [continue@macro-dialout-trunk:1] GotoIf(“SIP/1001-00000014”, “1?noreport”) in new stack
– Goto (macro-dialout-trunk,continue,3)
– Executing [continue@macro-dialout-trunk:3] NoOp(“SIP/1001-00000014”, “TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 111 - failing through to other trunks”) in new stack
– Executing [continue@macro-dialout-trunk:4] Set(“SIP/1001-00000014”, “CALLERID(number)=1001”) in new stack
– Executing [phone number@from-internal:6] Macro(“SIP/1001-00000014”, “dialout-trunk,3,1phone number,”) in new stack
– Executing [s@macro-dialout-trunk:1] Set(“SIP/1001-00000014”, “DIAL_TRUNK=3”) in new stack
– Executing [s@macro-dialout-trunk:2] GosubIf(“SIP/1001-00000014”, “0?sub-pincheck,s,1”) in new stack
– Executing [s@macro-dialout-trunk:3] GotoIf(“SIP/1001-00000014”, “0?disabletrunk,1”) in new stack
– Executing [s@macro-dialout-trunk:4] Set(“SIP/1001-00000014”, “DIAL_NUMBER=1phone number”) in new stack
– Executing [s@macro-dialout-trunk:5] Set(“SIP/1001-00000014”, “DIAL_TRUNK_OPTIONS=tr”) in new stack
– Executing [s@macro-dialout-trunk:6] Set(“SIP/1001-00000014”, “OUTBOUND_GROUP=OUT_3”) in new stack
– Executing [s@macro-dialout-trunk:7] GotoIf(“SIP/1001-00000014”, “1?nomax”) in new stack
– Goto (macro-dialout-trunk,s,9)
– Executing [s@macro-dialout-trunk:9] GotoIf(“SIP/1001-00000014”, “0?skipoutcid”) in new stack
– Executing [s@macro-dialout-trunk:10] Set(“SIP/1001-00000014”, “DIAL_TRUNK_OPTIONS=”) in new stack
– Executing [s@macro-dialout-trunk:11] Macro(“SIP/1001-00000014”, “outbound-callerid,3”) in new stack
– Executing [s@macro-outbound-callerid:1] ExecIf(“SIP/1001-00000014”, “0?Set(CALLERPRES()=)”) in new stack
– Executing [s@macro-outbound-callerid:2] ExecIf(“SIP/1001-00000014”, “0?Set(REALCALLERIDNUM=1001)”) in new stack
– Executing [s@macro-outbound-callerid:3] GotoIf(“SIP/1001-00000014”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,6)
– Executing [s@macro-outbound-callerid:6] Set(“SIP/1001-00000014”, “USEROUTCID=DID number”) in new stack
– Executing [s@macro-outbound-callerid:7] Set(“SIP/1001-00000014”, “EMERGENCYCID=”) in new stack
– Executing [s@macro-outbound-callerid:8] Set(“SIP/1001-00000014”, “TRUNKOUTCID=DID number”) in new stack
– Executing [s@macro-outbound-callerid:9] GotoIf(“SIP/1001-00000014”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,12)
– Executing [s@macro-outbound-callerid:12] ExecIf(“SIP/1001-00000014”, “1?Set(CALLERID(all)=DID number)”) in new stack
– Executing [s@macro-outbound-callerid:13] ExecIf(“SIP/1001-00000014”, “1?Set(CALLERID(all)=DID number)”) in new stack
– Executing [s@macro-outbound-callerid:14] ExecIf(“SIP/1001-00000014”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [s@macro-outbound-callerid:15] ExecIf(“SIP/1001-00000014”, “0?Set(CALLERPRES()=prohib_passed_screen)”) in new stack
– Executing [s@macro-dialout-trunk:12] GosubIf(“SIP/1001-00000014”, “1?sub-flp-3,s,1”) in new stack
– Executing [s@sub-flp-3:1] ExecIf(“SIP/1001-00000014”, “0?Set(TARGET_FLP_3=4041phone number)”) in new stack
– Executing [s@sub-flp-3:2] GotoIf(“SIP/1001-00000014”, “0?match”) in new stack
– Executing [s@sub-flp-3:3] ExecIf(“SIP/1001-00000014”, “0?Set(TARGET_FLP_3=81phone number)”) in new stack
– Executing [s@sub-flp-3:4] GotoIf(“SIP/1001-00000014”, “0?match”) in new stack
– Executing [s@sub-flp-3:5] Return(“SIP/1001-00000014”, “”) in new stack
– Executing [s@macro-dialout-trunk:13] Set(“SIP/1001-00000014”, “OUTNUM=1phone number”) in new stack
– Executing [s@macro-dialout-trunk:14] Set(“SIP/1001-00000014”, “custom=SIP/*trunkusername”) in new stack
– Executing [s@macro-dialout-trunk:15] ExecIf(“SIP/1001-00000014”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default))”) in new stack
– Executing [s@macro-dialout-trunk:16] ExecIf(“SIP/1001-00000014”, “0?Set(DIAL_TRUNK_OPTIONS=M(confirm))”) in new stack
– Executing [s@macro-dialout-trunk:17] Macro(“SIP/1001-00000014”, “dialout-trunk-predial-hook,”) in new stack
– Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“SIP/1001-00000014”, “”) in new stack
– Executing [s@macro-dialout-trunk:18] GotoIf(“SIP/1001-00000014”, “0?bypass,1”) in new stack
– Executing [s@macro-dialout-trunk:19] GotoIf(“SIP/1001-00000014”, “0?customtrunk”) in new stack
– Executing [s@macro-dialout-trunk:20] Dial(“SIP/1001-00000014”, “SIP/trunkusername/1phone number,300,”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called SIP/fpbx-2-trunkusername/1phone number
== Spawn extension (macro-dialout-trunk, s, 20) exited non-zero on ‘SIP/1001-00000014’ in macro ‘dialout-trunk’
== Spawn extension (from-internal, phone number, 6) exited non-zero on ‘SIP/1001-00000014’
– Executing [h@from-internal:1] Hangup(“SIP/1001-00000014”, “”) in new stack
== Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/1001-00000014’

I think that deciphering this is probably the first step in working through this issue.

The main thing that we changed was the IP that the trunk talks to: the “Contact IP” and “Network IP” are now slightly different than they were before.

One of the reasons that Voxeo could be failing to make calls is because I attempted to route its calls through the trunk. Perhaps it’s working and that is why it can’t make calls.

If anyone has any input, please let me know. This is pretty urgent, so any help will be greatly appreciated. Thank you!

You should ask this question in your distro forum.
The trunk/extension nomenclature is FreePBX invention used by all FreePBX based distros.
Asterisk has no idea what “trunk” is.