Two INVITE problem and ethereal shows PC receive INVITE packages while PJSIP doesnt receive the packages at all

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,
    Now I am developing a softphone using pjsip, and I have such two
problems:
1. first problem:
    As a callee, after receiving an INVITE, I send a 180 responce , but the
NGN can`t realize the 180 response, and NGN again sends another INVITE with
different Via and Record-Route. Such as:
 the previous:
INVITE sip:059188244006 at 191.168.17.14 <sip%3A059188244006 at 191.168.17.14>SIP/2.0
Via: SIP/2.0/UDP aaa.aaa.aaa.aaa:5060;branch=z9hG4bK6a373d102bba229d
Via: SIP/2.0/UDP bbb.bbb.bbb.bbb:5060;received=bbb.bbb.bbb.bbb
;branch=z9hG4bK5c053455.0
...
Call-ID: 00004913000073df-0001-0020 at bbb.bbb.bbb.bbb
...
Record-Route: <sip:aaa.aaa.aaa.aaa;lr>
Record-Route: <sip:bbb.bbb.bbb.bbb;lr>
the latter:
Via: SIP/2.0/UDP aaa.aaa.aaa.aaa:5060;branch=z9hG4bK6a373d102bba229d
Via: SIP/2.0/UDP ccc.ccc.ccc.ccc:1150;received=ccc.ccc.ccc.ccc
;branch=z9hG4bK5c053455.0
...
Call-ID: 00004913000073df-0001-0020 at bbb.bbb.bbb.bbb
...
Record-Route: <sip:aaa.aaa.aaa.aaa;lr>
Record-Route: <sip:ccc.ccc.ccc.ccc:1150;lr>
    I have no idea why this problem happen. The same Call-ID in two INVITE
packages shows that the two packages both sended by only one Server. But why
the Server sended two INVITE? Before modifing the codes, PJSIP can`t deal
with this situation . A fomous softphone called Eyebeam ether can`t deal
with it. Can somebody tell me why?
    To solve this problem, I just disable the flag: route_set_froze, always
set : route_set_frozen = PJ_FALSE :
in method dlg_update_routeset in file sip_dialog.c:
if (pjsip_method_creates_dialog(&rdata->msg_info.cseq->method) &&
    PJSIP_IS_STATUS_IN_CLASS(msg->line.status.code, 200))
    {
//        dlg->route_set_frozen = PJ_TRUE;
//        PJ_LOG(5,(dlg->obj_name, "Route-set frozen"));
        dlg->route_set_frozen = PJ_FALSE; // here i set false
    }
Through this modify , it seems well the past few days and i can receive
incoming calls successfully. But just yesterday, I found it can`t receive
incoming call again! That is the second problem following:
2. second problem:
       After I send 180 response, NGN just don`t realize it and sends
another INVITE again. But the most oddball thing is : the Ethereal indeed
receive the incoming INVITE package while PJSIP doesn`t receive the INVITE
packages. From the log , i can`t found the incoming INVITE. Then i check the
methods: pjsip_endpt_handle_events2(sip_endpoint.c) and pj_ioqueue_poll and
poll_iocp in ioqueue_winnt.c , i found it indeed loops to listen the special
socket to receive incoming package. But why it can`t receive the INVITE
packages while the Capture package tools such as Ethereal can receive them?
Can someone help me please?

Best regards,
xutm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20090713/401eadc7/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux