p2p-sip: accept invitation failure

47 views
Skip to first unread message

xiong xu

unread,
Aug 14, 2015, 3:41:39 AM8/14/15
to myprojectguide
Hi,

I just started to learn SIP. P2p-sip is the only pure python sip stack I found.
Here's the problem bother me for days: when I try to accept an incoming call, the server always send a BYE and session abort.
Can someone help?
Below is the code and output log.

-Xiong


Here's the code modified from voip:

import multitask
from app.voip import *
from std.rfc4566 import SDP, attrs as format

def testRegister():
    sock = socket.socket(type=socket.SOCK_DGRAM)
    sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
    sock.bind(('0.0.0.0', 5060))

    user = User(sock, nat=False).start()
    result, reason = yield user.bind('<sip:+867698...@gd.ctcims.cn>', username='+867698...@gd.ctcims.cn', password='pass', interval = 3600)
    print 'user.bind() returned', result, reason

    multitask.add(testIncoming(user))

def getMediaStreams():
  audio, video = SDP.media(media='audio'), SDP.media(media='video')
  audio.fmt = [format(pt=120, name='RED', rate=16000)]
  audio.a = ['fmtp:120 109/109/109']
  video.fmt = [format(pt=122, name='H264', rate=90000)]
  video.a = ['fmtp:122 profile-level-id=64E00C;max-br=384']
  return (audio, video)
  
def testIncoming(user):
    while True:
        cmd, arg = (yield user.recv())
        if cmd == 'connect':
            print 'incoming call from', arg
            dest, ua = arg
            streams = getMediaStreams()
            msession = MediaSession(app=user, streams=streams, request=ua.request)
            mysdp = msession.mysdp
            yourself, arg = yield user.accept(arg, sdp=mysdp)
            if not yourself:
                print 'cannot accept call', arg
                
            while True:
                try:
                    data, remote = yield multitask.recvfrom(msock, 1500, timeout=3)
                    print 'remote data is', data
                except:
                    break
            while True:
                cmd, arg = yield yourself.recv()
                print 'received command', cmd, arg
                if cmd == 'close':
                    break
        elif cmd == 'close':
            print 'incoming call cancelled by', arg
        elif cmd == 'send':
            print 'paging-mode IM received', arg


try:
  multitask.add(testRegister())
  multitask.run()
except KeyboardInterrupt:
  pass


Here's the log:
User created on listening= ('0.0.0.0', 5060) advertised= ('10.17.41.163', 5060)                                                                                           
createClient <UserAgent call-id=e3a74130-4234-11e5...@10.17.41.163>                                                                                        
sending[393] to ('172.22.42.150', 5060)                                                                                                                                   
REGISTER sip:gd.ctcims.cn SIP/2.0                                                                                                                                         
Content-Length: 0                                                                                                                                                         
Via: SIP/2.0/UDP 10.17.41.163:5060;rport;branch=z9hG4bKyAN5CuxLbQ8Fz5vgUybBPg..                                                                                           
From: <sip:+867698...@gd.ctcims.cn>;tag=86323158548                                                                                                                   
Expires: 3600                                                                                                                                                             
To: <sip:+867698...@gd.ctcims.cn>                                                                                                                                     
Contact: <sip:+867698...@10.17.41.163:5060>                                                                                                                           
CSeq: 1 REGISTER                                                                                                                                                          
Max-Forwards: 70                                                                                                                                                          
Call-ID: e3a74130-4234-11e5...@10.17.41.163                                                                                                                
                                                                                                                                                                          
                                                                                                                                                                          
received[447] from ('172.22.42.150', 5060)                                                                                                                                
SIP/2.0 401 Unauthorized                                                                                                                                                  
Via: SIP/2.0/UDP 10.17.41.163:5060;branch=z9hG4bKyAN5CuxLbQ8Fz5vgUybBPg..;received=10.17.41.163;rport=5060                                                                
Call-ID: e3a74130-4234-11e5...@10.17.41.163                                                                                                                
From: <sip:+867698...@gd.ctcims.cn>;tag=86323158548                                                                                                                   
To: <sip:+867698...@gd.ctcims.cn>;tag=rw89ct8r                                                                                                                        
CSeq: 1 REGISTER                                                                                                                                                          
WWW-Authenticate: Digest realm="gd.ctcims.cn",nonce="M2UtP9LDx6N37jCGo1Dv4A==",algorithm=MD5,qop="auth"                                                                   
Content-Length: 0                                                                                                                                                         
                                                                                                                                                                          
                                                                                                                                                                          
sending[655] to ('172.22.42.150', 5060)                                                                                                                                   
REGISTER sip:gd.ctcims.cn SIP/2.0                                                                                                                                         
Call-ID: e3a74130-4234-11e5...@10.17.41.163                                                                                                                
Content-Length: 0                                                                                                                                                         
Via: SIP/2.0/UDP 10.17.41.163:5060;rport;branch=z9hG4bKhEtriydN9S8tk4ZTlfgpng..                                                                                           
From: <sip:+867698...@gd.ctcims.cn>;tag=86323158548                                                                                                                   
Expires: 3600                                                                                                                                                             
To: <sip:+867698...@gd.ctcims.cn>                                                                                                                                     
Contact: <sip:+867698...@10.17.41.163:5060>                                                                                                                           
CSeq: 2 REGISTER                                                                                                                                                          
Max-Forwards: 70                                                                                                                                                          
Authorization: Digest algorithm="MD5",cnonce="3dd58423f44b10b6c7313eeb83376cd8",nc=00000001,nonce="M2UtP9LDx6N37jCGo1Dv4A==",qop=auth,realm="gd.ctcims.cn",response="0b7b6
56763c43725da70ee92422683e9",uri="sip:gd.ctcims.cn",username="+867698...@gd.ctcims.cn"                                                                                
                                                                                                                                                                          
                                                                                                                                                                          
received[529] from ('172.22.42.150', 5060)                                                                                                                                
SIP/2.0 200 OK                                                                                                                                                            
Via: SIP/2.0/UDP 10.17.41.163:5060;branch=z9hG4bKhEtriydN9S8tk4ZTlfgpng..;received=10.17.41.163;rport=5060                                                                
Call-ID: e3a74130-4234-11e5...@10.17.41.163                                                                                                                
From: <sip:+867698...@gd.ctcims.cn>;tag=86323158548                                                                                                                   
To: <sip:+867698...@gd.ctcims.cn>;tag=tvbavmm7                                                                                                                        
CSeq: 2 REGISTER                                                                                                                                                          
Contact: <sip:+867698...@10.17.41.163:5060>;q=1;expires=3600                                                                                                          
P-Associated-URI: <sip:+867698...@gd.ctcims.cn>,<sip:+867698...@gd.ctcims.cn;user=phone>                                                                          
Accept-Resource-Priority: wps.4                                                                                                                                           
Content-Length: 0                                                                                                                                                         
                                                                                                                                                                          
                                                                                                                                                                          
receivedResponse response= 200  for ua with queue                                                                                                                         
response put in the ua queue                                                                                                                                              
received response success                                                                                                                                                 
user.bind() returned success None                                                                                                                                         
received[1293] from ('172.22.42.150', 5060)                                                                                                                               
INVITE sip:+867698...@10.17.41.163:5060 SIP/2.0                                                                                                                       
Via: SIP/2.0/UDP 172.22.42.150:5060;branch=z9hG4bKzz5xvmzdsmmz43zxswddxdzz3T08505                                                                                         
Record-Route: <sip:172.22.42.150:5060;transport=udp;lr>                                                                                                                   
Call-ID: asbcinlwxx923w2fxr...@ATS.ats02.gd.ctcims.cn.2                                                                                                    
From: "Anonymous"<sip:Anon...@Anonymous.invalid>;tag=sbc0504xxlifiaa-CC-2                                                                                               
To: <sip:8528...@gd.ctcims.cn;user=phone>                                                                                                                                
CSeq: 1 INVITE                                                                                                                                                            
Allow: INVITE,ACK,BYE,CANCEL,UPDATE,INFO,PRACK,SUBSCRIBE,NOTIFY,REFER,OPTIONS                                                                                             
Contact: <sip:+867698...@172.22.42.150:5060>                                                                                                                          
Max-Forwards: 61                                                                                                                                                          
Supported: 100rel,timer                                                                                                                                                   
Session-Expires: 1800                                                                                                                                                     
Min-SE: 600                                                                                                                                                               
Content-Length: 629                                                                                                                                                       
Content-Type: application/sdp                                                                                                                                             
                                                                                                                                                                          
