Hi Cavagnaro, 
Sorry for being so stupid. But I still cannot get the call from sip to avaya working. 
I have done the following : 
-Added access code to both the sip and avaya switch 
-Added External route point and trunk to both the switches
-Added access number in the External route point 
Still does not work 
Log for sip server : 
     @location -a = 'AvayaSwitch'
      backup-type = not-specified <DM>
      state = enabled
      protocol = 'addp'
      addp-timeout = 100
      addp-remote-timeout = 100
      addp-trace = 'off' <DM>
      app-type = 1
      access-code -a = '-N/A-'
      backup-for = NULL <DM>
      primary-for = NULL <DM>
      options list  <M>
        reconnect-tout = '5 sec' <DM>
        cast-type = 'route direct-callid reroute direct-uui direct-ani direct-notoken dnis-pool direct-digits pullback route-uui direct-network-callid' <DM>
        timeout = '1 min'
        request-tout = '20 sec' <DM>
        default-dn = NULL <DM>
      extrouter list  <M>
        default-cast-type -a = route
        backward-cast-type -a = (undef)
        inbound-transaction-parameters -a = NULL <D>
        inbound-cof-parameters -a = 'match-callid, match-flexible=true, inbound-only=true' <D>
        outbound-transaction-parameters -a = 'propagate=yes' <D>
        outbound-cof-parameters -a = NULL <D>
        cluster-role = off <DM>
        proxy-name = NULL <DM>
    ReportingStatServer [120] list {aux}  <+M>
      @location -a = 'ReportingStatServer' <+>
      backup-type = not-specified <+D>
      state = enabled <+>
      protocol = 'default' <+D>
      addp-timeout = 0 <+D>
      addp-remote-timeout = 0 <+D>
      addp-trace = 'off' <+D>
      app-type = 2 <+>
      access-code -a = NULL <+D>
      backup-for = NULL <DM>
      primary-for = NULL <DM>
      options list  <D>
        reconnect-tout = '5 sec' <DM>
        cast-type = 'route direct-callid reroute direct-uui direct-ani direct-notoken dnis-pool direct-digits pullback route-uui direct-network-callid' <DM>
        timeout = '60 sec' <DM>
        request-tout = '20 sec' <DM>
        default-dn = NULL <DM>
      extrouter list  <DM>
        default-cast-type -a = default <DM>
        backward-cast-type -a = route <DM>
        inbound-transaction-parameters -a = NULL <DM>
        inbound-cof-parameters -a = 'match-callid, match-flexible=true, inbound-only=true' <DM>
        outbound-transaction-parameters -a = 'propagate=yes' <DM>
        outbound-cof-parameters -a = NULL <DM>
        cluster-role = off <DM>
        proxy-name = NULL <DM>
  AgentLogin array 
    [167] login-id = '1801' state = enabled 
    [168] login-id = '1802' state = enabled 
    [169] login-id = '1803' state = enabled 
    [170] login-id = '1804' state = enabled 
    [171] login-id = '1805' state = enabled 
    [172] login-id = '1806' state = enabled 
    [173] login-id = '1807' state = enabled 
    [174] login-id = '1808' state = enabled 
    [175] login-id = '1809' state = enabled 
    [176] login-id = '1810' state = enabled 
  DN array 
    8001 [199] dn = '8001' type = Extension xtype = DN cfgtype = 1 sstype = 1 reg-mode = 0x21 = +force register-flag = true 
    8002 [200] dn = '8002' type = Extension xtype = DN cfgtype = 1 sstype = 1 reg-mode = 0x21 = +force register-flag = true 
    8003 [201] dn = '8003' type = Extension xtype = DN cfgtype = 1 sstype = 1 reg-mode = 0x21 = +force register-flag = true 
    8004 [202] dn = '8004' type = Extension xtype = DN cfgtype = 1 sstype = 1 reg-mode = 0x21 = +force register-flag = true 
    8005 [203] dn = '8005' type = Extension xtype = DN cfgtype = 1 sstype = 1 reg-mode = 0x21 = +force register-flag = true 
    8006 [204] dn = '8006' type = Extension xtype = DN cfgtype = 1 sstype = 1 reg-mode = 0x21 = +force register-flag = true 
    8007 [205] dn = '8007' type = Extension xtype = DN cfgtype = 1 sstype = 1 reg-mode = 0x21 = +force register-flag = true 
    8008 [206] dn = '8008' type = Extension xtype = DN cfgtype = 1 sstype = 1 reg-mode = 0x21 = +force register-flag = true 
    8009 [207] dn = '8009' type = Extension xtype = DN cfgtype = 1 sstype = 1 reg-mode = 0x21 = +force register-flag = true 
    8010 [208] dn = '8010' type = Extension xtype = DN cfgtype = 1 sstype = 1 reg-mode = 0x21 = +force register-flag = true 
    8011 [209] dn = '8011' type = Extension xtype = DN cfgtype = 1 sstype = 1 reg-mode = 0x21 = +force register-flag = true 
    8801 [212] dn = '8801' type = ACDQ xtype = Queue cfgtype = 3 sstype = 1 register-flag = true 
    8802 [213] dn = '8802' type = ACDQ xtype = Queue cfgtype = 3 sstype = 1 register-flag = true 
    SIP_to_Avaya [218] dn = 'SIP_to_Avaya' type = TRUNK xtype = Trunk cfgtype = 14 sstype = 1 ext = '6' register-flag = true 
  DN/EXR array 
    8881 [214] *cdn = '8881' type = RtQueue xtype = RouteDN cfgtype = 19 sstype = 1 auxdata = '8881' 
      access-list array 
        [107] location = 'sc_server_p' number = '8881' source = 1 
        [120] location = 'ReportingStatServer' number = '8881' source = 1 
      linked-resources array register-flag = true 
    8882 [215] *cdn = '8882' type = RtQueue xtype = RouteDN cfgtype = 19 sstype = 1 auxdata = '8882' 
      access-list array 
        [107] location = 'sc_server_p' number = '8882' source = 1 
        [120] location = 'ReportingStatServer' number = '8882' source = 1 
      linked-resources array register-flag = true 
    8883 [222] cdn = '8883' type = RtQueue xtype = RouteDN cfgtype = 19 sstype = 1 ext = '8' override = '8883' reg-mode = 0x11 = +force 
      access-list array 
        [105] location = 'AvayaSwitch' number = '8' source = 2 
      linked-resources array register-flag = true 
    [-1] cdn = 'direct' type = N/A reg-mode = 0x0 = 
      access-list array 
        [107] location = 'sc_server_p' source = 1 
        [120] location = 'ReportingStatServer' source = 1 
      linked-resources array 
@11:26:56.1210 [TCONF] Location updated:
sc_server_p [107] list {aux}  <+M>
  @location -a = 'sc_server_p'
  backup-type = not-specified <+DM>
  state = enabled
  protocol = 'default' <D>
  addp-timeout = 0 <D>
  addp-remote-timeout = 0 <D>
  addp-trace = 'off' <D>
  app-type = 43
  access-code -a = NULL <D>
  backup-for = NULL <DM>
  primary-for = NULL <DM>
  options list  <DM>
    reconnect-tout = '5 sec' <DM>
    cast-type = 'route direct-callid reroute direct-uui direct-ani direct-notoken dnis-pool direct-digits pullback route-uui direct-network-callid' <DM>
    timeout = '60 sec' <DM>
    request-tout = '20 sec' <DM>
    default-dn = NULL <DM>
  extrouter list  <DM>
    default-cast-type -a = default <DM>
    backward-cast-type -a = route <DM>
    inbound-transaction-parameters -a = NULL <DM>
    inbound-cof-parameters -a = 'match-callid, match-flexible=true, inbound-only=true' <DM>
    outbound-transaction-parameters -a = 'propagate=yes' <DM>
    outbound-cof-parameters -a = NULL <DM>
    cluster-role = off <DM>
    proxy-name = NULL <DM>
