Gafachi Trunks

I searched on many different forums and I was surprised about the lack of information available concerning Gafachi Trunks. Since I found nothing that helped me in getting a Gafachi 800# trunk to work in FreePBX I ended up fighting with it for hours. Outbound calls seemed to work with little trouble but inbound became a challenge with many 403 forbidden errors. After much trial and error I found a config that actually lets me both receive inbound and make outbound calls. My goal is to possibly use this for T38 pass-through but I have not had a chance to mess with the T38 piece yet. I found lots of posts where people have asked for someone to post a working config so here is my configuration that actually appears to be working and I hope it helps others with their Gafachi 800# trunks.

Trunks setup:

Outgoing settings:

Trunk Name: 866_Gafachi

PEER Details:

type=friend
port=5060
tos=0x10
username=GAFACHI_AUTHENITCATION_ID
secret=GAFACHI_SECRET
host=sip.gafachi.com
canreinvite=no
fromuser=GAFACHI_AUTHENITCATION_ID
dtmfmode=rfc2833

Incoming Settings:
USER Context: gafachi

USER Details:

type=friend
port=5060
tos=0x10
username=GAFACHI_AUTHENITCATION_ID
secret=GAFACHI_SECRET
host=sip.gafachi.com
canreinvite=no
fromuser=GAFACHI_AUTHENITCATION_ID
dtmfmode=rfc2833
context=gafachi-incoming

Register String:

GAFACHI_AUTHENITCATION_ID:[email protected]

The following is added to:
/etc/asterisk/extensions_custom.conf

[gafachi-incoming]
exten => _.,1,NoOp(Received incoming SIP connection from ${CALLERID(num)} on Gafachi peer to ${EXTEN})
exten => _.,n,Set(DID=${EXTEN})
exten => _.,n,Goto(from-trunk,${DID},1)

Hi robeerski (tadpole),

I followed your instructions exactly and applied it to my FreePBX. Unfortunately, it did not work for me. In your extensions_custom.conf example, do I put exactly the same in mine or should I substitute “CALLERID” and “DID” with my own?

It’s been a while since you posted this. I contacted Gafachi and their technical support told me that sip.gafachi.com is outdated and I should use either their New York (67.216.35.162) or Los Angeles (67.216.35.162)SIP cluster instead.

I was still able to ping sip.gafachi.com, but the funny thing is that if I change the host=sip.gafachi.com, I would only be able to receive their toll free calls. If I change it to one of their sip clusters, then I would only be able to make outbound calls.

Gafachi assured me that it’s not a technical issue on their end because they have thousands of customers using both their inbound and outbound service.

Do you have an alternative solution to this?

I have tried using the above also, and I have had no success. I am using FreePBX version 2.10.1.1 and have included my peer settings below.

allow=ulaw
canreinvite=no
dtmfmode=rfc2833
fromuser=xxxxxxxxxxxxxxxx
host=67.216.35.205
secret=xxxxxxxxxxxxxxxx
type=friend
user=xxxxxxxxxxxxxxxx
username=xxxxxxxxxxxxxxxx
port=5060

I have compiled these settings due to the information I have found on the web (almost none) and apparently sip.gafachi.com cannot be used anymore. I believe I the problem is in the register string, but I am at a loss as to what this should be set to.

xxxxxxxxxxxxxx:[email protected]

When I try to make a call sip debug displays

<— SIP read from UDP:10.0.0.139:16200 —>
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 10.0.0.139:16200;branch=z9hG4bK-d8754z-2cf6c54afdeb5719-1—d8754z-;rport
Max-Forwards: 70
Contact: sip:[email protected]:16200
To: sip:[email protected]
From: "6666"sip:[email protected];tag=7b536708
Call-ID: Y2M0ZDNlN2VkNjBjYjBiOGQwZDFhMzNlZDA3NDUxZmM.
CSeq: 1 INVITE
Session-Expires: 95
Min-SE: 90
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Content-Type: application/sdp
Supported: timer, replaces
User-Agent: X-Lite 4 release 4.1 stamp 63215
Content-Length: 370