v=0                                                                                                                                                                       
o=- 1177 1177 IN IP4 172.22.42.151                                                                                                                                        
s=SBC call                                                                                                                                                                
c=IN IP4 172.22.42.151                                                                                                                                                    
t=0 0                                                                                                                                                                     
m=audio 44586 RTP/AVP 120 109 127 108 18 8 101 102                                                                                                                        
a=rtpmap:120 RED/16000                                                                                                                                                    
a=fmtp:120 109/109/109                                                                                                                                                    
a=rtpmap:109 opus/16000                                                                                                                                                   
a=rtpmap:127 RED/8000                                                                                                                                                     
a=fmtp:127 8/8/8                                                                                                                                                          
a=rtpmap:108 iLBC/8000                                                                                                                                                    
a=fmtp:108 mode=20                                                                                                                                                        
a=rtpmap:101 telephone-event/16000                                                                                                                                        
a=rtpmap:102 telephone-event/8000                                                                                                                                         
a=sendrecv                                                                                                                                                                
m=video 44588 RTP/AVP 122 123 34                                                                                                                                          
a=rtpmap:122 H264/90000                                                                                                                                                   
a=fmtp:122 profile-level-id=64E00C;max-br=384                                                                                                                             
a=rtpmap:123 H264/90000                                                                                                                                                   
a=fmtp:123 profile-level-id=42E00C;max-br=384                                                                                                                             
a=fmtp:34 CIF=2 QCIF=2 MaxBR=2560                                                                                                                                         
a=pri:HME,640*360,o,s3,s2                                                                                                                                                 
a=sendrecv                                                                                                                                                                
                                                                                                                                                                          
