Yeah, looking into it.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/commit/f24eed8ba01870361d916844a073df7…
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/commit/f24eed8ba01870361d916844a073df71cbc9e609/150280974(a)github.com>
@xkaraman this change broke the build
```
cmake --build /home/runner/work/kamailio/kamailio/build -j8
[ 0%] Building C object src/modules/acc/CMakeFiles/acc.dir/acc.c.o
[ 0%] Building C object src/modules/acc/CMakeFiles/acc.dir/acc_cdr.c.o
gmake[2]: *** No rule to make target 'src/modules/xprint_doc', needed by 'src/modules/CMakeFiles/kamailio_docs'. Stop.
[ 0%] Generating cfg.tab.c and cfg.tab.h from cfg.y
gmake[1]: *** [CMakeFiles/Makefile2:3444: src/modules/CMakeFiles/kamailio_docs.dir/all] Error 2
[ 0%] Building C object src/modules/alias_db/CMakeFiles/alias_db.dir/alias_db.c.o
gmake[1]: *** Waiting for unfinished jobs....
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/commit/f24eed8ba01870361d916844a073df7…
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/commit/f24eed8ba01870361d916844a073df71cbc9e609/150280924(a)github.com>
### Description
Goal: Build a destination set from multiple contacts gathered from multiple registered AoR.
Situation: assumptions, observations:
* lookup() returns success there are registered contacts for each AoR.
* All contacts have same q value.
* lookup() can only be called for one AoR, there is no way to call it for multiple AoR.
* If lookup() is called multiple times, only the destination set gathered by the last invocation is preserved, all other ones are overwritten.
* t_load_contacts() transfers the destination set into the $xavp(tm_contacts) but like lookup() initializes that
So I am trying to find a way to store/collate all destination sets into one and parallel fork a call to all contacts from multiple AoR.
Idea: Stack all contacts in $xavp(contact_stack) with the same structure as $xavp(tm_contacts) and append it to tm_contacts.
xavp_rm("contact_stack"); # Make sure this is not defined.
We are in a loop setting $var(lookupuri) to (sip:315996608@3cx-pbx.imp.ch and sip:315996608-1@157.161.4.181) {
lookup("location", "$var(lookupuri)");
t_load_contacts(0); # Now $xavp(tm_contacts) is populated
$xavp(contact_stack) = $xavp(tm_contacts); # Store contact set
}
xavp_rm("tm_contacts"); # Re Initialize tm_contacts to empty
$xavp(tm_contacts) = $xavp(contact_stack); # Restore tm_contacts from stacked set.
xlog("L_INFO", "$cfg(route): COUNT: $cnt($xavp(tm_contacts))\n"); # Make sure, the count matches what we expect.
xlog("L_INFO", "$cfg(route): Before t_next_contacts\n");
t_next_contacts(); # Load destination set => CRASH!
xlog("L_INFO", "$cfg(route): After t_next_contacts\n");
Log (some more infos logged I omitted in the example above)
```
Dec 10 16:18:05 dev-cpereg01 kamailio[3964710]: INFO: [1 0618269314 128182546-3942836285-478214563(a)prt-cbl-sbc1.imp.ch 2 INVITE]<script>: LOCATION: Auth_aor_user[0] = 315996608
Dec 10 16:18:05 dev-cpereg01 kamailio[3964710]: INFO: [1 0618269314 128182546-3942836285-478214563(a)prt-cbl-sbc1.imp.ch 2 INVITE]<script>: LOCATION: Sigprofile[0] = local
Dec 10 16:18:05 dev-cpereg01 kamailio[3964710]: INFO: [1 0618269314 128182546-3942836285-478214563(a)prt-cbl-sbc1.imp.ch 2 INVITE]<script>: LOCATION: Lookupuri[0] = sip:315996608@3cx-pbx.imp.ch
Dec 10 16:18:05 dev-cpereg01 kamailio[3964710]: INFO: [1 0618269314 128182546-3942836285-478214563(a)prt-cbl-sbc1.imp.ch 2 INVITE]<script>: LOCATION: LOOKUP sip:315996608@3cx-pbx.imp.ch SUCCESS!!!!
Dec 10 16:18:05 dev-cpereg01 kamailio[3964710]: INFO: [1 0618269314 128182546-3942836285-478214563(a)prt-cbl-sbc1.imp.ch 2 INVITE]<script>: LOCATION: Auth_aor_user[1] = 315996608-1
Dec 10 16:18:05 dev-cpereg01 kamailio[3964710]: INFO: [1 0618269314 128182546-3942836285-478214563(a)prt-cbl-sbc1.imp.ch 2 INVITE]<script>: LOCATION: Sigprofile[1] = local
Dec 10 16:18:05 dev-cpereg01 kamailio[3964710]: INFO: [1 0618269314 128182546-3942836285-478214563(a)prt-cbl-sbc1.imp.ch 2 INVITE]<script>: LOCATION: Lookupuri[1] = sip:315996608-1@157.161.4.181
Dec 10 16:18:05 dev-cpereg01 kamailio[3964710]: INFO: [1 0618269314 128182546-3942836285-478214563(a)prt-cbl-sbc1.imp.ch 2 INVITE]<script>: LOCATION: LOOKUP sip:315996608-1@157.161.4.181 SUCCESS!!!!
Dec 10 16:18:05 dev-cpereg01 kamailio[3964710]: INFO: [1 0618269314 128182546-3942836285-478214563(a)prt-cbl-sbc1.imp.ch 2 INVITE]<script>: LOCATION: ADD to tm_contacts
Dec 10 16:18:05 dev-cpereg01 kamailio[3964710]: INFO: [1 0618269314 128182546-3942836285-478214563(a)prt-cbl-sbc1.imp.ch 2 INVITE]<script>: LOCATION: COUNT: 4
Dec 10 16:18:05 dev-cpereg01 kamailio[3964710]: INFO: [1 0618269314 128182546-3942836285-478214563(a)prt-cbl-sbc1.imp.ch 2 INVITE]<script>: LOCATION: Before t_next_contacts
Dec 10 16:18:05 dev-cpereg01 kernel: [13747450.274883] traps: kamailio[3964710] general protection fault ip:55bc00e61f2b sp:7ffce62d7520 error:0 in kamailio[55bc00ba5000+457000]
```
#### Reproduction
Code above with: version: kamailio 5.7.6 (x86_64/linux) from official kamailio repository on ubuntu jammy.
#### Debugging Data
If required, I can try to enable coredumps.
#### Log Messages
Shown above
#### SIP Traffic
Probably not needed.
### Possible Solutions
None yet.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4063
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4063(a)github.com>