v=0
o=- 1342845002204213 1 IN IP4 10.0.0.139
s=CounterPath X-Lite 4.1
c=IN IP4 10.0.0.139
t=0 0
a=ice-ufrag:acb11e
a=ice-pwd:89b05c04a6bbf06ae1e8956dddbf2ee8
m=audio 19854 RTP/AVP 0 8 3 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=candidate:1 1 UDP 659136 10.0.0.139 19854 typ host
a=candidate:1 2 UDP 659134 10.0.0.139 19855 typ host
<------------->
— (15 headers 13 lines) —
Sending to 10.0.0.139:16200 (NAT)
Using INVITE request as basis request - Y2M0ZDNlN2VkNjBjYjBiOGQwZDFhMzNlZDA3NDUxZmM.
Found peer ‘6666’ for ‘6666’ from 10.0.0.139:16200

<— Reliably Transmitting (no NAT) to 10.0.0.139:16200 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.0.0.139:16200;branch=z9hG4bK-d8754z-2cf6c54afdeb5719-1—d8754z-;received=10.0.0.139;rport=16200
From: "6666"sip:[email protected];tag=7b536708
To: sip:[email protected];tag=as317301f5
Call-ID: Y2M0ZDNlN2VkNjBjYjBiOGQwZDFhMzNlZDA3NDUxZmM.
CSeq: 1 INVITE
Server: FPBX-2.10.1(10.5.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="105ee0c7"
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘Y2M0ZDNlN2VkNjBjYjBiOGQwZDFhMzNlZDA3NDUxZmM.’ in 26624 ms (Method: INVITE)

<— SIP read from UDP:10.0.0.139:16200 —>
ACK sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 10.0.0.139:16200;branch=z9hG4bK-d8754z-2cf6c54afdeb5719-1—d8754z-;rport
Max-Forwards: 70
To: sip:[email protected];tag=as317301f5
From: "6666"sip:[email protected];tag=7b536708
Call-ID: Y2M0ZDNlN2VkNjBjYjBiOGQwZDFhMzNlZDA3NDUxZmM.
CSeq: 1 ACK
Content-Length: 0

<------------->
— (8 headers 0 lines) —

<— SIP read from UDP:10.0.0.139:16200 —>
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 10.0.0.139:16200;branch=z9hG4bK-d8754z-3cc8695861e5c030-1—d8754z-;rport
Max-Forwards: 70
Contact: sip:[email protected]:16200
To: sip:[email protected]
From: “6666"sip:[email protected];tag=7b536708
Call-ID: Y2M0ZDNlN2VkNjBjYjBiOGQwZDFhMzNlZDA3NDUxZmM.
CSeq: 2 INVITE
Session-Expires: 95
Min-SE: 90
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Content-Type: application/sdp
Supported: timer, replaces
User-Agent: X-Lite 4 release 4.1 stamp 63215
Authorization: Digest username=“6666”,realm=“asterisk”,nonce=“105ee0c7”,uri="sip:[email protected]”,response=“ecb5664a51c089a09421c6c635686500”,algorithm=MD5
Content-Length: 370

v=0
o=- 1342845002204213 1 IN IP4 10.0.0.139
s=CounterPath X-Lite 4.1
c=IN IP4 10.0.0.139
t=0 0
a=ice-ufrag:acb11e
a=ice-pwd:89b05c04a6bbf06ae1e8956dddbf2ee8
m=audio 19854 RTP/AVP 0 8 3 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=candidate:1 1 UDP 659136 10.0.0.139 19854 typ host
a=candidate:1 2 UDP 659134 10.0.0.139 19855 typ host
<------------->
— (16 headers 13 lines) —
Sending to 10.0.0.139:16200 (no NAT)
Using INVITE request as basis request - Y2M0ZDNlN2VkNjBjYjBiOGQwZDFhMzNlZDA3NDUxZmM.
Found peer ‘6666’ for ‘6666’ from 10.0.0.139:16200
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 3
Found RTP audio format 101
Found audio description format telephone-event for ID 101
Capabilities: us - (ulaw), peer - audio=(gsm|ulaw|alaw)/video=(nothing)/text=(nothing), combined - (ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 10.0.0.139:19854
Looking for XXXXXXXXXX in from-internal (domain 10.0.0.204)
list_route: hop: sip:[email protected]:16200

<— Transmitting (no NAT) to 10.0.0.139:16200 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.0.0.139:16200;branch=z9hG4bK-d8754z-3cc8695861e5c030-1—d8754z-;received=10.0.0.139;rport=16200
From: "6666"sip:[email protected];tag=7b536708
To: sip:[email protected]
Call-ID: Y2M0ZDNlN2VkNjBjYjBiOGQwZDFhMzNlZDA3NDUxZmM.
CSeq: 2 INVITE
Server: FPBX-2.10.1(10.5.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Session-Expires: 95;refresher=uas
Contact: sip:[email protected]:5060
Content-Length: 0

<------------>
– Executing [XXXXXXXXXX@from-internal:1] Macro(“SIP/6666-00000039”, “user-callerid,LIMIT,”) in new stack
– Executing [s@macro-user-callerid:1] Set(“SIP/6666-00000039”, “AMPUSER=6666”) in new stack
– Executing [s@macro-user-callerid:2] GotoIf(“SIP/6666-00000039”, “0?report”) in new stack
– Executing [s@macro-user-callerid:3] ExecIf(“SIP/6666-00000039”, “1?Set(REALCALLERIDNUM=6666)”) in new stack
– Executing [s@macro-user-callerid:4] Set(“SIP/6666-00000039”, “AMPUSER=6666”) in new stack
– Executing [s@macro-user-callerid:5] Set(“SIP/6666-00000039”, “AMPUSERCIDNAME=Dan”) in new stack
– Executing [s@macro-user-callerid:6] GotoIf(“SIP/6666-00000039”, “0?report”) in new stack
– Executing [s@macro-user-callerid:7] Set(“SIP/6666-00000039”, “AMPUSERCID=6666”) in new stack
– Executing [s@macro-user-callerid:8] Set(“SIP/6666-00000039”, “CALLERID(all)=“Dan” <6666>”) in new stack
– Executing [s@macro-user-callerid:9] GotoIf(“SIP/6666-00000039”, “0?limit”) in new stack
– Executing [s@macro-user-callerid:10] ExecIf(“SIP/6666-00000039”, “1?Set(GROUP(concurrency_limit)=6666)”) in new stack
– Executing [s@macro-user-callerid:11] ExecIf(“SIP/6666-00000039”, “0?Set(CHANNEL(language)=)”) in new stack
– Executing [s@macro-user-callerid:12] GosubIf(“SIP/6666-00000039”, “7?sub-ccss,s,1(from-internal,XXXXXXXXXX)”) in new stack
– Executing [s@sub-ccss:1] ExecIf(“SIP/6666-00000039”, “0?Return()”) in new stack
– Executing [s@sub-ccss:2] Set(“SIP/6666-00000039”, “CCSS_SETUP=TRUE”) in new stack
– Executing [s@sub-ccss:3] GosubIf(“SIP/6666-00000039”, “0?monitor_config,1(from-internal,XXXXXXXXXX):monitor_default,1(from-internal,XXXXXXXXXX)”) in new stack
– Executing [monitor_default@sub-ccss:1] GotoIf(“SIP/6666-00000039”, “0?is_exten”) in new stack
– Executing [monitor_default@sub-ccss:2] StackPop(“SIP/6666-00000039”, “”) in new stack
– Executing [monitor_default@sub-ccss:3] Return(“SIP/6666-00000039”, “FALSE”) in new stack
– Executing [s@macro-user-callerid:13] GotoIf(“SIP/6666-00000039”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,26)
– Executing [s@macro-user-callerid:26] Set(“SIP/6666-00000039”, “CALLERID(number)=6666”) in new stack
– Executing [s@macro-user-callerid:27] Set(“SIP/6666-00000039”, “CALLERID(name)=Dan”) in new stack
– Executing [s@macro-user-callerid:28] Set(“SIP/6666-00000039”, “CHANNEL(language)=en”) in new stack
– Executing [XXXXXXXXXX@from-internal:2] Set(“SIP/6666-00000039”, “MOHCLASS=default”) in new stack
– Executing [XXXXXXXXXX@from-internal:3] ExecIf(“SIP/6666-00000039”, “1?Set(TRUNKCIDOVERRIDE=XXXXXXXXXX)”) in new stack
– Executing [XXXXXXXXXX@from-internal:4] Set(“SIP/6666-00000039”, “_NODEST=”) in new stack
– Executing [XXXXXXXXXX@from-internal:5] Gosub(“SIP/6666-00000039”, “sub-record-check,s,1(out,XXXXXXXXXX,)”) in new stack
– Executing [s@sub-record-check:1] GotoIf(“SIP/6666-00000039”, “1?check”) in new stack
– Goto (sub-record-check,s,6)
– Executing [s@sub-record-check:6] Set(“SIP/6666-00000039”, “__MON_FMT=wav”) in new stack
– Executing [s@sub-record-check:7] GotoIf(“SIP/6666-00000039”, “1?next”) in new stack
– Goto (sub-record-check,s,10)
– Executing [s@sub-record-check:10] ExecIf(“SIP/6666-00000039”, “0?Return()”) in new stack
– Executing [s@sub-record-check:11] GotoIf(“SIP/6666-00000039”, “0?out,1”) in new stack
– Executing [s@sub-record-check:12] Set(“SIP/6666-00000039”, “__REC_STATUS=INITIALIZED”) in new stack
– Executing [s@sub-record-check:13] ExecIf(“SIP/6666-00000039”, “0?Set(__REC_POLICY_MODE=)”) in new stack
– Executing [s@sub-record-check:14] Set(“SIP/6666-00000039”, “NOW=1342845002”) in new stack
– Executing [s@sub-record-check:15] Set(“SIP/6666-00000039”, “__DAY=20”) in new stack
– Executing [s@sub-record-check:16] Set(“SIP/6666-00000039”, “__MONTH=07”) in new stack
– Executing [s@sub-record-check:17] Set(“SIP/6666-00000039”, “__YEAR=2012”) in new stack
– Executing [s@sub-record-check:18] Set(“SIP/6666-00000039”, “__TIMESTR=20120720-213002”) in new stack
– Executing [s@sub-record-check:19] Set(“SIP/6666-00000039”, “__FROMEXTEN=6666”) in new stack
– Executing [s@sub-record-check:20] Set(“SIP/6666-00000039”, “__CALLFILENAME=out-XXXXXXXXXX-6666-20120720-213002-1342845002.57”) in new stack
– Executing [s@sub-record-check:21] Goto(“SIP/6666-00000039”, “out,1”) in new stack
– Goto (sub-record-check,out,1)
– Executing [out@sub-record-check:1] ExecIf(“SIP/6666-00000039”, “1?Set(__REC_POLICY_MODE=dontcare)”) in new stack
– Executing [out@sub-record-check:2] GosubIf(“SIP/6666-00000039”, “0?record,1(exten,XXXXXXXXXX,666666)”) in new stack
– Executing [out@sub-record-check:3] Return(“SIP/6666-00000039”, “”) in new stack
– Executing [XXXXXXXXXX@from-internal:6] Macro(“SIP/6666-00000039”, “dialout-trunk,XXXXXXXXXX,”) in new stack
– Executing [s@macro-dialout-trunk:1] Set(“SIP/6666-00000039”, “DIAL_TRUNK=2”) in new stack
– Executing [s@macro-dialout-trunk:2] GosubIf(“SIP/6666-00000039”, “0?sub-pincheck,s,1()”) in new stack
– Executing [s@macro-dialout-trunk:3] GotoIf(“SIP/6666-00000039”, “0?disabletrunk,1”) in new stack
– Executing [s@macro-dialout-trunk:4] Set(“SIP/6666-00000039”, “DIAL_NUMBER=XXXXXXXXXX”) in new stack
– Executing [s@macro-dialout-trunk:5] Set(“SIP/6666-00000039”, “DIAL_TRUNK_OPTIONS=tr”) in new stack
– Executing [s@macro-dialout-trunk:6] Set(“SIP/6666-00000039”, “OUTBOUND_GROUP=OUT_2”) in new stack
– Executing [s@macro-dialout-trunk:7] GotoIf(“SIP/6666-00000039”, “1?nomax”) in new stack
– Goto (macro-dialout-trunk,s,9)
– Executing [s@macro-dialout-trunk:9] GotoIf(“SIP/6666-00000039”, “0?skipoutcid”) in new stack
– Executing [s@macro-dialout-trunk:10] Set(“SIP/6666-00000039”, “DIAL_TRUNK_OPTIONS=”) in new stack
– Executing [s@macro-dialout-trunk:11] Macro(“SIP/6666-00000039”, “outbound-callerid,2”) in new stack
– Executing [s@macro-outbound-callerid:1] ExecIf(“SIP/6666-00000039”, “0?Set(CALLERPRES()=)”) in new stack
– Executing [s@macro-outbound-callerid:2] ExecIf(“SIP/6666-00000039”, “0?Set(REALCALLERIDNUM=6666)”) in new stack
– Executing [s@macro-outbound-callerid:3] GotoIf(“SIP/6666-00000039”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,6)
– Executing [s@macro-outbound-callerid:6] Set(“SIP/6666-00000039”, “USEROUTCID=”) in new stack
– Executing [s@macro-outbound-callerid:7] Set(“SIP/6666-00000039”, “EMERGENCYCID=”) in new stack
– Executing [s@macro-outbound-callerid:8] Set(“SIP/6666-00000039”, “TRUNKOUTCID=XXXXXXXXXX”) in new stack
– Executing [s@macro-outbound-callerid:9] GotoIf(“SIP/6666-00000039”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,12)
– Executing [s@macro-outbound-callerid:12] ExecIf(“SIP/6666-00000039”, “1?Set(CALLERID(all)=XXXXXXXXXX)”) in new stack
– Executing [s@macro-outbound-callerid:13] ExecIf(“SIP/6666-00000039”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [s@macro-outbound-callerid:14] ExecIf(“SIP/6666-00000039”, “1?Set(CALLERID(all)=XXXXXXXXXX)”) in new stack
– Executing [s@macro-outbound-callerid:15] ExecIf(“SIP/6666-00000039”, “0?Set(CALLERPRES()=prohib_passed_screen)”) in new stack
– Executing [s@macro-dialout-trunk:12] GosubIf(“SIP/6666-00000039”, “0?sub-flp-2,s,1()”) in new stack
– Executing [s@macro-dialout-trunk:13] Set(“SIP/6666-00000039”, “OUTNUM=XXXXXXXXXX”) in new stack
– Executing [s@macro-dialout-trunk:14] Set(“SIP/6666-00000039”, “custom=SIP/Gafachi”) in new stack
– Executing [s@macro-dialout-trunk:15] ExecIf(“SIP/6666-00000039”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default))”) in new stack
– Executing [s@macro-dialout-trunk:16] ExecIf(“SIP/6666-00000039”, “0?Set(DIAL_TRUNK_OPTIONS=M(confirm))”) in new stack
– Executing [s@macro-dialout-trunk:17] Macro(“SIP/6666-00000039”, “dialout-trunk-predial-hook,”) in new stack
– Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“SIP/6666-00000039”, “”) in new stack
– Executing [s@macro-dialout-trunk:18] GotoIf(“SIP/6666-00000039”, “0?bypass,1”) in new stack
– Executing [s@macro-dialout-trunk:19] ExecIf(“SIP/6666-00000039”, “1?Set(CONNECTEDLINE(num,i)=XXXXXXXXXX)”) in new stack
– Executing [s@macro-dialout-trunk:20] ExecIf(“SIP/6666-00000039”, “1?Set(CONNECTEDLINE(name,i)=CID:XXXXXXXXXX)”) in new stack
– Executing [s@macro-dialout-trunk:21] GotoIf(“SIP/6666-00000039”, “0?customtrunk”) in new stack
– Executing [s@macro-dialout-trunk:22] Dial(“SIP/6666-00000039”, “SIP/Gafachi/XXXXXXXXXX,300,”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
Audio is at 16212
Adding codec 100003 (ulaw) to SDP
Adding codec 100004 (alaw) to SDP
Adding codec 100002 (gsm) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to 67.216.35.205:5060:
INVITE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.204:5060;branch=z9hG4bK5a769a69;rport
Max-Forwards: 70
From: “XXXXXXXXXX” sip:[email protected];tag=as44d45c5f
To: sip:[email protected]:5060
Contact: sip:[email protected]:5060
Call-ID: [email protected]:5060
CSeq: 102 INVITE
User-Agent: FPBX-2.10.1(10.5.0)
Date: Sat, 21 Jul 2012 04:30:02 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 276

v=0
o=root 905138667 905138667 IN IP4 10.0.0.204
s=Asterisk PBX 10.5.0
c=IN IP4 10.0.0.204
t=0 0
m=audio 16212 RTP/AVP 0 8 3 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv


-- Called SIP/Gafachi/XXXXXXXXXX

<— SIP read from UDP:67.216.35.205:5060 —>
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 10.0.0.204:5060;branch=z9hG4bK5a769a69;received=XXX.XXX.XXX.XXX;rport=12002
From: “XXXXXXXXXX” sip:[email protected];tag=as44d45c5f
To: sip:[email protected]:5060;tag=gss512d94c2e8cca0fd936cc112dcfa99d1
Call-ID: [email protected]:5060
CSeq: 102 INVITE
Server: Gafachi UAS v110.09
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE
Contact: sip:[email protected]
Proxy-Authenticate: Digest realm=“sip2a.gafachi.com”, nonce="8ecd8eabbf28014d"
Content-Length: 0

<------------->
— (11 headers 0 lines) —
set_destination: Parsing sip:[email protected]:5060 for address/port to send to
set_destination: set destination to 67.216.35.205:5060
Transmitting (NAT) to 67.216.35.205:5060:
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.204:5060;branch=z9hG4bK5a769a69;rport
Max-Forwards: 70
From: “XXXXXXXXXX” sip:[email protected];tag=as44d45c5f
To: sip:[email protected]:5060;tag=gss512d94c2e8cca0fd936cc112dcfa99d1
Contact: sip:[email protected]:5060
Call-ID: [email protected]:5060
CSeq: 102 ACK
User-Agent: FPBX-2.10.1(10.5.0)
Content-Length: 0


Audio is at 16212
Adding codec 100003 (ulaw) to SDP
Adding codec 100004 (alaw) to SDP
Adding codec 100002 (gsm) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to 67.216.35.205:5060:
INVITE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.204:5060;branch=z9hG4bK7b90981c;rport
Max-Forwards: 70
From: “XXXXXXXXXX” sip:[email protected];tag=as44d45c5f
To: sip:[email protected]:5060
Contact: sip:[email protected]:5060
Call-ID: [email protected]:5060
CSeq: 103 INVITE
User-Agent: FPBX-2.10.1(10.5.0)
Proxy-Authorization: Digest username=“xxxxxxxxxxxx”, realm=“sip2a.gafachi.com”, algorithm=MD5, uri=“sip:[email protected]:5060”, nonce=“8ecd8eabbf28014d”, response="1fabe5a0a7fb7c57a4e1133dd7f22e31"
Date: Sat, 21 Jul 2012 04:30:02 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 276

v=0
o=root 905138667 905138668 IN IP4 10.0.0.204
s=Asterisk PBX 10.5.0
c=IN IP4 10.0.0.204
t=0 0
m=audio 16212 RTP/AVP 0 8 3 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv


<— SIP read from UDP:67.216.35.205:5060 —>
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 10.0.0.204:5060;branch=z9hG4bK7b90981c;received=XXX.XXX.XXX.XXX;rport=12002
From: “XXXXXXXXXX” sip:[email protected];tag=as44d45c5f
To: sip:[email protected]:5060;tag=gss512d94c2e8cca0fd936cc112dcfa99d1
Call-ID: [email protected]:5060
CSeq: 103 INVITE
Server: Gafachi UAS v110.09
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE
Contact: sip:[email protected]
Content-Length: 0

<------------->
— (10 headers 0 lines) —
set_destination: Parsing sip:[email protected]:5060 for address/port to send to
set_destination: set destination to 67.216.35.205:5060
Transmitting (NAT) to 67.216.35.205:5060:
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.204:5060;branch=z9hG4bK7b90981c;rport
Max-Forwards: 70
From: “XXXXXXXXXX” sip:[email protected];tag=as44d45c5f
To: sip:[email protected]:5060;tag=gss512d94c2e8cca0fd936cc112dcfa99d1
Contact: sip:[email protected]:5060
Call-ID: [email protected]:5060
CSeq: 103 ACK
User-Agent: FPBX-2.10.1(10.5.0)
Content-Length: 0


Scheduling destruction of SIP dialog ‘[email protected]:5060’ in 32000 ms (Method: INVITE)
== Everyone is busy/congested at this time (1:0/1/0)
– Executing [s@macro-dialout-trunk:23] NoOp(“SIP/6666-00000039”, “Dial failed for some reason with DIALSTATUS = CONGESTION and HANGUPCAUSE = 34”) in new stack
– Executing [s@macro-dialout-trunk:24] Goto(“SIP/6666-00000039”, “s-CONGESTION,1”) in new stack
– Goto (macro-dialout-trunk,s-CONGESTION,1)
– Executing [s-CONGESTION@macro-dialout-trunk:1] Set(“SIP/6666-00000039”, “RC=34”) in new stack
– Executing [s-CONGESTION@macro-dialout-trunk:2] Goto(“SIP/6666-00000039”, “34,1”) in new stack
– Goto (macro-dialout-trunk,34,1)
– Executing [34@macro-dialout-trunk:1] Goto(“SIP/6666-00000039”, “continue,1”) in new stack
– Goto (macro-dialout-trunk,continue,1)
– Executing [continue@macro-dialout-trunk:1] GotoIf(“SIP/6666-00000039”, “1?noreport”) in new stack
– Goto (macro-dialout-trunk,continue,3)
– Executing [continue@macro-dialout-trunk:3] NoOp(“SIP/6666-00000039”, “TRUNK Dial failed due to CONGESTION HANGUPCAUSE: 34 - failing through to other trunks”) in new stack
– Executing [continue@macro-dialout-trunk:4] Set(“SIP/6666-00000039”, “CALLERID(number)=6666”) in new stack
– Executing [XXXXXXXXXX@from-internal:7] Macro(“SIP/6666-00000039”, “outisbusy,”) in new stack
– Executing [s@macro-outisbusy:1] Progress(“SIP/6666-00000039”, “”) in new stack
Audio is at 11938
Adding codec 100003 (ulaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<— Transmitting (no NAT) to 10.0.0.139:16200 —>
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 10.0.0.139:16200;branch=z9hG4bK-d8754z-3cc8695861e5c030-1—d8754z-;received=10.0.0.139;rport=16200
From: "6666"sip:[email protected];tag=7b536708
To: sip:[email protected];tag=as2fc3ea9c
Call-ID: Y2M0ZDNlN2VkNjBjYjBiOGQwZDFhMzNlZDA3NDUxZmM.
CSeq: 2 INVITE
Server: FPBX-2.10.1(10.5.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Session-Expires: 95;refresher=uas
Contact: sip:[email protected]:5060
Content-Type: application/sdp
Content-Length: 231

v=0
o=root 2056472631 2056472631 IN IP4 10.0.0.204
s=Asterisk PBX 10.5.0
c=IN IP4 10.0.0.204
t=0 0
m=audio 11938 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

<------------>
– Executing [s@macro-outisbusy:2] GotoIf(“SIP/6666-00000039”, “0?emergency,1”) in new stack
– Executing [s@macro-outisbusy:3] GotoIf(“SIP/6666-00000039”, “0?intracompany,1”) in new stack
– Executing [s@macro-outisbusy:4] Playback(“SIP/6666-00000039”, “all-circuits-busy-now&pls-try-call-later, noanswer”) in new stack
– <SIP/6666-00000039> Playing ‘all-circuits-busy-now.ulaw’ (language ‘en’)
– <SIP/6666-00000039> Playing ‘pls-try-call-later.ulaw’ (language ‘en’)
– Executing [s@macro-outisbusy:5] Congestion(“SIP/6666-00000039”, “20”) in new stack

<— Reliably Transmitting (no NAT) to 10.0.0.139:16200 —>
SIP/2.0 503 Service Unavailable
Via: SIP/2.0/UDP 10.0.0.139:16200;branch=z9hG4bK-d8754z-3cc8695861e5c030-1—d8754z-;received=10.0.0.139;rport=16200
From: "6666"sip:[email protected];tag=7b536708
To: sip:[email protected];tag=as2fc3ea9c
Call-ID: Y2M0ZDNlN2VkNjBjYjBiOGQwZDFhMzNlZDA3NDUxZmM.
CSeq: 2 INVITE
Server: FPBX-2.10.1(10.5.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Session-Expires: 95;refresher=uas
X-Asterisk-HangupCause: Circuit/channel congestion
X-Asterisk-HangupCauseCode: 34
Content-Length: 0

<------------>
[2012-07-20 21:30:06] WARNING[3783]: channel.c:4744 ast_prod: Prodding channel ‘SIP/6666-00000039’ failed
== Spawn extension (macro-outisbusy, s, 5) exited non-zero on ‘SIP/6666-00000039’ in macro ‘outisbusy’
== Spawn extension (from-internal, XXXXXXXXXX, 7) exited non-zero on ‘SIP/6666-00000039’
– Executing [h@from-internal:1] Hangup(“SIP/6666-00000039”, “”) in new stack
== Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/6666-00000039’

<— SIP read from UDP:10.0.0.139:16200 —>
ACK sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 10.0.0.139:16200;branch=z9hG4bK-d8754z-3cc8695861e5c030-1—d8754z-;rport
Max-Forwards: 70
To: sip:[email protected];tag=as2fc3ea9c
From: "6666"sip:[email protected];tag=7b536708
Call-ID: Y2M0ZDNlN2VkNjBjYjBiOGQwZDFhMzNlZDA3NDUxZmM.
CSeq: 2 ACK
Content-Length: 0