createServer <UserAgent call-id=asbcinlwxx923w2fxr...@ATS.ats02.gd.ctcims.cn.2>                                                                            
sending[334] to ('172.22.42.150', 5060)                                                                                                                                   
SIP/2.0 100 Trying                                                                                                                                                        
Content-Length: 0                                                                                                                                                         
Via: SIP/2.0/UDP 172.22.42.150:5060;branch=z9hG4bKzz5xvmzdsmmz43zxswddxdzz3T08505                                                                                         
From: "Anonymous" <sip:Anon...@Anonymous.invalid>;tag=sbc0504xxlifiaa-CC-2                                                                                              
To: <sip:8528...@gd.ctcims.cn;user=phone>                                                                                                                                
CSeq: 1 INVITE                                                                                                                                                            
Call-ID: asbcinlwxx923w2fxr...@ATS.ats02.gd.ctcims.cn.2                                                                                                    
                                                                                                                                                                          
                                                                                                                                                                          
receivedRequest method= INVITE ua= <UserAgent call-id=asbcinlwxx923w2fxr...@ATS.ats02.gd.ctcims.cn.2>  for ua without queue                                
incoming call from ('"Anonymous" <sip:Anon...@Anonymous.invalid>', <UserAgent call-id=asbcinlwxx923w2fxr...@ATS.ats02.gd.ctcims.cn.2>)                   
dialogCreated from <UserAgent call-id=asbcinlwxx923w2fxr...@ATS.ats02.gd.ctcims.cn.2> to <Dialog call-id=asbcinlwxx923w2fxr...@ATS.ats02.gd.
ctcims.cn.2>                                                                                                                                                              
sending[769] to ('172.22.42.150', 5060)                                                                                                                                   
SIP/2.0 200 OK                                                                                                                                                            
Content-Length: 290                                                                                                                                                       
Via: SIP/2.0/UDP 172.22.42.150:5060;branch=z9hG4bKzz5xvmzdsmmz43zxswddxdzz3T08505                                                                                         
From: "Anonymous" <sip:Anon...@Anonymous.invalid>;tag=sbc0504xxlifiaa-CC-2                                                                                              
To: <sip:8528...@gd.ctcims.cn;user=phone>;tag=86323158547                                                                                                                
Contact: <sip:8528...@10.17.41.163:5060>                                                                                                                                 
CSeq: 1 INVITE                                                                                                                                                            
Call-ID: asbcinlwxx923w2fxr...@ATS.ats02.gd.ctcims.cn.2                                                                                                    
Record-Route: <sip:172.22.42.150:5060;lr;transport=udp>                                                                                                                   
Content-Type: application/sdp                                                                                                                                             
                                                                                                                                                                          
v=0                                                                                                                                                                       
o=- 1439523068 1439523068 IN IP4 10.17.41.163                                                                                                                             
s=-                                                                                                                                                                       
c=IN IP4 10.17.41.163                                                                                                                                                     
t=0 0                                                                                                                                                                     
m=audio 18748 RTP/AVP 120                                                                                                                                                 
a=fmtp:120 109/109/109                                                                                                                                                    
a=rtpmap:120 RED/16000                                                                                                                                                    
m=video 45658 RTP/AVP 122 123                                                                                                                                             
a=fmtp:122 profile-level-id=64E00C;max-br=384                                                                                                                             
a=rtpmap:122 H264/90000                                                                                                                                                   
a=rtpmap:123 H264/90000                                                                                                                                                   
                                                                                                                                                                          
sending[769] to ('172.22.42.150', 5060)                                                                                                                                   
SIP/2.0 200 OK                                                                                                                                                            
Content-Length: 290                                                                                                                                                       
Via: SIP/2.0/UDP 172.22.42.150:5060;branch=z9hG4bKzz5xvmzdsmmz43zxswddxdzz3T08505                                                                                         
From: "Anonymous" <sip:Anon...@Anonymous.invalid>;tag=sbc0504xxlifiaa-CC-2                                                                                              
To: <sip:8528...@gd.ctcims.cn;user=phone>;tag=86323158547                                                                                                                
Contact: <sip:8528...@10.17.41.163:5060>                                                                                                                                 
CSeq: 1 INVITE                                                                                                                                                            
Call-ID: asbcinlwxx923w2fxr...@ATS.ats02.gd.ctcims.cn.2                                                                                                    
Record-Route: <sip:172.22.42.150:5060;lr;transport=udp>                                                                                                                   
Content-Type: application/sdp                                                                                                                                             
                                                                                                                                                                          
v=0                                                                                                                                                                       
o=- 1439523068 1439523068 IN IP4 10.17.41.163                                                                                                                             
s=-                                                                                                                                                                       
c=IN IP4 10.17.41.163                                                                                                                                                     
t=0 0                                                                                                                                                                     
m=audio 18748 RTP/AVP 120                                                                                                                                                 
a=fmtp:120 109/109/109                                                                                                                                                    
a=rtpmap:120 RED/16000                                                                                                                                                    
m=video 45658 RTP/AVP 122 123                                                                                                                                             
a=fmtp:122 profile-level-id=64E00C;max-br=384                                                                                                                             
a=rtpmap:122 H264/90000                                                                                                                                                   
a=rtpmap:123 H264/90000                                                                                                                                                   
                                                                                                                                                                          
received[388] from ('172.22.42.150', 5060)                                                                                                                                
ACK sip:8528...@10.17.41.163:5060 SIP/2.0                                                                                                                                
Via: SIP/2.0/UDP 172.22.42.150:5060;branch=z9hG4bKtwpjd44s3dddj3s053w553j11T08506                                                                                         
Call-ID: asbcinlwxx923w2fxr...@ATS.ats02.gd.ctcims.cn.2                                                                                                    
From: "Anonymous"<sip:Anon...@Anonymous.invalid>;tag=sbc0504xxlifiaa-CC-2                                                                                               
To: <sip:8528...@gd.ctcims.cn;user=phone>;tag=86323158547                                                                                                                
CSeq: 1 ACK                                                                                                                                                               
Max-Forwards: 62                                                                                                                                                          
Content-Length: 0                                                                                                                                                         
                                                                                                                                                                          
                                                                                                                                                                          
receivedRequest method= ACK ua= <Dialog call-id=asbcinlwxx923w2fxr...@ATS.ats02.gd.ctcims.cn.2>  for ua with queue                                         
received[388] from ('172.22.42.150', 5060)                                                                                                                                
BYE sip:8528...@10.17.41.163:5060 SIP/2.0                                                                                                                                
Via: SIP/2.0/UDP 172.22.42.150:5060;branch=z9hG4bKp2tz53d12p0sjmj4pp50pw544T08507                                                                                         
Call-ID: asbcinlwxx923w2fxr...@ATS.ats02.gd.ctcims.cn.2                                                                                                    
From: "Anonymous"<sip:Anon...@Anonymous.invalid>;tag=sbc0504xxlifiaa-CC-2                                                                                               
To: <sip:8528...@gd.ctcims.cn;user=phone>;tag=86323158547                                                                                                                
CSeq: 2 BYE                                                                                                                                                               
Max-Forwards: 62                                                                                                                                                          
Content-Length: 0                                                                                                                                                         
                                                                                                                                                                          
                                                                                                                                                                          
receivedRequest method= BYE ua= <Dialog call-id=asbcinlwxx923w2fxr...@ATS.ats02.gd.ctcims.cn.2>  for ua with queue                                         
session receivedRequest BYE ua= <Dialog call-id=asbcinlwxx923w2fxr...@ATS.ats02.gd.ctcims.cn.2>                                                            
sending[343] to ('172.22.42.150', 5060)                                                                                                                                   
SIP/2.0 200 OK                                                                                                                                                            
Content-Length: 0                                                                                                                                                         
Via: SIP/2.0/UDP 172.22.42.150:5060;branch=z9hG4bKp2tz53d12p0sjmj4pp50pw544T08507                                                                                         
From: "Anonymous" <sip:Anon...@Anonymous.invalid>;tag=sbc0504xxlifiaa-CC-2                                                                                              
To: <sip:8528...@gd.ctcims.cn;user=phone>;tag=86323158547                                                                                                                
CSeq: 2 BYE                                                                                                                                                               
Call-ID: asbcinlwxx923w2fxr...@ATS.ats02.gd.ctcims.cn.2                                                                                                    
                                                                                                                                                                          
                                                                                                                                                                          
received command close None                                                                                                                                               

