comparison sip-in/call_list.c @ 62:75b7a7b61824

sip-in: got as far as sending MNCC_SETUP_REQ to themwi-mncc
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 17 Sep 2022 18:43:08 -0800
parents 02761f1ae5e5
children e5aee661e3b2
comparison
equal deleted inserted replaced
61:e12036337412 62:75b7a7b61824
24 for (call = call_list; call; call = call->next) 24 for (call = call_list; call; call = call->next)
25 if (!strcmp(call->sip_call_id, sought_id)) 25 if (!strcmp(call->sip_call_id, sought_id))
26 return call; 26 return call;
27 return 0; 27 return 0;
28 } 28 }
29
30 struct call *
31 find_call_by_mncc_callref(callref)
32 uint32_t callref;
33 {
34 struct call *call;
35
36 for (call = call_list; call; call = call->next)
37 if (call->mncc_active && call->mncc_callref == callref)
38 return call;
39 return 0;
40 }
41
42 allocate_mncc_callref(call)
43 struct call *call;
44 {
45 static uint32_t next_callref;
46
47 for (;;) {
48 next_callref++;
49 if (!find_call_by_mncc_callref(next_callref)) {
50 call->mncc_active = 1;
51 call->mncc_callref = next_callref;
52 return(0);
53 }
54 }
55 }