DID provider not respecting 'Contact' string

Discussions about using SIP Sorcery on your own computer/server
Post Reply
dig12345
Posts: 17
Joined: Thu Aug 05, 2010 8:01 pm

DID provider not respecting 'Contact' string

Post by dig12345 » Tue Oct 26, 2010 2:42 am

I'm trying to use a free did provider (called sipconnect) with my local sipsorcery install . Sipsorcery is registering with the sip provider but incoming call's do not ring.
After much snooping, I believe I've discovered the problem but don't know if there is a solution. Using wireshark I can see that when the INVITE packets come in from the provider, they are not respecting the Contact tag sent out by sipsorcery. They basically just use my freedid_username@sipsorcery_IP_address as the contact. Sipsorcery responds with 'not found' and the call drops. Shucks.
Here is the conversation from wireshark. (names changed to protect the innocent)

REGISTER sip:sipconnect.ipcomms.net SIP/2.0
Via: SIP/2.0/UDP 99.30.XXX.XX:5060;branch=z9hG4bK2bd7041570b84f5e8d5c7dbd0c7dbeb3;rport
To: <sip:321XXXXX@sipconnect.ipcomms.net>
From: <sip:321XXXXX@sipconnect.ipcomms.net>;tag=1559957682
Call-ID: e573f69a-78dc-4df2-922a-cf44f3df1cec
CSeq: 8 REGISTER
Contact: <sip:cooldude@mydomain.net;rinstance=717918>
Max-Forwards: 69
User-Agent: http://www.sipsorcery.com
Expires: 0
Content-Length: 0

LATER WHEN CALL COMES IN........


INVITE sip:3215495999@99.30.200.33 SIP/2.0
Via: SIP/2.0/UDP 64.154.41.150:5060;branch=z9hG4bK453bd2b1;rport
Max-Forwards: 70
From: "718XXXXXXX" <sip:718XXXXXXX@64.154.41.150>;tag=as42f00e8c
To: <sip:321XXXXXX@99.30.XXX.XXX>
Contact: <sip:718XXXXXXX@64.154.41.150>
Call-ID: 7569cc9f4eb2f3ed7044a3db52b8fb13@64.154.41.150
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.2.13
Date: Tue, 26 Oct 2010 02:22:54 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 331
v=0
o=root 116854138 116854138 IN IP4 64.154.41.150
s=Asterisk PBX 1.6.2.13
c=IN IP4 64.154.41.150
t=0 0
m=audio 10600 RTP/AVP 0 8 3 18 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

SIPSORCERY RESPONDS:


SIP/2.0 100 Trying
Via: SIP/2.0/UDP 64.154.41.150:5060;branch=z9hG4bK453bd2b1;rport=5060;received=64.154.41.150
To: <sip:321XXXXX@99.30.XXX.XX>
From: "718XXXXXX" <sip:7184145923@64.154.41.150>;tag=as42f00e8c
Call-ID: 7569cc9f4eb2f3ed7044a3db52b8fb13@64.154.41.150
CSeq: 102 INVITE
Content-Length: 0


SIP/2.0 404 NotFound
Via: SIP/2.0/UDP 64.154.41.150:5060;branch=z9hG4bK453bd2b1;rport=5060;received=64.154.41.150
To: <sip:321XXXXXX@99.30.XXX.XX>
From: "718XXXXXXX" <sip:718XXXXXX@64.154.41.150>;tag=as42f00e8c
Call-ID: 7569cc9f4eb2f3ed7044a3db52b8fb13@64.154.41.150
CSeq: 102 INVITE
Content-Length: 0
I tried adding the IP to <domain alias> but does not help, probably because of the username.
Is there a way to make sipsorcery recognize that contact string? Thanks!

Aaron
Site Admin
Posts: 4652
Joined: Thu Jul 12, 2007 12:13 am

Re: DID provider not respecting 'Contact' string

Post by Aaron » Tue Oct 26, 2010 3:50 am

That's not an uncommon situation a lot of providers operate like that.

As well as adding the alias which you have already done you'll also need to add a new SIP account with a username which matches the one your SIP provider is sending which is almost always the username you use with the provider.

dig12345
Posts: 17
Joined: Thu Aug 05, 2010 8:01 pm

Re: DID provider not respecting 'Contact' string

Post by dig12345 » Tue Oct 26, 2010 5:24 pm

Ah, that makes sense. But now I have a new issue. I tried adding another sip account to the username account from the gui but the 'sip domain' doesn't populate for some reason and it won't let me continue so I added it manually in the XML file. Now I'm getting errors during dial plan execution:
DialPlan 17:19:19:717: Attempting to locate a provider for call leg: sip:dig1234@local.
DialPlan 17:19:19:717: ForkCall commencing call leg to sip:dig1234@local.
DialPlan 17:19:19:717: Switching to sip:dig1234@local:5060 via udp:127.0.0.1:5060.
DialPlan 17:19:19:717: SDP on UAC call had public IP not mangled, RTP socket 64.154.41.150:18852.
DialPlan 17:19:19:757: Response 604 Host local unresolvable for sip:dig1234@local.
DialPlan 17:19:19:957: Dial plan execution completed without answering and a last failure status of DoesNotExistAnywhere Host local unresolvable.
DialPlan 17:19:19:957: UAS call failed with a response status of 604 and Host local unresolvable.

What am I doing wrong?

Aaron
Site Admin
Posts: 4652
Joined: Thu Jul 12, 2007 12:13 am

Re: DID provider not respecting 'Contact' string

Post by Aaron » Tue Oct 26, 2010 9:56 pm

If you are going ot use a host of "local" in your dialplan you need to make sure you've set it as an alias to one of your sipdomains.

Post Reply