Intencity Team

unread,
Aug 22, 2015, 1:56:56 PM8/22/15
to myproje...@googlegroups.com, xu.xi...@gmail.com
Hi Xu,

The testIncoming code there is just for testing SIP flows, and will not receive media streams. Looking at the logs it seems like you are calling from another phone to voip.py. I think, after voip.py responds with "200 OK", the other phone does not find any useful audio codec in the response, so it disconnects the call. This is because in getMediaStreams, only a dummy RED codec is added, but no real codec. To keep the session on, I think you can change the function as follows.

def getMediaStreams():
  ...
- audio.fmt = [format(pt=120, name='RED', rate=16000)]
+ audio.fmt = [format(pt=8, name='pcma', rate=8000)]
  ...

This will result in atleast one common codec (8/pcma).

Again, there is no media flow in this test example, so you won't hear anything in the call. To use other voip.py modules for media flows, you will need to create your own app using these APIs. You can see examples in that or in rtmplite projects.

Good luck and keep posted!





--
--
You received this message because you are subscribed to the Google
Groups "myprojectguide" group.
To post to this group, send email to myproje...@googlegroups.com
To unsubscribe from this group, send email to
myprojectguid...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/myprojectguide?hl=en

---
You received this message because you are subscribed to the Google Groups "myprojectguide" group.
To unsubscribe from this group and stop receiving emails from it, send an email to myprojectguid...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
The Intencity Team  http://theintencity.com

xiong xu

unread,
Aug 24, 2015, 3:02:57 PM8/24/15
to myprojectguide, xu.xi...@gmail.com

Hi,


Your advice works when I do peer to peer call.

But when conference call, the invite without SDP offer, when I return 200 with SDP offer, the media server's ACK without SDP answer, then media server send BYE(Reason:Offer-Answer

not complete). 

Would you please have a look?


Here’s log:
2015-08-24 15:39:08,871|app.voip|280|DEBUG|received[617] from


(‘172.22.42.150’, 5060)
INVITE sip:+867698...@10.17.41.163:5060 SIP/2.0
Via: SIP/2.0/UDP

172.22.42.150:5060;branch=z9hG4bK6vo9k76al6b9amm84m0l9hm70T39215
Record-Route:
Call-ID: asbc3fla9n82li2xl9...@ATS.ats02.gd.ctcims.cn.1
From: “Anonymous”;tag=sbc0510ra899ow3-CC-1
To:
CSeq: 1 INVITE
Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,INFO,PRACK,SUBSCRIBE,NOTIFY,REFER,UPDATE
Contact: ;isfocus
Max-Forwards: 65


Supported: 100rel,timer
Session-Expires: 1800
Min-SE: 600

Content-Length: 0

2015-08-24 15:39:08,887|app.voip|527|DEBUG|createServer
2015-08-24 15:39:08,887|app.voip|622|DEBUG|sending[316] to


(‘172.22.42.150’, 5060)
SIP/2.0 100 Trying
Content-Length: 0
Via: SIP/2.0/UDP

172.22.42.150:5060;branch=z9hG4bK6vo9k76al6b9amm84m0l9hm70T39215
From: “Anonymous” ;tag=sbc0510ra899ow3-CC-1
To:
CSeq: 1 INVITE
Call-ID: asbc3fla9n82li2xl9...@ATS.ats02.gd.ctcims.cn.1

2015-08-24 15:39:08,887|app.voip|548|DEBUG|receivedRequest
method=INVITE ua=
for ua without queue
2015-08-24 15:39:08,887|root|74|INFO|incoming call from (‘”Anonymous”
‘, )
2015-08-24 15:39:08,887|app.voip|688|DEBUG|request does not have SDP body
2015-08-24 15:39:08,887|std.rfc3261|1352|DEBUG|request contact
;isfocus
2015-08-24 15:39:08,887|app.voip|606|DEBUG|dialogCreated from

to
1440401948.89
2015-08-24 15:39:08,887|app.voip|622|DEBUG|sending[686] to


(‘172.22.42.150’, 5060)
SIP/2.0 200 OK

Content-Length: 219
Via: SIP/2.0/UDP
172.22.42.150:5060;branch=z9hG4bK6vo9k76al6b9amm84m0l9hm70T39215
From: “Anonymous” ;tag=sbc0510ra899ow3-CC-1
To: ;tag=79341366520
Contact:
CSeq: 1 INVITE
Call-ID: asbc3fla9n82li2xl9...@ATS.ats02.gd.ctcims.cn.1
Record-Route:
Content-Type: application/sdp

