Asterisk DID Number Incoming Call not working
I am new to asterisk. I can make outbound calls. But problem in incoming calls.
When i make call to my did number nothing happen in asterisk. I forward the port 5060 to asterisk installed system and port 5060 is open. 

    My sip.conf
    
    [general]
    
    bindport = 5060
    bindaddr = 0.0.0.0
    externip = 59.99.239.180
    tcpbindaddr = 0.0.0.0
    udpbindadr=0.0.0.0
    tcpenable = yes
    srvlookup = yes
    localnet=192.168.1.50/255.255.255.0
    
    register => 88812XXXXX:XXXXXXX@sip.pennytel.com/88812XXXXX
    
    
    
    [Lismore-sip-account]
    defaultuser=88812XXXXX
    type=peer
    secret=XXXXX
    qualify=yes
    host=sip.pennytel.com
    port=5060
    disallow=all
    allow=ulaw
    allow=alaw
    allow=g729
    fromuser=88812XXXXX
    fromdomain=sip.pennytel.com
    canreinvite=no
    canredirect=no
    context=from-voip-provider
    insecure=invite
    nat=yes
    
    [2001]
    callerid=2001
    type=friend
    context=my-phones
    secret=XXXXX
    host=dynamic
    disallow=all
    allow=ulaw
    allow=alaw
    allow=g729
    
    
    When i enable sip debug i get this
    
    vserve-Ubuntu*CLI> sip set debug on
    SIP Debugging enabled
    
    <--- SIP read from UDP:192.168.1.6:3359 --->
    
    
    <------------->
    Really destroying SIP dialog 'NmJkYjYxZjVmMzQ1ZjdiZTE3YzljNTZkZmYxYTdkODk.' Method: REGISTER
    Really destroying SIP dialog '35ab62ef594f14681d549922712c02db@127.0.1.1' Method: REGISTER
    Reliably Transmitting (NAT) to 202.85.243.105:5060:
    OPTIONS sip:sip.pennytel.com SIP/2.0
    Via: SIP/2.0/UDP 59.99.239.180:5060;branch=z9hG4bK6ccb1448;rport
    Max-Forwards: 70
    From: "asterisk" <sip:8881213187@59.99.239.180>;tag=as4da6df69
    To: <sip:sip.pennytel.com>
    Contact: <sip:8881213187@59.99.239.180:5060>
    Call-ID: 670571e3791f977833284df2164116df@59.99.239.180:5060
    CSeq: 102 OPTIONS
    User-Agent: Asterisk PBX 10.2.1
    Date: Thu, 10 May 2012 07:00:46 GMT
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
    Supported: replaces, timer
    Content-Length: 0
    
    
    ---
    
    <--- SIP read from UDP:202.85.243.105:5060 --->
    SIP/2.0 501 Unsupported Method
    Via: SIP/2.0/UDP 59.99.239.180:5060;branch=z9hG4bK6ccb1448;rport=5060
    To: <sip:sip.pennytel.com>;tag=3979cc58
    From: "asterisk" <sip:8881213187@59.99.239.180>;tag=as4da6df69
    Call-ID: 670571e3791f977833284df2164116df@59.99.239.180:5060
    CSeq: 102 OPTIONS
    Content-Length: 0
    
    <------------->
    --- (7 headers 0 lines) ---
    Really destroying SIP dialog '670571e3791f977833284df2164116df@59.99.239.180:5060' Method: OPTIONS
    
    <--- SIP read from UDP:192.168.1.6:3359 --->
    
    
    <------------->
    
    <--- SIP read from UDP:192.168.1.6:3359 --->
    
    
    <------------->
    
    <--- SIP read from UDP:192.168.1.6:3359 --->
    REGISTER sip:192.168.1.50:5060 SIP/2.0
    Via: SIP/2.0/UDP 192.168.1.6:3359;branch=z9hG4bK-d8754z-fd534d71c961a230-1---d8754z-;rport
    Max-Forwards: 70
    Contact: <sip:2001@192.168.1.6:3359;rinstance=c7716597dc067da8>
    To: <sip:2001@192.168.1.50:5060>
    From: <sip:2001@192.168.1.50:5060>;tag=92482017
    Call-ID: NmJkYjYxZjVmMzQ1ZjdiZTE3YzljNTZkZmYxYTdkODk.
    CSeq: 161 REGISTER
    Expires: 120
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, INFO, MESSAGE
    Supported: replaces
    User-Agent: 3CXPhone 4.0.13527.0
    Authorization: Digest username="2001",realm="asterisk",nonce="203005b0",uri="sip:192.168.1.50:5060",response="be93511a0504ad498fff1f10db37f4da",algorithm=MD5
    Content-Length: 0
    
    <------------->
    --- (14 headers 0 lines) ---
    Sending to 192.168.1.6:3359 (NAT)
    
    <--- Transmitting (NAT) to 192.168.1.6:3359 --->
    SIP/2.0 401 Unauthorized
    Via: SIP/2.0/UDP 192.168.1.6:3359;branch=z9hG4bK-d8754z-fd534d71c961a230-1---d8754z-;received=192.168.1.6;rport=3359
    From: <sip:2001@192.168.1.50:5060>;tag=92482017
    To: <sip:2001@192.168.1.50:5060>;tag=as485e2a75
    Call-ID: NmJkYjYxZjVmMzQ1ZjdiZTE3YzljNTZkZmYxYTdkODk.
    CSeq: 161 REGISTER
    Server: Asterisk PBX 10.2.1
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
    Supported: replaces, timer
    WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="6dfb5c28"
    Content-Length: 0
    
    
    <------------>
    Scheduling destruction of SIP dialog 'NmJkYjYxZjVmMzQ1ZjdiZTE3YzljNTZkZmYxYTdkODk.' in 32000 ms (Method: REGISTER)
    
    <--- SIP read from UDP:192.168.1.6:3359 --->
    REGISTER sip:192.168.1.50:5060 SIP/2.0
    Via: SIP/2.0/UDP 192.168.1.6:3359;branch=z9hG4bK-d8754z-756f833987682d5a-1---d8754z-;rport
    Max-Forwards: 70
    Contact: <sip:2001@192.168.1.6:3359;rinstance=c7716597dc067da8>
    To: <sip:2001@192.168.1.50:5060>
    From: <sip:2001@192.168.1.50:5060>;tag=92482017
    Call-ID: NmJkYjYxZjVmMzQ1ZjdiZTE3YzljNTZkZmYxYTdkODk.
    CSeq: 162 REGISTER
    Expires: 120
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, INFO, MESSAGE
    Supported: replaces
    User-Agent: 3CXPhone 4.0.13527.0
    Authorization: Digest username="2001",realm="asterisk",nonce="6dfb5c28",uri="sip:192.168.1.50:5060",response="40da0bcbb11bf13361b352a3ee88becb",algorithm=MD5
    Content-Length: 0
    
    <------------->
    --- (14 headers 0 lines) ---
    Sending to 192.168.1.6:3359 (NAT)
    
    <--- Transmitting (NAT) to 192.168.1.6:3359 --->
    SIP/2.0 200 OK
    Via: SIP/2.0/UDP 192.168.1.6:3359;branch=z9hG4bK-d8754z-756f833987682d5a-1---d8754z-;received=192.168.1.6;rport=3359
    From: <sip:2001@192.168.1.50:5060>;tag=92482017
    To: <sip:2001@192.168.1.50:5060>;tag=as485e2a75
    Call-ID: NmJkYjYxZjVmMzQ1ZjdiZTE3YzljNTZkZmYxYTdkODk.
    CSeq: 162 REGISTER
    Server: Asterisk PBX 10.2.1
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
    Supported: replaces, timer
    Expires: 120
    Contact: <sip:2001@192.168.1.6:3359;rinstance=c7716597dc067da8>;expires=120
    Date: Thu, 10 May 2012 07:01:35 GMT
    Content-Length: 0
    
    
    <------------>
    Scheduling destruction of SIP dialog 'NmJkYjYxZjVmMzQ1ZjdiZTE3YzljNTZkZmYxYTdkODk.' in 32000 ms (Method: REGISTER)
    Reliably Transmitting (NAT) to 202.85.243.105:5060:
    OPTIONS sip:sip.pennytel.com SIP/2.0
    Via: SIP/2.0/UDP 59.99.239.180:5060;branch=z9hG4bK00291324;rport
    Max-Forwards: 70
    From: "asterisk" <sip:8881213187@59.99.239.180>;tag=as363eed8d
    To: <sip:sip.pennytel.com>
    Contact: <sip:8881213187@59.99.239.180:5060>
    Call-ID: 1fecf37919f773cf1fd344b435828941@59.99.239.180:5060
    CSeq: 102 OPTIONS
    User-Agent: Asterisk PBX 10.2.1
    Date: Thu, 10 May 2012 07:01:47 GMT
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
    Supported: replaces, timer
    Content-Length: 0
    
    
    ---
    
    <--- SIP read from UDP:202.85.243.105:5060 --->
    SIP/2.0 501 Unsupported Method
    Via: SIP/2.0/UDP 59.99.239.180:5060;branch=z9hG4bK00291324;rport=5060
    To: <sip:sip.pennytel.com>;tag=7c264a1c
    From: "asterisk" <sip:8881213187@59.99.239.180>;tag=as363eed8d
    Call-ID: 1fecf37919f773cf1fd344b435828941@59.99.239.180:5060
    CSeq: 102 OPTIONS
    Content-Length: 0
    
    <------------->
    --- (7 headers 0 lines) ---
    Really destroying SIP dialog '1fecf37919f773cf1fd344b435828941@59.99.239.180:5060' Method: OPTIONS
    
    <--- SIP read from UDP:192.168.1.6:3359 --->
    
    
    <------------->
    Really destroying SIP dialog 'NmJkYjYxZjVmMzQ1ZjdiZTE3YzljNTZkZmYxYTdkODk.' Method: REGISTER
    
    <--- SIP read from UDP:192.168.1.6:3359 --->
    
    
    <------------->