@11:26:56.1210 [ISCC] (server-configuration (application-name AvayaTserver_p) (dbid 119) (change))
addp-trace off
(addp_reconfig) local 100000 msec, remote 100000 msec, trace off
@11:26:56.1210 [ISCC] Location AvayaSwitch: available cast types (route direct-callid reroute direct-uui direct-ani direct-notoken dnis-pool direct-digits pullback route-uui direct-network-callid)
@11:26:56.1210 [ISCC] Location AvayaSwitch: default cast type route
@11:26:56.1210 [ISCC] Location AvayaSwitch: default-dn 
@11:26:56.1210 [ISCC] Inbound Transaction parameters: NULL
@11:26:56.1210 [ISCC] Outbound Transaction parameters: ("propagate"="yes")
@11:26:56.1210 [ISCC] Inbound COF parameters: ("match-callid","match-flexible"="true","inbound-only"="true")
@11:26:56.1210 [ISCC] Outbound COF parameters: NULL
@11:26:56.1210 [ISCC] Location AvayaSwitch: dnis-tail 0
@11:26:56.1210 [ISCC] Location AvayaSwitch: Propagation Control (+udata, +party)
@11:26:56.1210 [ISCC] Location AvayaSwitch: COF: match-flexible(1) 
@11:26:56.1210 [ISCC] Location AvayaSwitch: COF: match-callid(1) 1
@11:26:56.1210 [ISCC] Location AvayaSwitch: COF: match-ani(0) 0
@11:26:56.1210 [ISCC] Location AvayaSwitch: COF: inbound-only true
@11:26:56.1210 [ISCC] (server-configuration (application-name AvayaTserver_p) (dbid 119) (change complete))
@11:26:56.1210 [TCONF] Location updated:
AvayaTserver_p [119] list {aux}  <+M>
  @location -a = 'AvayaSwitch'
  backup-type = not-specified <DM>
  state = enabled
  protocol = 'addp'
  addp-timeout = 100
  addp-remote-timeout = 100
  addp-trace = 'off' <+D>
  app-type = 1
  access-code -a = '-N/A-'
  backup-for = NULL <DM>
  primary-for = NULL <DM>
  options list  <M>
    reconnect-tout = '5 sec' <DM>
    cast-type = 'route direct-callid reroute direct-uui direct-ani direct-notoken dnis-pool direct-digits pullback route-uui direct-network-callid' <DM>
    timeout = '1 min'
    request-tout = '20 sec' <DM>
    default-dn = NULL <DM>
  extrouter list  <M>
    default-cast-type -a = route
    backward-cast-type -a = (undef)
    inbound-transaction-parameters -a = NULL <D>
    inbound-cof-parameters -a = 'match-callid, match-flexible=true, inbound-only=true' <D>
    outbound-transaction-parameters -a = 'propagate=yes' <D>
    outbound-cof-parameters -a = NULL <D>
    cluster-role = off <DM>
    proxy-name = NULL <DM>
@11:26:56.1210 [TCONF] Location updated:
ReportingStatServer [120] list {aux}  <+M>
  @location -a = 'ReportingStatServer'
  backup-type = not-specified <+DM>
  state = enabled
  protocol = 'default' <D>
  addp-timeout = 0 <D>
  addp-remote-timeout = 0 <D>
  addp-trace = 'off' <D>
  app-type = 2
  access-code -a = NULL <D>
  backup-for = NULL <DM>
  primary-for = NULL <DM>
  options list  <DM>
    reconnect-tout = '5 sec' <DM>
    cast-type = 'route direct-callid reroute direct-uui direct-ani direct-notoken dnis-pool direct-digits pullback route-uui direct-network-callid' <DM>
    timeout = '60 sec' <DM>
    request-tout = '20 sec' <DM>
    default-dn = NULL <DM>
  extrouter list  <DM>
    default-cast-type -a = default <DM>
    backward-cast-type -a = route <DM>
    inbound-transaction-parameters -a = NULL <DM>
    inbound-cof-parameters -a = 'match-callid, match-flexible=true, inbound-only=true' <DM>
    outbound-transaction-parameters -a = 'propagate=yes' <DM>
    outbound-cof-parameters -a = NULL <DM>
    cluster-role = off <DM>
    proxy-name = NULL <DM>