v=0
o=- 1439521303 1439521303 IN IP4 10.17.41.163


s=-
c=IN IP4 10.17.41.163
t=0 0

m=video 45900 RTP/AVP 122
a=rtpmap:122 H264/90000
a=fmtp:122 profile-level-id=64E00C;max-br=384;packetization-mode=1
a=sendonly

2015-08-24 15:39:09,637|app.voip|548|DEBUG|receivedRequest method=ACK
ua=
for ua with queue

2015-08-24 15:39:09,637|app.voip|280|DEBUG|received[473] from
(‘172.22.42.150’, 5060)
BYE sip:+867698...@10.17.41.163:5060 SIP/2.0
Via: SIP/2.0/UDP
172.22.42.150:5060;branch=z9hG4bK6v660847o6k4bo4d6da77obbbT39217
Call-ID: asbc3fla9n82li2xl9...@ATS.ats02.gd.ctcims.cn.1
From: “Anonymous”;tag=sbc0510ra899ow3-CC-1
To: ;tag=79341366520
CSeq: 2 BYE
Max-Forwards: 68
Reason: SIP;text=”19505.1919.ATS.ats02.gd.ctcims.cn.1.3026.0.0.0.0.0.Offer-Answer
not complete”
Content-Length: 0


Thanks,
Xiong

在 2015年8月23日星期日 UTC+8上午1:56:56,Intencity Cloud Technologies写道:
createClient <UserAgent call-id=e3a74130-4234-11e5-9bb0-7ce...@10.17.41.163>                                                                                        
sending[393] to ('172.22.42.150', 5060)                                                                                                                                   
REGISTER sip:gd.ctcims.cn SIP/2.0                                                                                                                                         
Content-Length: 0                                                                                                                                                         
Via: SIP/2.0/UDP 10.17.41.163:5060;rport;branch=z9hG4bKyAN5CuxLbQ8Fz5vgUybBPg..                                                                                           
From: <sip:+8676...@gd.ctcims.cn>;tag=86323158548                                                                                                                   
Expires: 3600                                                                                                                                                             
To: <sip:+8676...@gd.ctcims.cn>                                                                                                                                     
Contact: <sip:+867698...@10.17.41.163:5060>                                                                                                                           
CSeq: 1 REGISTER                                                                                                                                                          
Max-Forwards: 70                                                                                                                                                          
Call-ID: e3a74130-4234-11e5-9bb0-7ce9d3...@10.17.41.163                                                                                                                
                                                                                                                                                                          
                                                                                                                                                                          
received[447] from ('172.22.42.150', 5060)                                                                                                                                
SIP/2.0 401 Unauthorized                                                                                                                                                  
Via: SIP/2.0/UDP 10.17.41.163:5060;branch=z9hG4bKyAN5CuxLbQ8Fz5vgUybBPg..;received=10.17.41.163;rport=5060                                                                
Call-ID: e3a74130-4234-11e5-9bb0-7ce9d3...@10.17.41.163                                                                                                                
From: <sip:+8676...@gd.ctcims.cn>;tag=86323158548                                                                                                                   
To: <sip:+8676...@gd.ctcims.cn>;tag=rw89ct8r                                                                                                                        
CSeq: 1 REGISTER                                                                                                                                                          
WWW-Authenticate: Digest realm="gd.ctcims.cn",nonce="M2UtP9LDx6N37jCGo1Dv4A==",algorithm=MD5,qop="auth"                                                                   
Content-Length: 0                                                                                                                                                         
                                                                                                                                                                          
                                                                                                                                                                          
sending[655] to ('172.22.42.150', 5060)                                                                                                                                   
REGISTER sip:gd.ctcims.cn SIP/2.0                                                                                                                                         
Call-ID: e3a74130-4234-11e5-9bb0-7ce9d3...@10.17.41.163                                                                                                                
Content-Length: 0                                                                                                                                                         
Via: SIP/2.0/UDP 10.17.41.163:5060;rport;branch=z9hG4bKhEtriydN9S8tk4ZTlfgpng..                                                                                           
From: <sip:+8676...@gd.ctcims.cn>;tag=86323158548                                                                                                                   
Expires: 3600                                                                                                                                                             
To: <sip:+8676...@gd.ctcims.cn>                                                                                                                                     
Contact: <sip:+867698...@10.17.41.163:5060>                                                                                                                           
CSeq: 2 REGISTER                                                                                                                                                          
Max-Forwards: 70                                                                                                                                                          
Authorization: Digest algorithm="MD5",cnonce="3dd58423f44b10b6c7313eeb83376cd8",nc=00000001,nonce="M2UtP9LDx6N37jCGo1Dv4A==",qop=auth,realm="gd.ctcims.cn",response="0b7b6
56763c43725da70ee92422683e9",uri="sip:gd.ctcims.cn",username="+867698...@gd.ctcims.cn"                                                                                
                                                                                                                                                                          
                                                                                                                                                                          
received[529] from ('172.22.42.150', 5060)                                                                                                                                
SIP/2.0 200 OK                                                                                                                                                            
Via: SIP/2.0/UDP 10.17.41.163:5060;branch=z9hG4bKhEtriydN9S8tk4ZTlfgpng..;received=10.17.41.163;rport=5060                                                                
Call-ID: e3a74130-4234-11e5-9bb0-7ce9d3...@10.17.41.163                                                                                                                
From: <sip:+8676...@gd.ctcims.cn>;tag=86323158548                                                                                                                   
To: <sip:+8676...@gd.ctcims.cn>;tag=tvbavmm7                                                                                                                        
CSeq: 2 REGISTER                                                                                                                                                          
Contact: <sip:+867698...@10.17.41.163:5060>;q=1;expires=3600                                                                                                          
P-Associated-URI: <sip:+8676...@gd.ctcims.cn>,<sip:+8676...@gd.ctcims.cn;user=phone>                                                                          
Accept-Resource-Priority: wps.4                                                                                                                                           
Content-Length: 0                                                                                                                                                         
                                                                                                                                                                          
                                                                                                                                                                          
receivedResponse response= 200  for ua with queue                                                                                                                         
response put in the ua queue                                                                                                                                              
received response success                                                                                                                                                 
user.bind() returned success None                                                                                                                                         
received[1293] from ('172.22.42.150', 5060)                                                                                                                               
INVITE sip:+867698...@10.17.41.163:5060 SIP/2.0                                                                                                                       
Via: SIP/2.0/UDP 172.22.42.150:5060;branch=z9hG4bKzz5xvmzdsmmz43zxswddxdzz3T08505                                                                                         
Record-Route: <sip:172.22.42.150:5060;transport=udp;lr>                                                                                                                   
Call-ID: asbcinlwxx923w2fxr8el8irnera3i9nr...@ATS.ats02.gd.ctcims.cn.2                                                                                                    
From: "Anonymous"<sip:Anonymous@Anonymous.invalid>;tag=sbc0504xxlifiaa-CC-2                                                                                               
To: <sip:85...@gd.ctcims.cn;user=phone>                                                                                                                                
createServer <UserAgent call-id=asbcinlwxx923w2fxr8el8irnera3i9nr...@ATS.ats02.gd.ctcims.cn.2>                                                                            
sending[334] to ('172.22.42.150', 5060)                                                                                                                                   
SIP/2.0 100 Trying                                                                                                                                                        
Content-Length: 0                                                                                                                                                         
Via: SIP/2.0/UDP 172.22.42.150:5060;branch=z9hG4bKzz5xvmzdsmmz43zxswddxdzz3T08505                                                                                         
From: "Anonymous" <sip:Anonymous@Anonymous.invalid>;tag=sbc0504xxlifiaa-CC-2                                                                                              
To: <sip:85...@gd.ctcims.cn;user=phone>                                                                                                                                
CSeq: 1 INVITE                                                                                                                                                            
Call-ID: asbcinlwxx923w2fxr8el8irnera3i9nr...@ATS.ats02.gd.ctcims.cn.2                                                                                                    
                                                                                                                                                                          
                                                                                                                                                                          
receivedRequest method= INVITE ua= <UserAgent call-id=asbcinlwxx923w2fxr8el8irnera3i9nr...@ATS.ats02.gd.ctcims.cn.2>  for ua without queue                                
incoming call from ('"Anonymous" <sip:Anonymous@Anonymous.invalid>', <UserAgent call-id=asbcinlwxx923w2fxr8el8irnera3i9nr...@ATS.ats02.gd.ctcims.cn.2>)                   
dialogCreated from <UserAgent call-id=asbcinlwxx923w2fxr8el8irnera3i9nr...@ATS.ats02.gd.ctcims.cn.2> to <Dialog call-id=asbcinlwxx923w2fxr8el8irnera3...@ATS.ats02.gd.
ctcims.cn.2>                                                                                                                                                              
sending[769] to ('172.22.42.150', 5060)                                                                                                                                   
SIP/2.0 200 OK                                                                                                                                                            
Content-Length: 290                                                                                                                                                       
Via: SIP/2.0/UDP 172.22.42.150:5060;branch=z9hG4bKzz5xvmzdsmmz43zxswddxdzz3T08505                                                                                         
From: "Anonymous" <sip:Anonymous@Anonymous.invalid>;tag=sbc0504xxlifiaa-CC-2                                                                                              
To: <sip:85...@gd.ctcims.cn;user=phone>;tag=86323158547                                                                                                                
Contact: <sip:8528...@10.17.41.163:5060>                                                                                                                                 
CSeq: 1 INVITE                                                                                                                                                            
Call-ID: asbcinlwxx923w2fxr8el8irnera3i9nr...@ATS.ats02.gd.ctcims.cn.2                                                                                                    
Record-Route: <sip:172.22.42.150:5060;lr;transport=udp>                                                                                                                   
Content-Type: application/sdp                                                                                                                                             
                                                                                                                                                                          
v=0                                                                                                                                                                       
o=- 1439523068 1439523068 IN IP4 10.17.41.163                                                                                                                             
s=-                                                                                                                                                                       
c=IN IP4 10.17.41.163                                                                                                                                                     
t=0 0                                                                                                                                                                     
m=audio 18748 RTP/AVP 120                                                                                                                                                 
a=fmtp:120 109/109/109                                                                                                                                                    
a=rtpmap:120 RED/16000                                                                                                                                                    
m=video 45658 RTP/AVP 122 123                                                                                                                                             
a=fmtp:122 profile-level-id=64E00C;max-br=384                                                                                                                             
a=rtpmap:122 H264/90000                                                                                                                                                   
a=rtpmap:123 H264/90000                                                                                                                                                   
                                                                                                                                                                          
sending[769] to ('172.22.42.150', 5060)                                                                                                                                   
SIP/2.0 200 OK                                                                                                                                                            
Content-Length: 290                                                                                                                                                       
Via: SIP/2.0/UDP 172.22.42.150:5060;branch=z9hG4bKzz5xvmzdsmmz43zxswddxdzz3T08505                                                                                         
From: "Anonymous" <sip:Anonymous@Anonymous.invalid>;tag=sbc0504xxlifiaa-CC-2                                                                                              
To: <sip:85...@gd.ctcims.cn;user=phone>;tag=86323158547                                                                                                                
Contact: <sip:8528...@10.17.41.163:5060>                                                                                                                                 
CSeq: 1 INVITE                                                                                                                                                            
Call-ID: asbcinlwxx923w2fxr8el8irnera3i9nr...@ATS.ats02.gd.ctcims.cn.2                                                                                                    
Record-Route: <sip:172.22.42.150:5060;lr;transport=udp>                                                                                                                   
Content-Type: application/sdp                                                                                                                                             
                                                                                                                                                                          