Asterisk DID Number Incoming Call not working
===

I am new to asterisk. I can make outbound calls. But problem in incoming calls.
When i make call to my did number nothing happen in asterisk. I forward the port 5060 to asterisk installed system and port 5060 is open. 

    My sip.conf
    
    [general]
    
    bindport = 5060
    bindaddr = 0.0.0.0
    externip = 59.99.239.180
    tcpbindaddr = 0.0.0.0
    udpbindadr=0.0.0.0
    tcpenable = yes
    srvlookup = yes
    localnet=192.168.1.50/255.255.255.0
    
    register => 88812XXXXX:XXXXXXX@sip.pennytel.com/88812XXXXX
    
    
    
    [Lismore-sip-account]
    defaultuser=88812XXXXX
    type=peer
    secret=XXXXX
    qualify=yes
    host=sip.pennytel.com
    port=5060
    disallow=all
    allow=ulaw
    allow=alaw
    allow=g729
    fromuser=88812XXXXX
    fromdomain=sip.pennytel.com
    canreinvite=no
    canredirect=no
    context=from-voip-provider
    insecure=invite
    nat=yes
    
    [2001]
    callerid=2001
    type=friend
    context=my-phones
    secret=XXXXX
    host=dynamic
    disallow=all
    allow=ulaw
    allow=alaw
    allow=g729
    
    
    When i enable sip debug i get this
    
    vserve-Ubuntu*CLI> sip set debug on
    SIP Debugging enabled
    
    <--- SIP read from UDP:192.168.1.6:3359 --->
    
    
    <------------->
    Really destroying SIP dialog 'NmJkYjYxZjVmMzQ1ZjdiZTE3YzljNTZkZmYxYTdkODk.' Method: REGISTER
    Really destroying SIP dialog '35ab62ef594f14681d549922712c02db@127.0.1.1' Method: REGISTER
    Reliably Transmitting (NAT) to 202.85.243.105:5060:
    OPTIONS sip:sip.pennytel.com SIP/2.0
    Via: SIP/2.0/UDP 59.99.239.180:5060;branch=z9hG4bK6ccb1448;rport
    Max-Forwards: 70
    From: "asterisk" <sip:8881213187@59.99.239.180>;tag=as4da6df69
    To: <sip:sip.pennytel.com>
    Contact: <sip:8881213187@59.99.239.180:5060>
    Call-ID: 670571e3791f977833284df2164116df@59.99.239.180:5060
    CSeq: 102 OPTIONS
    User-Agent: Asterisk PBX 10.2.1
    Date: Thu, 10 May 2012 07:00:46 GMT
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
    Supported: replaces, timer
    Content-Length: 0
    
    
    ---
    
    <--- SIP read from UDP:202.85.243.105:5060 --->
    SIP/2.0 501 Unsupported Method
    Via: SIP/2.0/UDP 59.99.239.180:5060;branch=z9hG4bK6ccb1448;rport=5060
    To: <sip:sip.pennytel.com>;tag=3979cc58
    From: "asterisk" <sip:8881213187@59.99.239.180>;tag=as4da6df69
    Call-ID: 670571e3791f977833284df2164116df@59.99.239.180:5060
    CSeq: 102 OPTIONS
    Content-Length: 0
    
    <------------->
    --- (7 headers 0 lines) ---
    Really destroying SIP dialog '670571e3791f977833284df2164116df@59.99.239.180:5060' Method: OPTIONS
    
    <--- SIP read from UDP:192.168.1.6:3359 --->
    
    
    <------------->
    
    <--- SIP read from UDP:192.168.1.6:3359 --->
    
    
    <------------->
    
    <--- SIP read from UDP:192.168.1.6:3359 --->
    REGISTER sip:192.168.1.50:5060 SIP/2.0
    Via: SIP/2.0/UDP 192.168.1.6:3359;branch=z9hG4bK-d8754z-fd534d71c961a230-1---d8754z-;rport
    Max-Forwards: 70
    Contact: <sip:2001@192.168.1.6:3359;rinstance=c7716597dc067da8>
    To: <sip:2001@192.168.1.50:5060>
    From: <sip:2001@192.168.1.50:5060>;tag=92482017
    Call-ID: NmJkYjYxZjVmMzQ1ZjdiZTE3YzljNTZkZmYxYTdkODk.
    CSeq: 161 REGISTER
    Expires: 120
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, INFO, MESSAGE
    Supported: replaces
    User-Agent: 3CXPhone 4.0.13527.0
    Authorization: Digest username="2001",realm="asterisk",nonce="203005b0",uri="sip:192.168.1.50:5060",response="be93511a0504ad498fff1f10db37f4da",algorithm=MD5
    Content-Length: 0
    
    <------------->
    --- (14 headers 0 lines) ---
    Sending to 192.168.1.6:3359 (NAT)
    
    <--- Transmitting (NAT) to 192.168.1.6:3359 --->
    SIP/2.0 401 Unauthorized
    Via: SIP/2.0/UDP 192.168.1.6:3359;branch=z9hG4bK-d8754z-fd534d71c961a230-1---d8754z-;received=192.168.1.6;rport=3359
    From: <sip:2001@192.168.1.50:5060>;tag=92482017
    To: <sip:2001@192.168.1.50:5060>;tag=as485e2a75
    Call-ID: NmJkYjYxZjVmMzQ1ZjdiZTE3YzljNTZkZmYxYTdkODk.
    CSeq: 161 REGISTER
    Server: Asterisk PBX 10.2.1
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
    Supported: replaces, timer
    WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="6dfb5c28"
    Content-Length: 0
    
    
    <------------>
    Scheduling destruction of SIP dialog 'NmJkYjYxZjVmMzQ1ZjdiZTE3YzljNTZkZmYxYTdkODk.' in 32000 ms (Method: REGISTER)
    
    <--- SIP read from UDP:192.168.1.6:3359 --->
    REGISTER sip:192.168.1.50:5060 SIP/2.0
    Via: SIP/2.0/UDP 192.168.1.6:3359;branch=z9hG4bK-d8754z-756f833987682d5a-1---d8754z-;rport
    Max-Forwards: 70
    Contact: <sip:2001@192.168.1.6:3359;rinstance=c7716597dc067da8>
    To: <sip:2001@192.168.1.50:5060>
    From: <sip:2001@192.168.1.50:5060>;tag=92482017
    Call-ID: NmJkYjYxZjVmMzQ1ZjdiZTE3YzljNTZkZmYxYTdkODk.
    CSeq: 162 REGISTER
    Expires: 120
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, INFO, MESSAGE
    Supported: replaces
    User-Agent: 3CXPhone 4.0.13527.0
    Authorization: Digest username="2001",realm="asterisk",nonce="6dfb5c28",uri="sip:192.168.1.50:5060",response="40da0bcbb11bf13361b352a3ee88becb",algorithm=MD5
    Content-Length: 0
    
    <------------->
    --- (14 headers 0 lines) ---
    Sending to 192.168.1.6:3359 (NAT)
    
    <--- Transmitting (NAT) to 192.168.1.6:3359 --->
    SIP/2.0 200 OK
    Via: SIP/2.0/UDP 192.168.1.6:3359;branch=z9hG4bK-d8754z-756f833987682d5a-1---d8754z-;received=192.168.1.6;rport=3359
    From: <sip:2001@192.168.1.50:5060>;tag=92482017
    To: <sip:2001@192.168.1.50:5060>;tag=as485e2a75
    Call-ID: NmJkYjYxZjVmMzQ1ZjdiZTE3YzljNTZkZmYxYTdkODk.
    CSeq: 162 REGISTER
    Server: Asterisk PBX 10.2.1
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
    Supported: replaces, timer
    Expires: 120
    Contact: <sip:2001@192.168.1.6:3359;rinstance=c7716597dc067da8>;expires=120
    Date: Thu, 10 May 2012 07:01:35 GMT
    Content-Length: 0
    
    
    <------------>
    Scheduling destruction of SIP dialog 'NmJkYjYxZjVmMzQ1ZjdiZTE3YzljNTZkZmYxYTdkODk.' in 32000 ms (Method: REGISTER)
    Reliably Transmitting (NAT) to 202.85.243.105:5060:
    OPTIONS sip:sip.pennytel.com SIP/2.0
    Via: SIP/2.0/UDP 59.99.239.180:5060;branch=z9hG4bK00291324;rport
    Max-Forwards: 70
    From: "asterisk" <sip:8881213187@59.99.239.180>;tag=as363eed8d
    To: <sip:sip.pennytel.com>
    Contact: <sip:8881213187@59.99.239.180:5060>
    Call-ID: 1fecf37919f773cf1fd344b435828941@59.99.239.180:5060
    CSeq: 102 OPTIONS
    User-Agent: Asterisk PBX 10.2.1
    Date: Thu, 10 May 2012 07:01:47 GMT
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
    Supported: replaces, timer
    Content-Length: 0
    
    
    ---
    
    <--- SIP read from UDP:202.85.243.105:5060 --->
    SIP/2.0 501 Unsupported Method
    Via: SIP/2.0/UDP 59.99.239.180:5060;branch=z9hG4bK00291324;rport=5060
    To: <sip:sip.pennytel.com>;tag=7c264a1c
    From: "asterisk" <sip:8881213187@59.99.239.180>;tag=as363eed8d
    Call-ID: 1fecf37919f773cf1fd344b435828941@59.99.239.180:5060
    CSeq: 102 OPTIONS
    Content-Length: 0
    
    <------------->
    --- (7 headers 0 lines) ---
    Really destroying SIP dialog '1fecf37919f773cf1fd344b435828941@59.99.239.180:5060' Method: OPTIONS
    
    <--- SIP read from UDP:192.168.1.6:3359 --->
    
    
    <------------->
    Really destroying SIP dialog 'NmJkYjYxZjVmMzQ1ZjdiZTE3YzljNTZkZmYxYTdkODk.' Method: REGISTER
    
    <--- SIP read from UDP:192.168.1.6:3359 --->
    
    
    <------------->


