Audiocodes MP114 - Configure 2 fxo ports for inbound and outbound calling

Freepbx Version: 2.7.0.2
Asterisk Version: 1.6.2.7
OS: Centos 5.4 x64
Linux kernel: 2.6.18-164.15.1.el5xen
Asterisk and Freepbx installed onto xen domu using yum from repo baseurl=http://packages.asterisk.org/centos/ with the kmod-dahdi-linux-xen timing drivers.
Freepbx updated to 2.7.0.2 after original rpm install of 2.5
Using teliax sip trunk and audiocodes mp114 with 2fxs/2fxo ports. 2 pots lines on the mp114 for local incoming and outgoing calls and emergency backup.

I’ve configured the mp114 from config examples from the following sites but nothing seems to be working for the outgoing calls.
http://bwhead.lj.net/wiki/index.php?comment_page=3&page_id=644&comments_page=1&page=2
MP114 transfers calls to asterisk just fine for incoming calls, but asterisk unable to complete a call out through the 2 mp114 fxo trunks. It basically keeps ringing according to asterisk.

asterisk CLI sees the call as below, with my eventual hangup.
Connected to Asterisk 1.6.2.7 currently running on asterisk (pid = 15134)
Verbosity is at least 26
== Manager ‘admin’ logged on from 127.0.0.1
== Manager ‘admin’ logged off from 127.0.0.1
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Executing [97572414@from-internal:1] Macro(“SIP/112-00000080”, “user-callerid,SKIPTTL,”) in new stack
– Executing [s@macro-user-callerid:1] Set(“SIP/112-00000080”, “AMPUSER=112”) in new stack
– Executing [s@macro-user-callerid:2] GotoIf(“SIP/112-00000080”, “0?report”) in new stack
– Executing [s@macro-user-callerid:3] ExecIf(“SIP/112-00000080”, “1?Set(REALCALLERIDNUM=112)”) in new stack
– Executing [s@macro-user-callerid:4] Set(“SIP/112-00000080”, “AMPUSER=112”) in new stack
– Executing [s@macro-user-callerid:5] Set(“SIP/112-00000080”, “AMPUSERCIDNAME=David Denning”) in new stack
– Executing [s@macro-user-callerid:6] GotoIf(“SIP/112-00000080”, “0?report”) in new stack
– Executing [s@macro-user-callerid:7] Set(“SIP/112-00000080”, “AMPUSERCID=112”) in new stack
– Executing [s@macro-user-callerid:8] Set(“SIP/112-00000080”, “CALLERID(all)=“David Denning” <112>”) in new stack
– Executing [s@macro-user-callerid:9] GotoIf(“SIP/112-00000080”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,18)
– Executing [s@macro-user-callerid:18] NoOp(“SIP/112-00000080”, “Using CallerID “David Denning” <112>”) in new stack
– Executing [97572414@from-internal:2] Set(“SIP/112-00000080”, “_NODEST=”) in new stack
– Executing [97572414@from-internal:3] Macro(“SIP/112-00000080”, “record-enable,112,OUT,”) in new stack
– Executing [s@macro-record-enable:1] GotoIf(“SIP/112-00000080”, “1?check”) in new stack
– Goto (macro-record-enable,s,4)
– Executing [s@macro-record-enable:4] ExecIf(“SIP/112-00000080”, “0?MacroExit()”) in new stack
– Executing [s@macro-record-enable:5] GotoIf(“SIP/112-00000080”, “0?Group:OUT”) in new stack
– Goto (macro-record-enable,s,15)
– Executing [s@macro-record-enable:15] GotoIf(“SIP/112-00000080”, “0?IN”) in new stack
– Executing [s@macro-record-enable:16] ExecIf(“SIP/112-00000080”, “1?MacroExit()”) in new stack
– Executing [97572414@from-internal:4] Macro(“SIP/112-00000080”, “dialout-trunk,3,7572414,”) in new stack
– Executing [s@macro-dialout-trunk:1] Set(“SIP/112-00000080”, “DIAL_TRUNK=3”) in new stack
– Executing [s@macro-dialout-trunk:2] GosubIf(“SIP/112-00000080”, “0?sub-pincheck,s,1”) in new stack
– Executing [s@macro-dialout-trunk:3] GotoIf(“SIP/112-00000080”, “0?disabletrunk,1”) in new stack
– Executing [s@macro-dialout-trunk:4] Set(“SIP/112-00000080”, “DIAL_NUMBER=7572414”) in new stack
– Executing [s@macro-dialout-trunk:5] Set(“SIP/112-00000080”, “DIAL_TRUNK_OPTIONS=trw”) in new stack
– Executing [s@macro-dialout-trunk:6] Set(“SIP/112-00000080”, “OUTBOUND_GROUP=OUT_3”) in new stack
– Executing [s@macro-dialout-trunk:7] GotoIf(“SIP/112-00000080”, “1?nomax”) in new stack
– Goto (macro-dialout-trunk,s,9)
– Executing [s@macro-dialout-trunk:9] GotoIf(“SIP/112-00000080”, “0?skipoutcid”) in new stack
– Executing [s@macro-dialout-trunk:10] Set(“SIP/112-00000080”, “DIAL_TRUNK_OPTIONS=TW”) in new stack
– Executing [s@macro-dialout-trunk:11] Macro(“SIP/112-00000080”, “outbound-callerid,3”) in new stack
– Executing [s@macro-outbound-callerid:1] ExecIf(“SIP/112-00000080”, “0?Set(CALLERPRES()=)”) in new stack
– Executing [s@macro-outbound-callerid:2] ExecIf(“SIP/112-00000080”, “0?Set(REALCALLERIDNUM=112)”) in new stack
– Executing [s@macro-outbound-callerid:3] GotoIf(“SIP/112-00000080”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,6)
– Executing [s@macro-outbound-callerid:6] Set(“SIP/112-00000080”, “USEROUTCID=”) in new stack
– Executing [s@macro-outbound-callerid:7] Set(“SIP/112-00000080”, “EMERGENCYCID=”) in new stack
– Executing [s@macro-outbound-callerid:8] Set(“SIP/112-00000080”, “TRUNKOUTCID=”) in new stack
– Executing [s@macro-outbound-callerid:9] GotoIf(“SIP/112-00000080”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,12)
– Executing [s@macro-outbound-callerid:12] ExecIf(“SIP/112-00000080”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [s@macro-outbound-callerid:13] ExecIf(“SIP/112-00000080”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [s@macro-outbound-callerid:14] ExecIf(“SIP/112-00000080”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [s@macro-outbound-callerid:15] ExecIf(“SIP/112-00000080”, “0?Set(CALLERPRES()=prohib_passed_screen)”) in new stack
– Executing [s@macro-dialout-trunk:12] ExecIf(“SIP/112-00000080”, “1?AGI(fixlocalprefix)”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
– <SIP/112-00000080>AGI Script fixlocalprefix completed, returning 0
– Executing [s@macro-dialout-trunk:13] Set(“SIP/112-00000080”, “OUTNUM=7572414”) in new stack
– Executing [s@macro-dialout-trunk:14] Set(“SIP/112-00000080”, “custom=SIP/pstn”) in new stack
– Executing [s@macro-dialout-trunk:15] ExecIf(“SIP/112-00000080”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^)TW)”) in new stack
– Executing [s@macro-dialout-trunk:16] Macro(“SIP/112-00000080”, “dialout-trunk-predial-hook,”) in new stack
– Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“SIP/112-00000080”, “”) in new stack
– Executing [s@macro-dialout-trunk:17] GotoIf(“SIP/112-00000080”, “0?bypass,1”) in new stack
– Executing [s@macro-dialout-trunk:18] GotoIf(“SIP/112-00000080”, “0?customtrunk”) in new stack
– Executing [s@macro-dialout-trunk:19] Dial(“SIP/112-00000080”, “SIP/pstn/7572414,300,TW”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called pstn/7572414
– SIP/pstn-00000081 is ringing
== Manager ‘admin’ logged on from 127.0.0.1
== Manager ‘admin’ logged off from 127.0.0.1
== Manager ‘admin’ logged on from 127.0.0.1
== Spawn extension (macro-dialout-trunk, s, 19) exited non-zero on ‘SIP/112-00000080’ in macro ‘dialout-trunk’
== Spawn extension (from-internal, 97572414, 4) exited non-zero on ‘SIP/112-00000080’
– Executing [h@from-internal:1] Macro(“SIP/112-00000080”, “hangupcall”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“SIP/112-00000080”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,4)
– Executing [s@macro-hangupcall:4] GotoIf(“SIP/112-00000080”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,7)
– Executing [s@macro-hangupcall:7] GotoIf(“SIP/112-00000080”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [s@macro-hangupcall:9] Hangup(“SIP/112-00000080”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘SIP/112-00000080’ in macro ‘hangupcall’
== Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/112-00000080’

The audiocodes mp114 show the below log during the call.

8d:16h:21m:34s ( lgr_flow)(16160203 ) ---- Incoming SIP Message from 192.168.0.6:5060 ---- [Time: 16:21:34]

8d:16h:21m:34s INVITE sip:[email protected] SIP/2.0 Via: SIP/2.0/UDP 192.168.0.6:5060;branch=z9hG4bK70159dd4;rport Max-Forwards: 70 From: “David Denning” <sip:[email protected]>;tag=as0e3e8e76 To: <sip:[email protected]> Contact: <sip:[email protected]> Call-ID: [email protected] CSeq: 102 INVITE User-Agent: Asterisk PBX 1.6.2.7 Date: Tue, 25 May 2010 18:26:45 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO Supported: replaces, timer Content-Type: application/sdp Content-Length: 250 v=0 o=root 985023876 985023876 IN IP4 192.168.0.6 s=Asterisk PBX 1.6.2.7 c=IN IP4 192.168.0.6 t=0 0 m=audio 16530 RTP/AVP 0 8 3 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:3 GSM/8000 a=silenceSupp:off - - - - a=ptime:20 a=sendrecv [Time: 16:21:34]

8d:16h:21m:34s ( lgr_flow)(16160205 ) | | new GetNewSIPCall created - #0 [Time: 16:21:34]

8d:16h:21m:34s ( sip_stack)(16160206 ) new AcSIPCallAPI created - #4 [Time: 16:21:34]

8d:16h:21m:34s ( lgr_stk_mngr)(16160207 ) Resource StackSession <#5> Allocated [Time: 16:21:34]

8d:16h:21m:34s ( lgr_flow)(16160208 ) | |(SIPTU#0)INVITE State:Idle() [Time: 16:21:34]

8d:16h:21m:34s ( sip_stack)(16160209 ) SIPCall(#0) changes state from Idle to Invited [Time: 16:21:34]

8d:16h:21m:34s ( lgr_flow)(16160210 ) | | | #5:SIP_SETUP_EV([email protected]) [Time: 16:21:34]

8d:16h:21m:34s ( lgr_callf)(16160211 ) new Call created - #4 [Time: 16:21:34]

8d:16h:21m:34s ( lgr_stk_ses)(16160212 ) SIPStackSession::HandleStackSetupEV - NEWCALL: SrcPN=0 [Time: 16:21:34]

8d:16h:21m:34s ( lgr_stk_ses)(16160213 ) <SESSION #5> SendToCall - event: NEW_CALL_EV m_Call = 31723040 [Time: 16:21:34]

8d:16h:21m:34s ( lgr_flow)(16160214 ) | | #4:NEW_CALL_EV:([email protected]) [Time: 16:21:34]

8d:16h:21m:34s ( lgr_flow)(16160216 ) ServicesMngr::GetEndPoint PhoneNum = 7572414 [Time: 16:21:34]

8d:16h:21m:34s ( lgr_flow)(16160239 ) ---- Incoming SIP Message from 192.168.0.7:5060 ---- [Time: 16:21:34]

8d:16h:21m:34s OPTIONS sip:192.168.0.5 SIP/2.0 Via: SIP/2.0/UDP 192.168.0.7:5060;branch=z9hG4bK05877346;rport From: “Unknown” <sip:[email protected]>;tag=as0e87bb93 To: <sip:192.168.0.5> Contact: <sip:[email protected]> Call-ID: [email protected] CSeq: 102 OPTIONS User-Agent: Asterisk PBX Max-Forwards: 70 Date: Tue, 25 May 2010 18:26:45 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Supported: replaces Content-Length: 0 [Time: 16:21:34]

8d:16h:21m:34s ( lgr_flow)(16160241 ) | | new GetNewIndTransaction created - #2 [Time: 16:21:34]

8d:16h:21m:34s ( sip_stack)(16160242 ) new AcSIPDialogAPI created - #2 [Time: 16:21:34]

8d:16h:21m:34s ( lgr_flow)(16160243 ) | |(SIPTU#2)OPTIONS State:DialogIdle() [Time: 16:21:34]

8d:16h:21m:34s ( sip_stack)(16160244 ) SIPDialog(#2) changes state from DialogIdle to DialogInitiated [Time: 16:21:34]

8d:16h:21m:34s ( lgr_psbrdif)(16160245 ) QueryOnHookPortStatus (ChannelNum=2), status = 1 [Time: 16:21:34]

8d:16h:21m:34s ( lgr_psbrdif)(16160246 ) QueryOnHookPortStatus (ChannelNum=3), status = 1 [Time: 16:21:34]

8d:16h:21m:34s ( lgr_flow)(16160247 ) | |(SIPTU#2)GENERAL_RESPONSE_REQ State:DialogInitiated([email protected]) [Time: 16:21:34]

8d:16h:21m:34s ( sip_stack)(16160248 ) SIPDialog(#2) changes state from DialogInitiated to DialogConnected [Time: 16:21:34]

8d:16h:21m:34s ( lgr_flow)(16160249 ) ---- Outgoing SIP Message to 192.168.0.7:5060 ---- [Time: 16:21:34]

8d:16h:21m:34s ( lgr_flow)(16160251 ) | |(SIPTU#2)DIALOG_DISCONNECT_REQ State:DialogConnected([email protected]) [Time: 16:21:34]

8d:16h:21m:34s ( sip_stack)(16160252 ) SIPDialog(#2) changes state from DialogConnected to DialogDisconnected [Time: 16:21:34]

8d:16h:21m:34s ( sip_stack)(16160253 ) AcSIPStackAPI::FreeDialogAPI - #2 [Time: 16:21:34]

8d:16h:21m:35s ( lgr_flow)(16160254 ) ---- Incoming SIP Message from 192.168.0.7:5060 ---- [Time: 16:21:35]

8d:16h:21m:35s OPTIONS sip:192.168.0.5 SIP/2.0 Via: SIP/2.0/UDP 192.168.0.7:5060;branch=z9hG4bK02e15c49;rport From: “Unknown” <sip:[email protected]>;tag=as1275ef25 To: <sip:192.168.0.5> Contact: <sip:[email protected]> Call-ID: [email protected] CSeq: 102 OPTIONS User-Agent: Asterisk PBX Max-Forwards: 70 Date: Tue, 25 May 2010 18:26:45 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Supported: replaces Content-Length: 0 [Time: 16:21:35]

8d:16h:21m:35s ( lgr_flow)(16160256 ) | | new GetNewIndTransaction created - #1 [Time: 16:21:35]

8d:16h:21m:35s ( sip_stack)(16160257 ) new AcSIPDialogAPI created - #1 [Time: 16:21:35]

8d:16h:21m:35s ( lgr_flow)(16160258 ) | |(SIPTU#1)OPTIONS State:DialogIdle() [Time: 16:21:35]

8d:16h:21m:35s ( sip_stack)(16160259 ) SIPDialog(#1) changes state from DialogIdle to DialogInitiated [Time: 16:21:35]

8d:16h:21m:35s ( lgr_psbrdif)(16160260 ) QueryOnHookPortStatus (ChannelNum=2), status = 1 [Time: 16:21:35]

8d:16h:21m:35s ( lgr_psbrdif)(16160261 ) QueryOnHookPortStatus (ChannelNum=3), status = 1 [Time: 16:21:35]

8d:16h:21m:35s ( lgr_flow)(16160262 ) | |(SIPTU#1)GENERAL_RESPONSE_REQ State:DialogInitiated([email protected]) [Time: 16:21:35]

8d:16h:21m:35s ( sip_stack)(16160263 ) SIPDialog(#1) changes state from DialogInitiated to DialogConnected [Time: 16:21:35]

8d:16h:21m:35s ( lgr_flow)(16160264 ) ---- Outgoing SIP Message to 192.168.0.7:5060 ---- [Time: 16:21:35]

8d:16h:21m:35s ( lgr_flow)(16160266 ) | |(SIPTU#1)DIALOG_DISCONNECT_REQ State:DialogConnected([email protected]) [Time: 16:21:35]

8d:16h:21m:35s ( sip_stack)(16160267 ) SIPDialog(#1) changes state from DialogConnected to DialogDisconnected [Time: 16:21:35]

8d:16h:21m:35s ( sip_stack)(16160268 ) AcSIPStackAPI::FreeDialogAPI - #1 [Time: 16:21:35]

8d:16h:21m:38s ( lgr_flow)(16160269 ) ---- Incoming SIP Message from 192.168.0.6:5060 ---- [Time: 16:21:38]

8d:16h:21m:38s OPTIONS sip:192.168.0.5 SIP/2.0 Via: SIP/2.0/UDP 192.168.0.6:5060;branch=z9hG4bK0deb4901;rport Max-Forwards: 70 From: “Unknown” <sip:[email protected]>;tag=as481d5cfc To: <sip:192.168.0.5> Contact: <sip:[email protected]> Call-ID: [email protected] CSeq: 102 OPTIONS User-Agent: Asterisk PBX 1.6.2.7 Date: Tue, 25 May 2010 18:26:49 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO Supported: replaces, timer Content-Length: 0 [Time: 16:21:38]

8d:16h:21m:38s ( lgr_flow)(16160271 ) | | new GetNewIndTransaction created - #0 [Time: 16:21:38]

8d:16h:21m:38s ( sip_stack)(16160272 ) new AcSIPDialogAPI created - #0 [Time: 16:21:38]

8d:16h:21m:38s ( lgr_flow)(16160273 ) | |(SIPTU#0)OPTIONS State:DialogIdle() [Time: 16:21:38]

8d:16h:21m:38s ( sip_stack)(16160274 ) SIPDialog(#0) changes state from DialogIdle to DialogInitiated [Time: 16:21:38]

8d:16h:21m:38s ( lgr_psbrdif)(16160275 ) QueryOnHookPortStatus (ChannelNum=2), status = 1 [Time: 16:21:38]

8d:16h:21m:38s ( lgr_psbrdif)(16160276 ) QueryOnHookPortStatus (ChannelNum=3), status = 1 [Time: 16:21:38]

8d:16h:21m:38s ( lgr_flow)(16160277 ) | |(SIPTU#0)GENERAL_RESPONSE_REQ State:DialogInitiated([email protected]) [Time: 16:21:38]

8d:16h:21m:38s ( sip_stack)(16160278 ) SIPDialog(#0) changes state from DialogInitiated to DialogConnected [Time: 16:21:38]

8d:16h:21m:38s ( lgr_flow)(16160279 ) ---- Outgoing SIP Message to 192.168.0.6:5060 ---- [Time: 16:21:38]

8d:16h:21m:38s ( lgr_flow)(16160281 ) | |(SIPTU#0)DIALOG_DISCONNECT_REQ State:DialogConnected([email protected]) [Time: 16:21:38]

8d:16h:21m:38s ( sip_stack)(16160282 ) SIPDialog(#0) changes state from DialogConnected to DialogDisconnected [Time: 16:21:38]

8d:16h:21m:38s ( sip_stack)(16160283 ) AcSIPStackAPI::FreeDialogAPI - #0 [Time: 16:21:38]

8d:16h:21m:39s ( lgr_flow)(16160284 ) | | TransactionUserMngr::ReturnDialog - #2 [Time: 16:21:39]

8d:16h:21m:39s ( sip_stack)(16160285 ) SIPDialog(#2) changes state from DialogDisconnected to DialogIdle [Time: 16:21:39]

8d:16h:21m:40s ( lgr_flow)(16160286 ) | | TransactionUserMngr::ReturnDialog - #1 [Time: 16:21:40]

8d:16h:21m:40s ( sip_stack)(16160287 ) SIPDialog(#1) changes state from DialogDisconnected to DialogIdle [Time: 16:21:40]

8d:16h:21m:43s ( lgr_flow)(16160288 ) | | TransactionUserMngr::ReturnDialog - #0 [Time: 16:21:43]

8d:16h:21m:43s ( sip_stack)(16160289 ) SIPDialog(#0) changes state from DialogDisconnected to DialogIdle [Time: 16:21:43]

8d:16h:21m:44s ( lgr_flow)(16160290 ) ---- Incoming SIP Message from 192.168.0.6:5060 ---- [Time: 16:21:44]

8d:16h:21m:44s OPTIONS sip:192.168.0.5 SIP/2.0 Via: SIP/2.0/UDP 192.168.0.6:5060;branch=z9hG4bK25a8f654;rport Max-Forwards: 70 From: “Unknown” <sip:[email protected]>;tag=as2175d837 To: <sip:192.168.0.5> Contact: <sip:[email protected]> Call-ID: [email protected] CSeq: 102 OPTIONS User-Agent: Asterisk PBX 1.6.2.7 Date: Tue, 25 May 2010 18:26:55 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO Supported: replaces, timer Content-Length: 0 [Time: 16:21:44]

8d:16h:21m:44s ( lgr_flow)(16160292 ) | | new GetNewIndTransaction created - #10 [Time: 16:21:44]

8d:16h:21m:44s ( sip_stack)(16160293 ) new AcSIPDialogAPI created - #10 [Time: 16:21:44]

8d:16h:21m:44s ( lgr_flow)(16160294 ) | |(SIPTU#10)OPTIONS State:DialogIdle() [Time: 16:21:44]

8d:16h:21m:44s ( sip_stack)(16160295 ) SIPDialog(#10) changes state from DialogIdle to DialogInitiated [Time: 16:21:44]

8d:16h:21m:44s ( lgr_psbrdif)(16160296 ) QueryOnHookPortStatus (ChannelNum=2), status = 1 [Time: 16:21:44]

8d:16h:21m:44s ( lgr_psbrdif)(16160297 ) QueryOnHookPortStatus (ChannelNum=3), status = 1 [Time: 16:21:44]

8d:16h:21m:44s ( lgr_flow)(16160298 ) | |(SIPTU#10)GENERAL_RESPONSE_REQ State:DialogInitiated([email protected]) [Time: 16:21:44]

8d:16h:21m:44s ( sip_stack)(16160299 ) SIPDialog(#10) changes state from DialogInitiated to DialogConnected [Time: 16:21:44]

8d:16h:21m:44s ( lgr_flow)(16160300 ) ---- Outgoing SIP Message to 192.168.0.6:5060 ---- [Time: 16:21:44]

8d:16h:21m:44s ( lgr_flow)(16160302 ) | |(SIPTU#10)DIALOG_DISCONNECT_REQ State:DialogConnected([email protected]) [Time: 16:21:44]

8d:16h:21m:44s ( sip_stack)(16160303 ) SIPDialog(#10) changes state from DialogConnected to DialogDisconnected [Time: 16:21:44]

8d:16h:21m:45s ( lgr_flow)(16160305 ) ---- Incoming SIP Message from 192.168.0.6:5060 ---- [Time: 16:21:45]

8d:16h:21m:45s ( lgr_flow)(16160306 ) CANCEL sip:[email protected] SIP/2.0 Via: SIP/2.0/UDP 192.168.0.6:5060;branch=z9hG4bK70159dd4;rport Max-Forwards: 70 From: “David Denning” <sip:[email protected]>;tag=as0e3e8e76 To: <sip:[email protected]> Call-ID: [email protected] CSeq: 102 CANCEL User-Agent: Asterisk PBX 1.6.2.7 Content-Length: 0 [Time: 16:21:45]

8d:16h:21m:45s ( lgr_flow)(16160307 ) | |(SIPTU#0)CANCEL State:Invited([email protected]) [Time: 16:21:45]

8d:16h:21m:45s ( sip_stack)(16160308 ) SIPCall(#0) changes state from Invited to Disconnected [Time: 16:21:45]

8d:16h:21m:45s ( lgr_flow)(16160309 ) ---- Outgoing SIP Message to 192.168.0.6:5060 ---- [Time: 16:21:45]

8d:16h:21m:45s SIP/2.0 487 Request Terminated Via: SIP/2.0/UDP 192.168.0.6:5060;branch=z9hG4bK70159dd4;rport From: “David Denning” <sip:[email protected]>;tag=as0e3e8e76 To: <sip:[email protected]>;tag=1c368158384 Call-ID: [email protected] CSeq: 102 INVITE Supported: em,timer,replaces,path,early-session,resource-priority Allow: REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE Server: Audiocodes-Sip-Gateway-MP-114 FXS_FXO/v.5.20A.027.004 Reason: SIP ;cause=487 ;text=“487 Request Terminated” Content-Length: 0 [Time: 16:21:45]

8d:16h:21m:45s ( sip_stack)(16160311 ) UdpRtxMngr::Transmit 487 Response 102 INVITE Rtx Left: 6 Dest: c0a80006:5060 CallID: ([email protected]) [Time: 16:21:45]

8d:16h:21m:45s ( lgr_flow)(16160312 ) ---- Outgoing SIP Message to 192.168.0.6:5060 ---- [Time: 16:21:45]

I googled and found a link to some detailed instructions.
http://www.trixbox.org/forums/trixbox-forums/open-discussion/detailed-audiocodes-mp-11x-fxo-gateway-config-instructions

Basically I need to add the below.
AudioCodes: Management > Routing Tables > IP to Trunk Group Routing
Dest. Phone Prefix = *
Source Phone Prefix = *
Source IP Address = IP address of my freepbx
Hunt Group ID = 1
Profile ID = 0

I hope the helps others save some time.