Strange problem with multiple DIDs (only one working for incoming calls)

Hi all,

I’m having a strange problem with incoming calls. On the main DID (which is also a username used for registration), everything works fine. On the other DIDs, only outgoing calls work. I have looked into log files and I’ve found the message saying “received incoming sip connection from unknown peer to <DID)”. I’ve tried allowing anonymous peers for testing purposes and the phone started ringing, but when I try to answer that call, nothing happens, it just keeps ringing. So, I guess I have 2 separate problems, but I cannot seem to find a solution for neither of them.

This is the first time I’ve encountered something like this. What confuses me the most is that the main DID works perfectly.

My trunk config is as follows:

PEER Details:
disallow=all
username=myusername ;it’s a DID
type=peer
secret=mysecret
qualify=yes
nat=yes
insecure=port,invite
host=10.248.0.17
dtmfmode=rfc2833
canreinvite=no
allow=ulaw&alaw
context=custom-get-did

USER Details are exactly the same. Also, custom-get-did context looks like this:

[custom-get-did]
exten => s,1,Noop(Fixing DID using information from SIP TO header)
exten => s,n,Set(pseudodid=${SIP_HEADER(To)})
exten => s,n,Set(pseudodid=${CUT(pseudodid,>,1)})
exten => s,n,Set(pseudodid=${CUT(pseudodid,@,1)})
exten => s,n,Set(pseudodid=${CUT(pseudodid,:,2)})
exten => s,n,Goto(from-trunk,${pseudodid},1)

And here is a part of my log file:
<— SIP read from UDP:89.216.1.175:5061 —>
INVITE sip:[email protected]:5060;user=phone SIP/2.0
Via: SIP/2.0/UDP 89.216.1.175:5061;rport;branch=z9hG4bK-4100530100-3809576481-2897786272-618628975
From: sip:[email protected]:5061;user=phone;tag=1145839540-3809576481-2897786272-618628975
To: sip:[email protected]:5060;user=phone
Call-ID: [email protected]
CSeq: 1 INVITE
Contact: sip:[email protected]:5061;user=phone
Content-Type: application/sdp
Allow: ACK, BYE, CANCEL, INFO, INVITE, OPTIONS, REFER, REGISTER, UPDATE
Max-Forwards: 70
User-Agent: MERA MVTS3G v.4.4.0-22
Cisco-Guid: 3885596900-513211884-1116924182-963779546
Remote-Party-ID: sip:[email protected]:5061;user=phone;party=calling;privacy=off;screen=yes
Content-Length: 253

