July 22, 2018, 06:45:02 pm *
Welcome, Guest. Please login or register.
News:
 
   Forum Home   Search Login Register OBiTALK  
Pages: [1]
  Print  
Author Topic: Sending inbound calls from OBi202 to a Twilio SIP endpoint  (Read 2226 times)
abbv
Newbie
*
Posts: 1


« on: April 30, 2014, 07:16:56 pm »

Hello. I'm sending calls from my apartment building's intercom (which uses a copper wire phone line, that rings a phone in my apartment) to a Twilio SIP endpoint with an OBi202.

I'm able to route the calls when I use Twilio's IP Access Control List. I'm trying to get this to work using Twilio's Credential Lists authentication mechanism (https://www.twilio.com/docs/sip/sip-auth), which uses SIP digest authentication. I can't for the life of me figure out why I'm getting a 403 response. So far, Twilio hasn't been able to give me any insight into what's going on. I'm pasting the SIP logs below. Any insight into what's going on here would be greatly appreciated.

Here's a call that 403's using Twilio credential based authentication:

Code:
22:15:44.873919 IP 192.168.2.2.sip > ec2-107-21-231-147.compute-1.amazonaws.com.sip: SIP, length: 851
Eh.o..@.@.!.....k........[ hINVITE sip:0@doorbell.sip.twilio.com:5060 SIP/2.0
Call-ID: 3fd6d271@192.168.2.2
Content-Length: 308
CSeq: 8001 INVITE
From: <sip:zTest1234567890@doorbell.sip.twilio.com>;tag=SP1fbef378e5ff745c5
Max-Forwards: 70
To: <sip:0@doorbell.sip.twilio.com>
Via: SIP/2.0/UDP 192.168.2.2:5060;branch=z9hG4bK-7fbf5197;rport
User-Agent: OBIHAI/OBi202-3.0.1.4330
Contact: <sip:2bcf61d3cffeffa2@192.168.2.2:5060>
Expires: 60
Supported: replaces
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,PRACK,REFER,UPDATE
Content-Type: application/sdp

v=0
o=- 158319 1 IN IP4 192.168.2.2
s=-
c=IN IP4 192.168.2.2
t=0 0
m=audio 16614 RTP/AVP 0 8 18 104 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=rtpmap:104 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=ptime:20
a=xg726bitorder:big-endian

22:15:45.368646 IP 192.168.2.2.sip > ec2-107-21-231-147.compute-1.amazonaws.com.sip: SIP, length: 851
Eh.o..@.@.!.....k........[ hINVITE sip:0@doorbell.sip.twilio.com:5060 SIP/2.0
Call-ID: 3fd6d271@192.168.2.2
Content-Length: 308
CSeq: 8001 INVITE
From: <sip:zTest1234567890@doorbell.sip.twilio.com>;tag=SP1fbef378e5ff745c5
Max-Forwards: 70
To: <sip:0@doorbell.sip.twilio.com>
Via: SIP/2.0/UDP 192.168.2.2:5060;branch=z9hG4bK-7fbf5197;rport
User-Agent: OBIHAI/OBi202-3.0.1.4330
Contact: <sip:2bcf61d3cffeffa2@192.168.2.2:5060>
Expires: 60
Supported: replaces
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,PRACK,REFER,UPDATE
Content-Type: application/sdp

v=0
o=- 158319 1 IN IP4 192.168.2.2
s=-
c=IN IP4 192.168.2.2
t=0 0
m=audio 16614 RTP/AVP 0 8 18 104 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=rtpmap:104 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=ptime:20
a=xg726bitorder:big-endian

22:15:45.396424 IP ec2-107-21-231-147.compute-1.amazonaws.com.sip > 192.168.2.2.sip: SIP, length: 330
E..f..@.)...k............R..SIP/2.0 100 Giving a try
Call-ID: 3fd6d271@192.168.2.2
CSeq: 8001 INVITE
From: <sip:zTest1234567890@doorbell.sip.twilio.com>;tag=SP1fbef378e5ff745c5
To: <sip:0@doorbell.sip.twilio.com>
Via: SIP/2.0/UDP 192.168.2.2:5060;received=142.255.79.239;branch=z9hG4bK-7fbf5197;rport=38526
Server: Twilio Gateway
Content-Length: 0


22:15:45.416736 IP ec2-107-21-231-147.compute-1.amazonaws.com.sip > 192.168.2.2.sip: SIP, length: 561
E..M..@.)...k............9..SIP/2.0 407 Proxy Authentication required
To: <sip:0@doorbell.sip.twilio.com>;tag=69854196_6772d868_817a73c5-7b19-4cbd-957f-263e6202a1c9
Via: SIP/2.0/UDP 192.168.2.2:5060;received=142.255.79.239;branch=z9hG4bK-7fbf5197;rport=38526
CSeq: 8001 INVITE
Call-ID: 3fd6d271@192.168.2.2
From: <sip:zTest1234567890@doorbell.sip.twilio.com>;tag=SP1fbef378e5ff745c5
Contact: <sip:10.66.217.33:5060>
Proxy-Authenticate: Digest realm="sip.twilio.com",qop="auth",nonce="ecf0b95cce2939570d2fa778661b7c02",opaque="8dd1ab49e7e9623d09a1c542a84f617e"
Content-Length: 0


22:15:45.420538 IP 192.168.2.2.sip > ec2-107-21-231-147.compute-1.amazonaws.com.sip: SIP, length: 410
Eh....@.@.#|....k..........sACK sip:0@doorbell.sip.twilio.com:5060 SIP/2.0
Call-ID: 3fd6d271@192.168.2.2
Content-Length: 0
CSeq: 8001 ACK
From: <sip:zTest1234567890@doorbell.sip.twilio.com>;tag=SP1fbef378e5ff745c5
Max-Forwards: 70
To: <sip:0@doorbell.sip.twilio.com>;tag=69854196_6772d868_817a73c5-7b19-4cbd-957f-263e6202a1c9
Via: SIP/2.0/UDP 192.168.2.2:5060;branch=z9hG4bK-7fbf5197;rport
User-Agent: OBIHAI/OBi202-3.0.1.4330


22:15:45.422065 IP 192.168.2.2.sip > ec2-107-21-231-147.compute-1.amazonaws.com.sip: SIP, length: 1159
Eh....@.@. .....k.........2.INVITE sip:0@doorbell.sip.twilio.com:5060 SIP/2.0
Call-ID: 3fd6d271@192.168.2.2
Content-Length: 308
CSeq: 8002 INVITE
From: <sip:zTest1234567890@doorbell.sip.twilio.com>;tag=SP1fbef378e5ff745c5
Max-Forwards: 70
To: <sip:0@doorbell.sip.twilio.com>
Via: SIP/2.0/UDP 192.168.2.2:5060;branch=z9hG4bK-7f8d3d4d;rport
Proxy-Authorization: DIGEST algorithm=MD5,nc=00000001,qop=auth,cnonce="fd7f754ff5bb90d4",nonce="ecf0b95cce2939570d2fa778661b7c02",opaque="8dd1ab49e7e9623d09a1c542a84f617e",realm="sip.twilio.com",response="545ec151b00b1ec199314b2b79a65aae",uri="sip:0@doorbell.sip.twilio.com:5060",username="zTest1234567890"
User-Agent: OBIHAI/OBi202-3.0.1.4330
Contact: <sip:2bcf61d3cffeffa2@192.168.2.2:5060>
Expires: 60
Supported: replaces
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,PRACK,REFER,UPDATE
Content-Type: application/sdp

v=0
o=- 158319 1 IN IP4 192.168.2.2
s=-
c=IN IP4 192.168.2.2
t=0 0
m=audio 16614 RTP/AVP 0 8 18 104 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=rtpmap:104 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=ptime:20
a=xg726bitorder:big-endian

22:15:45.455465 IP ec2-107-21-231-147.compute-1.amazonaws.com.sip > 192.168.2.2.sip: SIP, length: 330
E..f..@.)...k............R..SIP/2.0 100 Giving a try
Call-ID: 3fd6d271@192.168.2.2
CSeq: 8002 INVITE
From: <sip:zTest1234567890@doorbell.sip.twilio.com>;tag=SP1fbef378e5ff745c5
To: <sip:0@doorbell.sip.twilio.com>
Via: SIP/2.0/UDP 192.168.2.2:5060;received=142.255.79.239;branch=z9hG4bK-7f8d3d4d;rport=38526
Server: Twilio Gateway
Content-Length: 0