v=0                                                                                                                                                                       
o=- 1439523068 1439523068 IN IP4 10.17.41.163                                                                                                                             
s=-                                                                                                                                                                       
c=IN IP4 10.17.41.163                                                                                                                                                     
t=0 0                                                                                                                                                                     
m=audio 18748 RTP/AVP 120                                                                                                                                                 
a=fmtp:120 109/109/109                                                                                                                                                    
a=rtpmap:120 RED/16000                                                                                                                                                    
m=video 45658 RTP/AVP 122 123                                                                                                                                             
a=fmtp:122 profile-level-id=64E00C;max-br=384                                                                                                                             
a=rtpmap:122 H264/90000                                                                                                                                                   
a=rtpmap:123 H264/90000                                                                                                                                                   
                                                                                                                                                                          
received[388] from ('172.22.42.150', 5060)                                                                                                                                
ACK sip:8528...@10.17.41.163:5060 SIP/2.0                                                                                                                                
Via: SIP/2.0/UDP 172.22.42.150:5060;branch=z9hG4bKtwpjd44s3dddj3s053w553j11T08506                                                                                         
Call-ID: asbcinlwxx923w2fxr8el8irnera3i9nr...@ATS.ats02.gd.ctcims.cn.2                                                                                                    
From: "Anonymous"<sip:Anonymous@Anonymous.invalid>;tag=sbc0504xxlifiaa-CC-2                                                                                               
To: <sip:85...@gd.ctcims.cn;user=phone>;tag=86323158547                                                                                                                
CSeq: 1 ACK                                                                                                                                                
...

xiong xu

unread,
Aug 24, 2015, 3:02:57 PM8/24/15
to myprojectguide
OK, I figured out the problem due to wrong offer params.
>> call-id=e3a74130-4234-11e5...@10.17.41.163>
>> sending[393] to ('172.22.42.150', 5060)
>> REGISTER sip:gd.ctcims.cn SIP/2.0
>> Content-Length: 0
>> Via: SIP/2.0/UDP
>> 10.17.41.163:5060;rport;branch=z9hG4bKyAN5CuxLbQ8Fz5vgUybBPg..
>> From: <sip:+8676...@gd.ctcims.cn>;tag=86323158548
>> Expires: 3600
>> To: <sip:+8676...@gd.ctcims.cn>
>> Contact: <sip:+867698...@10.17.41.163:5060>
>> CSeq: 1 REGISTER
>> Max-Forwards: 70
>> Call-ID: e3a74130-4234-11e5...@10.17.41.163
>>
>>
>> received[447] from ('172.22.42.150', 5060)
>> SIP/2.0 401 Unauthorized
>> Via: SIP/2.0/UDP
>> 10.17.41.163:5060;branch=z9hG4bKyAN5CuxLbQ8Fz5vgUybBPg..;received=10.17.41.163;rport=5060
>> Call-ID: e3a74130-4234-11e5...@10.17.41.163
>> From: <sip:+8676...@gd.ctcims.cn>;tag=86323158548
>> To: <sip:+8676...@gd.ctcims.cn>;tag=rw89ct8r
>> CSeq: 1 REGISTER
>> WWW-Authenticate: Digest
>> realm="gd.ctcims.cn",nonce="M2UtP9LDx6N37jCGo1Dv4A==",algorithm=MD5,qop="auth"
>> Content-Length: 0
>>
>>
>> sending[655] to ('172.22.42.150', 5060)
>> REGISTER sip:gd.ctcims.cn SIP/2.0
>> Call-ID: e3a74130-4234-11e5...@10.17.41.163
>> Content-Length: 0
>> Via: SIP/2.0/UDP
>> 10.17.41.163:5060;rport;branch=z9hG4bKhEtriydN9S8tk4ZTlfgpng..
>> From: <sip:+8676...@gd.ctcims.cn>;tag=86323158548
>> Expires: 3600
>> To: <sip:+8676...@gd.ctcims.cn>
>> Contact: <sip:+867698...@10.17.41.163:5060>
>> CSeq: 2 REGISTER
>> Max-Forwards: 70
>> Authorization: Digest
>> algorithm="MD5",cnonce="3dd58423f44b10b6c7313eeb83376cd8",nc=00000001,nonce="M2UtP9LDx6N37jCGo1Dv4A==",qop=auth,realm="gd.ctcims.cn",response="0b7b6
>>
>> 56763c43725da70ee92422683e9",uri="sip:gd.ctcims.cn",username="+867698...@gd.ctcims.cn"
>>
>>
>> received[529] from ('172.22.42.150', 5060)
>> SIP/2.0 200 OK
>> Via: SIP/2.0/UDP
>> 10.17.41.163:5060;branch=z9hG4bKhEtriydN9S8tk4ZTlfgpng..;received=10.17.41.163;rport=5060
>> Call-ID: e3a74130-4234-11e5...@10.17.41.163
>> From: <sip:+8676...@gd.ctcims.cn>;tag=86323158548
>> To: <sip:+8676...@gd.ctcims.cn>;tag=tvbavmm7
>> CSeq: 2 REGISTER
>> Contact: <sip:+867698...@10.17.41.163:5060>;q=1;expires=3600
>> P-Associated-URI:
>> <sip:+8676...@gd.ctcims.cn>,<sip:+8676...@gd.ctcims.cn;user=phone>
>> Accept-Resource-Priority: wps.4
>> Content-Length: 0
>>
>>
>> receivedResponse response= 200 for ua with queue
>> response put in the ua queue
>> received response success
>> user.bind() returned success None
>> received[1293] from ('172.22.42.150', 5060)
>> INVITE sip:+867698...@10.17.41.163:5060 SIP/2.0
>> Via: SIP/2.0/UDP
>> 172.22.42.150:5060;branch=z9hG4bKzz5xvmzdsmmz43zxswddxdzz3T08505
>> Record-Route: <sip:172.22.42.150:5060;transport=udp;lr>
>> Call-ID: asbcinlwxx923w2fxr...@ATS.ats02.gd.ctcims.cn.2
>> From:
>> "Anonymous"<sip:Anon...@Anonymous.invalid>;tag=sbc0504xxlifiaa-CC-2
>> call-id=asbcinlwxx923w2fxr...@ATS.ats02.gd.ctcims.cn.2>
>> sending[334] to ('172.22.42.150', 5060)
>> SIP/2.0 100 Trying
>> Content-Length: 0
>> Via: SIP/2.0/UDP
>> 172.22.42.150:5060;branch=z9hG4bKzz5xvmzdsmmz43zxswddxdzz3T08505
>> From: "Anonymous"
>> <sip:Anon...@Anonymous.invalid>;tag=sbc0504xxlifiaa-CC-2
>> To: <sip:85...@gd.ctcims.cn;user=phone>
>> CSeq: 1 INVITE
>> Call-ID: asbcinlwxx923w2fxr...@ATS.ats02.gd.ctcims.cn.2
>>
>>
>> receivedRequest method= INVITE ua= <UserAgent
>> call-id=asbcinlwxx923w2fxr...@ATS.ats02.gd.ctcims.cn.2> for
>> ua without queue
>> incoming call from ('"Anonymous" <sip:Anon...@Anonymous.invalid>',
>> <UserAgent
>> call-id=asbcinlwxx923w2fxr...@ATS.ats02.gd.ctcims.cn.2>)
>> dialogCreated from <UserAgent
>> call-id=asbcinlwxx923w2fxr...@ATS.ats02.gd.ctcims.cn.2> to
>> <Dialog call-id=asbcinlwxx923w2fxr...@ATS.ats02.gd.
>> ctcims.cn.2>
>> sending[769] to ('172.22.42.150', 5060)
>> SIP/2.0 200 OK
>> Content-Length: 290
>> Via: SIP/2.0/UDP
>> 172.22.42.150:5060;branch=z9hG4bKzz5xvmzdsmmz43zxswddxdzz3T08505
>> From: "Anonymous"
>> <sip:Anon...@Anonymous.invalid>;tag=sbc0504xxlifiaa-CC-2
>> To: <sip:85...@gd.ctcims.cn;user=phone>;tag=86323158547
>> Contact: <sip:8528...@10.17.41.163:5060>
>> CSeq: 1 INVITE
>> Call-ID: asbcinlwxx923w2fxr...@ATS.ats02.gd.ctcims.cn.2
>> Record-Route: <sip:172.22.42.150:5060;lr;transport=udp>
>> Content-Type: application/sdp
>>
>> v=0
>> o=- 1439523068 1439523068 IN IP4 10.17.41.163
>> s=-
>> c=IN IP4 10.17.41.163
>> t=0 0
>> m=audio 18748 RTP/AVP 120
>> a=fmtp:120 109/109/109
>> a=rtpmap:120 RED/16000
>> m=video 45658 RTP/AVP 122 123
>> a=fmtp:122 profile-level-id=64E00C;max-br=384
>> a=rtpmap:122 H264/90000
>> a=rtpmap:123 H264/90000
>>
>> sending[769] to ('172.22.42.150', 5060)
>> SIP/2.0 200 OK
>> Content-Length: 290
>> Via: SIP/2.0/UDP
>> 172.22.42.150:5060;branch=z9hG4bKzz5xvmzdsmmz43zxswddxdzz3T08505
>> From: "Anonymous"
>> <sip:Anon...@Anonymous.invalid>;tag=sbc0504xxlifiaa-CC-2
>> To: <sip:85...@gd.ctcims.cn;user=phone>;tag=86323158547
>> Contact: <sip:8528...@10.17.41.163:5060>
>> CSeq: 1 INVITE
>> Call-ID: asbcinlwxx923w2fxr...@ATS.ats02.gd.ctcims.cn.2
>> Record-Route: <sip:172.22.42.150:5060;lr;transport=udp>
>> Content-Type: application/sdp
>>
>> v=0
>> o=- 1439523068 1439523068 IN IP4 10.17.41.163
>> s=-
>> c=IN IP4 10.17.41.163
>> t=0 0
>> m=audio 18748 RTP/AVP 120
>> a=fmtp:120 109/109/109
>> a=rtpmap:120 RED/16000
>> m=video 45658 RTP/AVP 122 123
>> a=fmtp:122 profile-level-id=64E00C;max-br=384
>> a=rtpmap:122 H264/90000
>> a=rtpmap:123 H264/90000
>>
>> received[388] from ('172.22.42.150', 5060)
>> ACK sip:8528...@10.17.41.163:5060 SIP/2.0
>> Via: SIP/2.0/UDP
>> 172.22.42.150:5060;branch=z9hG4bKtwpjd44s3dddj3s053w553j11T08506
>> Call-ID: asbcinlwxx923w2fxr...@ATS.ats02.gd.ctcims.cn.2
>> From:
>> "Anonymous"<sip:Anon...@Anonymous.invalid>;tag=sbc0504xxlifiaa-CC-2
Reply all
Reply to author
Forward
0 new messages