v=0
o=- 1379634818 1379634818 IN IP4 89.216.1.175
s=-
c=IN IP4 89.216.1.175
t=0 0
m=audio 26278 RTP/AVP 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=silenceSupp:off - - - -
<------------->
— (14 headers 12 lines) —
Sending to 89.216.1.175:5061 (NAT)
Using INVITE request as basis request - [email protected]
No matching peer for ‘38169xxx9956’ from ‘89.216.1.175:5061’
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
Found RTP audio format 8
Found RTP audio format 0
Found RTP audio format 101
Found audio description format PCMA for ID 8
Found audio description format PCMU for ID 0
Found audio description format telephone-event for ID 101
Capabilities: us - 0x100e (gsm|ulaw|alaw|g722), peer - audio=0xc (ulaw|alaw)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0xc (ulaw|alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 89.216.1.175:26278
Looking for 38111xxx0452 in from-sip-external (domain 192.168.170.211)
list_route: hop: sip:[email protected]:5061;user=phone

<— Transmitting (NAT) to 89.216.1.175:5061 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 89.216.1.175:5061;branch=z9hG4bK-4100530100-3809576481-2897786272-618628975;received=89.216.1.175;rport=5061
From: sip:[email protected]:5061;user=phone;tag=1145839540-3809576481-2897786272-618628975
To: sip:[email protected]:5060;user=phone
Call-ID: [email protected]
CSeq: 1 INVITE
Server: FPBX-2.10.0(1.8.23.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Contact: sip:[email protected]:5060
Content-Length: 0

<------------>
– Executing [[email protected]:1] NoOp(“SIP/89.216.1.175-0000b64a”, “Received incoming SIP connection from unknown peer to 38111xxx0452”) in new stack
– Executing [[email protected]:2] Set(“SIP/89.216.1.175-0000b64a”, “DID=38111xxx0452”) in new stack
– Executing [[email protected]:3] Goto(“SIP/89.216.1.175-0000b64a”, “s,1”) in new stack
– Goto (from-sip-external,s,1)
– Executing [[email protected]:1] GotoIf(“SIP/89.216.1.175-0000b64a”, “0?checklang:noanonymous”) in new stack
– Goto (from-sip-external,s,5)
– Executing [[email protected]:5] Set(“SIP/89.216.1.175-0000b64a”, “TIMEOUT(absolute)=15”) in new stack
Channel will hangup at 2013-09-20 01:54:10.113 CEST.
– Executing [[email protected]:6] Answer(“SIP/89.216.1.175-0000b64a”, “”) in new stack
Audio is at 11060
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x8 (alaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<— Reliably Transmitting (NAT) to 89.216.1.175:5061 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 89.216.1.175:5061;branch=z9hG4bK-4100530100-3809576481-2897786272-618628975;received=89.216.1.175;rport=5061
From: sip:[email protected]:5061;user=phone;tag=1145839540-3809576481-2897786272-618628975
To: sip:[email protected]:5060;user=phone;tag=as0d18e770
Call-ID: [email protected]
CSeq: 1 INVITE
Server: FPBX-2.10.0(1.8.23.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Contact: sip:[email protected]:5060
Content-Type: application/sdp
Content-Length: 263

Any help or idea would be greatly appreciated.

Thanks.

Sorry, something must have happened while posting and parts of my post got truncated. Here is the original text before log entry

Hi all,

I’m having a strange problem with incoming calls. On the main DID (which is also a username used for registration), everything works fine. On the other DIDs, only outgoing calls work. I have looked into log files and I’ve found the message saying “received incoming sip connection from unknown peer to <DID)”. I’ve tried allowing anonymous peers for testing purposes and the phone started ringing, but when I try to answer that call, nothing happens, it just keeps ringing. So, I guess I have 2 separate problems, but I cannot seem to find a solution for neither of them.

This is the first time I’ve encountered something like this. What confuses me the most is that the main DID works perfectly.

My trunk config is as follows:
PEER Details:
disallow=all
username=myusername ;it’s a DID
type=peer
secret=mysecret
qualify=yes
nat=yes
insecure=port,invite
host=10.248.0.17
dtmfmode=rfc2833
canreinvite=no
allow=ulaw&alaw
context=custom-get-did

USER Details are exactly the same. Also, custom-get-did context looks like this:

[custom-get-did]
exten => s,1,Noop(Fixing DID using information from SIP TO header)
exten => s,n,Set(pseudodid=${SIP_HEADER(To)})
exten => s,n,Set(pseudodid=${CUT(pseudodid,>,1)})
exten => s,n,Set(pseudodid=${CUT(pseudodid,@,1)})
exten => s,n,Set(pseudodid=${CUT(pseudodid,:,2)})
exten => s,n,Goto(from-trunk,${pseudodid},1)

Sorry, something must have happened while posting and parts of my post got truncated. Here is the original text before log entry

Hi all,

I’m having a strange problem with incoming calls. On the main DID (which is also a username used for registration), everything works fine. On the other DIDs, only outgoing calls work. I have looked into log files and I’ve found the message saying “received incoming sip connection from unknown peer to DID_Number”. I’ve tried allowing anonymous peers for testing purposes and the phone started ringing, but when I try to answer that call, nothing happens, it just keeps ringing. So, I guess I have 2 separate problems, but I cannot seem to find a solution for neither of them.

This is the first time I’ve encountered something like this. What confuses me the most is that the main DID works perfectly.

My trunk config is as follows:
PEER Details:
disallow=all
username=myusername ;it’s a DID
type=peer
secret=mysecret
qualify=yes
nat=yes
insecure=port,invite
host=10.248.0.17
dtmfmode=rfc2833
canreinvite=no
allow=ulaw&alaw
context=custom-get-did

USER Details are exactly the same. Also, custom-get-did context looks like this:

[custom-get-did]
exten => s,1,Noop(Fixing DID using information from SIP TO header)
exten => s,n,Set(pseudodid=${SIP_HEADER(To)})
exten => s,n,Set(pseudodid=${CUT(pseudodid,>,1)})
exten => s,n,Set(pseudodid=${CUT(pseudodid,@,1)})
exten => s,n,Set(pseudodid=${CUT(pseudodid,:,2)})
exten => s,n,Goto(from-trunk,${pseudodid},1)