@11:26:56.1210 [TCONF] READER: status: [3]->[3]
@11:26:56.1210 [TCONF] READER: status: [3]->[3]
11:26:56.121  -- AgnEmu: parameter login state taken from global value
11:26:56.121  -- AgnEmu: parameter wrap-up-time taken from global option
11:26:56.121  -- AgnEmu: parameter legal-guard-time taken from global option
-AR[t/o:100000,trace]-<-532 @11:26:56.1210
-Ar[t/o:100000]->-532 @11:26:56.1210
-Ar[t/o:100000]-<-532 @11:26:56.1210
common: ConnTimerQueue option 'conn-timers-warning-processing-timeout' is set to the value '300' milliseconds
common: ConnTimerQueue option 'conn-timers-maximum-processing-timeout' is set to the value '1000' milliseconds
common: ConnTimerQueue option 'conn-timers-break-processing-loop' is set to the value 'false'
common: ConnTimerQueue option 'conn-timers-enable-extended-processing' is set to the value 'false'
11:27:31.775: $+NET:SIP::0:0
11:27:31.775: SIPTR: Received [0,UDP] 871 bytes from 10.191.45.70:40408 <<<<<
INVITE sip:66001@10.191.45.72:5060 SIP/2.0
Via: SIP/2.0/UDP 10.191.45.70:40408;branch=z9hG4bK-d87543-4d0c3460ba005469-1--d87543-;rport
Max-Forwards: 70
Contact: <sip:8003@10.191.45.70:40408>
To: "66001"<sip:66001@10.191.45.72:5060>
From: "8003"<sip:8003@10.191.45.72:5060>;tag=d916d51c
Call-ID: NGJmNjM5YjhmMDc1MzYyODA1ZTVkYTc5ZDU0YWZhYjU.
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Content-Type: application/sdp
User-Agent: X-Lite release 1006e stamp 34025
Content-Length: 325
v=0
o=- 5 2 IN IP4 10.191.45.70
s=CounterPath X-Lite 3.0
c=IN IP4 10.191.45.70
t=0 0
m=audio 47810 RTP/AVP 107 119 0 98 8 3 101
a=alt:1 1 : 41GjunOz 1Cv06Aqn 10.191.45.70 47810
a=fmtp:101 0-15
a=rtpmap:107 BV32/16000
a=rtpmap:119 BV32-FEC/16000
a=rtpmap:98 iLBC/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv
11:27:31.775: CallMatcher: no call match attributes found
11:27:31.775: ResolveCallInfo: set flag DIAL_PLAN_PROCESSING
11:27:31.775: SIPTR(46): Begin step 0 - SipTransactionCreateCall(47)
11:27:31.775 SIPCONN(8003): Create dialog
11:27:31.775: SipDialog: set monitor 037e24bc
11:27:31.775 SIPCONN(8003): refer dialog 037dbab8 initiated
11:27:31.775 SIPCONN(8003): change transaction 0 -> 0
11:27:31.775: SipDialog: set monitor 037e24bc
11:27:31.775 SIPCONN(8003): ClrMediaPeer
11:27:31.775: SIPDLG[15]: register TRN[15]
11:27:31.775: SIPDLG[15]: TRN[15] flags set to 0x1
11:27:31.775: SipDialog: event INVITE, t=15, s=1, r=5, m=037e24bc
11:27:31.775 SIPCONN(8003): HandleSipDialogEvent(INVITE)
11:27:31.775 SIPCONN(8003): Capabilities 19d
11:27:31.775 SIPCONN(8003): new transaction
11:27:31.775 SIPCONN(8003): store remote content
11:27:31.775 SIPCONN(8003): verify sdp
11:27:31.775 SIPCONN(8003): sdp state SDP_STATE_NULL, event SDP_EVENT_SDP
11:27:31.775 SIPCONN(8003): new sdp state SDP_STATE_OFFER_RECEIVED, event SDP_EVENT_SDP
11:27:31.775 SIPCONN(8003): state e:10,p:0,s:1,c:9,rc:0,m:0
11:27:31.775: SIPTR(47): complete
11:27:31.775: SIPTR(46): Step 0 - SipTransactionCreateCall(47) complete
11:27:31.775: SIPTR(46): Begin step 1 - SipTransactionResolveCallInfoByDialPlan(48)
11:27:31.775: DialPlan: No dialplan defined for 8003.
11:27:31.775: DialPlan: No rule applied, using original destination '66001'.
11:27:31.775: DialPlan: clear flag DIAL_PLAN_PROCESSING
11:27:31.775: Number:[66001] is not internal, looking for service
11:27:31.775: GetTheBestNode: no eligible service found for 66001
11:27:31.775: Number:66001 prefix: gateway list not empty, but none can be selected now
11:27:31.775: Unable to resolve number for DN:66001
11:27:31.775: SIPDM: failed to get registration info for 66001
11:27:31.775: SIPDM: failed to get registration info for 66001
11:27:31.775: Call connect failed with error WRONG_NUMBER, no DialPlan script condition - rejecting call.
11:27:31.775: SIPTR(48): complete
11:27:31.775: SIPTR(46): Step 1 - SipTransactionResolveCallInfoByDialPlan(48) complete
11:27:31.775: SIPTR(46): Begin step 2 - SipTransactionRejectCall(49)
11:27:31.775 SIPCONN(8003): re-invite-called-initiated
11:27:31.775: Sending  [0,UDP] 371 bytes to 10.191.45.70:40408 >>>>>
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 10.191.45.70:40408;branch=z9hG4bK-d87543-4d0c3460ba005469-1--d87543-;rport;received=10.191.45.70
To: "66001"<sip:66001@10.191.45.72:5060>;tag=2FE171E2-AA20-4303-89D2-51854ABDC831-13
From: "8003"<sip:8003@10.191.45.72:5060>;tag=d916d51c
Call-ID: NGJmNjM5YjhmMDc1MzYyODA1ZTVkYTc5ZDU0YWZhYjU.
CSeq: 1 INVITE
Content-Length: 0