|
From: | Anton Pomozov |
Subject: | [Linphone-developers] SIP/2.0 405 Method not allowed |
Date: | Sat, 25 Oct 2014 04:59:22 +0400 |
Hi! I builded linphone app for iOS and call to it from other linphone (same version for iOS, OS X). Call is dropped after ~30 seconds: ————— 2014-10-25 04:32:41.960 linphone[975:1169181] channel [0x5d0a000]: starting recv background task with id=[3a]. 2014-10-25 04:32:41.963 linphone[975:1169181] channel [0x5d0a000]: received [674] new bytes from [TCP://212.159.80.157:5060]: ACK sip:address@hidden:46734;transport=tcp SIP/2.0 Via: SIP/2.0/TCP 212.159.80.157:5060;branch=z9hG4bK099ae493;rport Max-Forwards: 70 From: "Unknown" <sip:address@hidden>;tag=as1b1ad53a Contact: <sip:address@hidden:5060;transport=TCP> Call-ID: address@hidden:5060 CSeq: 102 ACK User-Agent: FPBX-2.8.1(11.12.0) Content-Length: 0 2014-10-25 04:32:41.977 linphone[975:1169181] channel [0x5d0a000] [674] bytes parsed 2014-10-25 04:32:41.979 linphone[975:1169181] sal process_request_event not implemented yet for method [ACK] 2014-10-25 04:32:41.980 linphone[975:1169181] channel [0x5d0a000]: message sent to [TCP://212.159.80.157:5060], size: [616] bytes SIP/2.0 405 Method not allowed Via: SIP/2.0/TCP 212.159.80.157:5060;branch=z9hG4bK099ae493;rport From: "Unknown" <sip:address@hidden>;tag=as1b1ad53a To: <sip:address@hidden:46734;app-id=appid.phone.dev;pn-type=apple;pn-tok=tokenid;pn-msg-str=IM_MSG;pn-call-str=IC_MSG;pn-call-snd=ring.caf;pn-msg-snd=msg.caf;transport=tcp>;ta;tag=EDj6v Call-ID: address@hidden:5060 CSeq: 102 ACK Allow: INVITE, CANCEL, ACK, BYE, SUBSCRIBE, NOTIFY, MESSAGE, OPTIONS, INFO Content-Length: 0 2014-10-25 04:32:41.982 linphone[975:1169181] channel [0x5d0a000]: ending recv background task with id=[3a]. … 2014-10-25 04:32:42.360 linphone[975:1169181] Changing [server] [INVITE] transaction [0x72bc450], from state [ACCEPTED] to [TERMINATED] 2014-10-25 04:32:42.362 linphone[975:1169181] Server INVITE transaction [0x72bc450] terminated 2014-10-25 04:32:42.363 linphone[975:1169181] Dialog [0x72ba930] was not ACK'd within T1*64 seconds, it is going to be terminated. 2014-10-25 04:32:42.364 linphone[975:1169181] Dialog [0x72ba930]: now updated by transaction [0x74773e0]. 2014-10-25 04:32:42.366 linphone[975:1169181] Changing [client] [BYE] transaction [0x74773e0], from state [INIT] to [TRYING] 2014-10-25 04:32:42.367 linphone[975:1169181] channel [0x5d0a000]: message sent to [TCP://212.159.80.157:5060], size: [570] bytes BYE sip:address@hidden:5060;transport=TCP SIP/2.0 Via: SIP/2.0/TCP 192.168.1.100:57427;branch=z9hG4bK.4QlfqAkz0;rport From: <sip:address@hidden;app-id= appid.phone.dev;pn-type=apple;pn-tok= tokenid;pn-msg-str=IM_MSG;pn-call-str=IC_MSG;pn-call-snd=ring.caf;pn-msg-snd=msg.caf>;tag=kJQgXNt To: "Unknown" <sip:address@hidden>;tag=as1b1ad53a CSeq: 111 BYE Call-ID: address@hidden:5060 Max-Forwards: 70 Content-Length: 0 2014-10-25 04:32:42.460 linphone[975:1169181] channel [0x5d0a000]: starting recv background task with id=[3b]. 2014-10-25 04:32:42.463 linphone[975:1169181] channel [0x5d0a000]: received [683] new bytes from [TCP://212.159.80.157:5060]: SIP/2.0 200 OK Via: SIP/2.0/TCP 192.168.1.100:57427;branch=z9hG4bK.4QlfqAkz0;received=185.19.20.144;rport=46734 From: <sip:address@hidden;app-id= appid.phone.dev;pn-type=apple;pn-tok= tokenid;pn-msg-str=IM_MSG;pn-call-str=IC_MSG;pn-call-snd=ring.caf;pn-msg-snd=msg.caf>;tag=kJQgXNt To: "Unknown" <sip:address@hidden>;tag=as1b1ad53a Call-ID: address@hidden:5060 CSeq: 111 BYE Server: FPBX-2.8.1(11.12.0) Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer Content-Length: 0 ————— I wonder this logic: SIP/2.0 405 Method not allowed CSeq: 102 ACK Allow: INVITE, CANCEL, ACK, BYE, SUBSCRIBE, NOTIFY, MESSAGE, OPTIONS, INFO I checked out sources: submodules/linphone/coreapi/bellesip_sal/sal_impl.c … static void process_request_event(void *ud, const belle_sip_request_event_t *event) { Sal *sal=(Sal*)ud; SalOp* op=NULL; … if (dialog) { op=(SalOp*)belle_sip_dialog_get_application_data(dialog); if (op==NULL || op->state==SalOpStateTerminated){ ms_warning("Receiving request for null or terminated op [%p], ignored",op); return; } }else if (strcmp("INVITE",method)==0) { op=sal_op_new(sal); op->dir=SalOpDirIncoming; sal_op_call_fill_cbs(op); }else if ((strcmp("SUBSCRIBE",method)==0 || strcmp("NOTIFY",method)==0) && (evh=belle_sip_message_get_header(BELLE_SIP_MESSAGE(req),"Event"))!=NULL) { op=sal_op_new(sal); op->dir=SalOpDirIncoming; if (strncmp(belle_sip_header_get_unparsed_value(evh),"presence",strlen("presence"))==0){ sal_op_presence_fill_cbs(op); }else sal_op_subscribe_fill_cbs(op); }else if (strcmp("MESSAGE",method)==0) { op=sal_op_new(sal); op->dir=SalOpDirIncoming; sal_op_message_fill_cbs(op); }else if (strcmp("OPTIONS",method)==0) { resp=belle_sip_response_create_from_request(req,200); belle_sip_provider_send_response(sal->prov,resp); return; }else if (strcmp("INFO",method)==0) { resp=belle_sip_response_create_from_request(req,481);/*INFO out of call dialogs are not allowed*/ belle_sip_provider_send_response(sal->prov,resp); return; }else if (strcmp("BYE",method)==0) { resp=belle_sip_response_create_from_request(req,481);/*out of dialog BYE */ belle_sip_provider_send_response(sal->prov,resp); return; }else if (strcmp("CANCEL",method)==0) { resp=belle_sip_response_create_from_request(req,481);/*out of dialog CANCEL */ belle_sip_provider_send_response(sal->prov,resp); return; }else if (sal->enable_test_features && strcmp("PUBLISH",method)==0) { resp=belle_sip_response_create_from_request(req,200);/*out of dialog BYE */ belle_sip_message_add_header((belle_sip_message_t*)resp,belle_sip_header_create("SIP-Etag","4441929FFFZQOA")); belle_sip_provider_send_response(sal->prov,resp); return; }else { ms_error("sal process_request_event not implemented yet for method [%s]",belle_sip_request_get_method(req)); resp=belle_sip_response_create_from_request(req,405); belle_sip_message_add_header(BELLE_SIP_MESSAGE(resp) ,BELLE_SIP_HEADER(belle_sip_header_allow_create("INVITE, CANCEL, ACK, BYE, SUBSCRIBE, NOTIFY, MESSAGE, OPTIONS, INFO"))); belle_sip_provider_send_response(sal->prov,resp); return; } … Linphone does not should send ACK? Linphone sources are incomplete? Could anyone explain where is the bug? The most important - how to avoid this? Best regards, Anton |
[Prev in Thread] | Current Thread | [Next in Thread] |