- Timestamp:
- Dec 4, 2013 2:38:20 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/pjsua2/pjsip/src/pjsua2/endpoint.cpp
r4669 r4670 19 19 #include <pjsua2/endpoint.hpp> 20 20 #include <pjsua2/account.hpp> 21 #include <pjsua2/call.hpp> 21 22 #include <pjsua2/presence.hpp> 22 23 #include <algorithm> … … 487 488 } 488 489 490 Call *Endpoint::lookupCall(int call_id, const char *op) 491 { 492 Call *call = Call::lookup(call_id); 493 if (!call) { 494 PJ_LOG(1,(THIS_FILE, 495 "Error: cannot find Call instance for call id %d in " 496 "%s", call_id, op)); 497 } 498 499 return call; 500 } 501 489 502 void Endpoint::on_incoming_call(pjsua_acc_id acc_id, pjsua_call_id call_id, 490 503 pjsip_rx_data *rdata) … … 596 609 597 610 if (call_id != PJSUA_INVALID_ID) { 598 // TODO: 599 // handle call pager 600 return; 611 Call *call = lookupCall(call_id, "on_pager2()"); 612 if (!call) { 613 /* Ignored */ 614 return; 615 } 616 617 call->onInstantMessage(prm); 601 618 } else { 602 619 Account *acc = lookupAcc(acc_id, "on_pager2()"); … … 632 649 633 650 if (call_id != PJSUA_INVALID_ID) { 634 // TODO: 635 // handle call pager 651 Call *call = lookupCall(call_id, "on_pager_status2()"); 652 if (!call) { 653 /* Ignored */ 654 return; 655 } 656 657 call->onInstantMessageStatus(prm); 636 658 } else { 637 659 Account *acc = lookupAcc(acc_id, "on_pager_status2()"); … … 661 683 662 684 if (call_id != PJSUA_INVALID_ID) { 663 // TODO: 664 // handle call indication 685 Call *call = lookupCall(call_id, "on_typing2()"); 686 if (!call) { 687 /* Ignored */ 688 return; 689 } 690 691 call->onTypingIndication(prm); 665 692 } else { 666 693 Account *acc = lookupAcc(acc_id, "on_typing2()"); … … 722 749 pjsip_event *e) 723 750 { 751 PJ_UNUSED_ARG(tsx); 752 724 753 Call *call = Call::lookup(call_id); 725 754 if (!call) { … … 858 887 prm.statusCode = (pjsip_status_code)st_code; 859 888 prm.reason = pj2Str(*st_text); 860 prm.finalNotify = final;861 prm.cont = *p_cont;889 prm.finalNotify = PJ2BOOL(final); 890 prm.cont = PJ2BOOL(*p_cont); 862 891 863 892 call->onCallTransferStatus(prm); … … 910 939 pjsua_call_setting *opt) 911 940 { 941 PJ_UNUSED_ARG(reserved); 942 912 943 Call *call = Call::lookup(call_id); 913 944 if (!call) {
Note: See TracChangeset
for help on using the changeset viewer.