22:15:45.463790 IP ec2-107-21-231-147.compute-1.amazonaws.com.sip > 192.168.2.2.sip: SIP, length: 395
E.....@.)...k...............SIP/2.0 403 Forbidden
To: <sip:0@doorbell.sip.twilio.com>;tag=46969138_6772d868_7b7e0df4-d3ee-4fea-b767-6aca74174e55
Via: SIP/2.0/UDP 192.168.2.2:5060;received=142.255.79.239;branch=z9hG4bK-7f8d3d4d;rport=38526
CSeq: 8002 INVITE
Call-ID: 3fd6d271@192.168.2.2
From: <sip:zTest1234567890@doorbell.sip.twilio.com>;tag=SP1fbef378e5ff745c5
Contact: <sip:10.79.37.92:5060>
Content-Length: 0


22:15:45.465295 IP 192.168.2.2.sip > ec2-107-21-231-147.compute-1.amazonaws.com.sip: SIP, length: 718
Eh....@.@."H....k..........wACK sip:0@doorbell.sip.twilio.com:5060 SIP/2.0
Call-ID: 3fd6d271@192.168.2.2
Content-Length: 0
CSeq: 8002 ACK
From: <sip:zTest1234567890@doorbell.sip.twilio.com>;tag=SP1fbef378e5ff745c5
Max-Forwards: 70
To: <sip:0@doorbell.sip.twilio.com>;tag=46969138_6772d868_7b7e0df4-d3ee-4fea-b767-6aca74174e55
Via: SIP/2.0/UDP 192.168.2.2:5060;branch=z9hG4bK-7f8d3d4d;rport
Proxy-Authorization: DIGEST algorithm=MD5,nc=00000001,qop=auth,cnonce="fd7f754ff5bb90d4",nonce="ecf0b95cce2939570d2fa778661b7c02",opaque="8dd1ab49e7e9623d09a1c542a84f617e",realm="sip.twilio.com",response="545ec151b00b1ec199314b2b79a65aae",uri="sip:0@doorbell.sip.twilio.com:5060",username="zTest1234567890"
User-Agent: OBIHAI/OBi202-3.0.1.4330


22:15:45.895595 IP ec2-107-21-231-147.compute-1.amazonaws.com.sip > 192.168.2.2.sip: SIP, length: 395
E.....@.)...k...............SIP/2.0 403 Forbidden
To: <sip:0@doorbell.sip.twilio.com>;tag=46969138_6772d868_7b7e0df4-d3ee-4fea-b767-6aca74174e55
Via: SIP/2.0/UDP 192.168.2.2:5060;received=142.255.79.239;branch=z9hG4bK-7f8d3d4d;rport=38526
CSeq: 8002 INVITE
Call-ID: 3fd6d271@192.168.2.2
From: <sip:zTest1234567890@doorbell.sip.twilio.com>;tag=SP1fbef378e5ff745c5
Contact: <sip:10.79.37.92:5060>
Content-Length: 0


22:15:45.897389 IP 192.168.2.2.sip > ec2-107-21-231-147.compute-1.amazonaws.com.sip: SIP, length: 718
Eh....@.@."H....k..........wACK sip:0@doorbell.sip.twilio.com:5060 SIP/2.0
Call-ID: 3fd6d271@192.168.2.2
Content-Length: 0
CSeq: 8002 ACK
From: <sip:zTest1234567890@doorbell.sip.twilio.com>;tag=SP1fbef378e5ff745c5
Max-Forwards: 70
To: <sip:0@doorbell.sip.twilio.com>;tag=46969138_6772d868_7b7e0df4-d3ee-4fea-b767-6aca74174e55
Via: SIP/2.0/UDP 192.168.2.2:5060;branch=z9hG4bK-7f8d3d4d;rport
Proxy-Authorization: DIGEST algorithm=MD5,nc=00000001,qop=auth,cnonce="fd7f754ff5bb90d4",nonce="ecf0b95cce2939570d2fa778661b7c02",opaque="8dd1ab49e7e9623d09a1c542a84f617e",realm="sip.twilio.com",response="545ec151b00b1ec199314b2b79a65aae",uri="sip:0@doorbell.sip.twilio.com:5060",username="zTest1234567890"
User-Agent: OBIHAI/OBi202-3.0.1.4330

And here's a successful call using Twilio's IP based authentication:

Code:
22:13:55.327686 IP 192.168.2.2.sip > ec2-107-21-231-147.compute-1.amazonaws.com.sip: SIP, length: 851
Eh.o..@.@.!.....k........[|.INVITE sip:0@doorbell.sip.twilio.com:5060 SIP/2.0
Call-ID: 8791aa9f@192.168.2.2
Content-Length: 308
CSeq: 8001 INVITE
From: <sip:zTest1234567890@doorbell.sip.twilio.com>;tag=SP167bb4f5675f7738a
Max-Forwards: 70
To: <sip:0@doorbell.sip.twilio.com>
Via: SIP/2.0/UDP 192.168.2.2:5060;branch=z9hG4bK-2b5e1595;rport
User-Agent: OBIHAI/OBi202-3.0.1.4330
Contact: <sip:2bcf61d3cffeffa2@192.168.2.2:5060>
Expires: 60
Supported: replaces
Allow: ACK,BYE,CANCEL,INFO,INVITE,NOTIFY,OPTIONS,PRACK,REFER,UPDATE
Content-Type: application/sdp

v=0
o=- 147360 1 IN IP4 192.168.2.2
s=-
c=IN IP4 192.168.2.2
t=0 0
m=audio 16612 RTP/AVP 0 8 18 104 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=rtpmap:104 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=ptime:20
a=xg726bitorder:big-endian

22:13:55.368882 IP ec2-107-21-231-147.compute-1.amazonaws.com.sip > 192.168.2.2.sip: SIP, length: 330
E..f..@.*...k............R.rSIP/2.0 100 Giving a try
Call-ID: 8791aa9f@192.168.2.2
CSeq: 8001 INVITE
From: <sip:zTest1234567890@doorbell.sip.twilio.com>;tag=SP167bb4f5675f7738a
To: <sip:0@doorbell.sip.twilio.com>
Via: SIP/2.0/UDP 192.168.2.2:5060;received=142.255.79.239;branch=z9hG4bK-2b5e1595;rport=38526
Server: Twilio Gateway
Content-Length: 0


22:13:55.445639 IP ec2-107-21-231-147.compute-1.amazonaws.com.sip > 192.168.2.2.sip: SIP, length: 517
..SIP/2.0 180 Ringing....
To: <sip:0@doorbell.sip.twilio.com>;tag=72496222_6772d868_27ab21c5-e924-4775-aa43-8758344fad73
Via: SIP/2.0/UDP 192.168.2.2:5060;received=142.255.79.239;branch=z9hG4bK-2b5e1595;rport=38526
Record-Route: <sip:107.21.231.147:5060;lr;ftag=SP167bb4f5675f7738a>
CSeq: 8001 INVITE
Call-ID: 8791aa9f@192.168.2.2
From: <sip:zTest1234567890@doorbell.sip.twilio.com>;tag=SP167bb4f5675f7738a
Contact: <sip:10.232.12.95:5060>
X-Twilio-CallSid: CA990a2975d598b7610899712b41b86bf5
Content-Length: 0


22:13:55.583663 IP ec2-107-21-231-147.compute-1.amazonaws.com.sip > 192.168.2.2.sip: SIP, length: 794
E..6..@.*...k............"..SIP/2.0 200 OK
To: <sip:0@doorbell.sip.twilio.com>;tag=72496222_6772d868_27ab21c5-e924-4775-aa43-8758344fad73
Via: SIP/2.0/UDP 192.168.2.2:5060;received=142.255.79.239;branch=z9hG4bK-2b5e1595;rport=38526
Record-Route: <sip:107.21.231.147:5060;lr;ftag=SP167bb4f5675f7738a>
CSeq: 8001 INVITE
Call-ID: 8791aa9f@192.168.2.2
From: <sip:zTest1234567890@doorbell.sip.twilio.com>;tag=SP167bb4f5675f7738a
Contact: <sip:10.232.12.95:5060>
Content-Type: application/sdp
X-Twilio-CallSid: CA990a2975d598b7610899712b41b86bf5
Content-Length: 249

v=0
o=- 1626306538 1626306538 IN IP4 54.197.71.251
s=session
c=IN IP4 54.197.71.251
t=0 0
m=audio 14480 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

22:13:55.588087 IP 192.168.2.2.sip > ec2-107-21-231-147.compute-1.amazonaws.com.sip: SIP, length: 459
Eh....@.@.#K....k.........1.ACK sip:10.232.12.95:5060 SIP/2.0
Call-ID: 8791aa9f@192.168.2.2
Content-Length: 0
CSeq: 8001 ACK
From: <sip:zTest1234567890@doorbell.sip.twilio.com>;tag=SP167bb4f5675f7738a
Max-Forwards: 70
Route: <sip:107.21.231.147:5060;lr;ftag=SP167bb4f5675f7738a>
To: <sip:0@doorbell.sip.twilio.com>;tag=72496222_6772d868_27ab21c5-e924-4775-aa43-8758344fad73
Via: SIP/2.0/UDP 192.168.2.2:5060;branch=z9hG4bK-f7fb39d4;rport
User-Agent: OBIHAI/OBi202-3.0.1.4330
« Last Edit: April 30, 2014, 07:39:13 pm by abbv » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC