Heya,
I've found this code for detecting if two clients are behind the same NAT from the AVPops documentation: ... # get to the final RURI if (!lookup("location")) { sl_send_reply("404","Not found"); break; } # get the host part of the final uri (IP part) and store it in AVP ID 13 avp_write("$ruri/domain", "i:13"); if (avp_check("i:13","eq/$src_ip/i")) { # source IP is the same as destination IP ........... } avp_delete("i:13/g"); ...
I'm trying to apply this in my situation with an external registrar, and I can't think of a way I can make this fit. The basic call flow is: UAC->SER (INVITE) SER->REGISTRAR (INVITE) REGISTRAR->SER (Trying/302 Moved) SER->UAC (INVITE) UAC->SER (Trying/OK) SER->UAC (ACK)
This uses the Contact header in the returned response from the registrar to provide serial forking, etc. I can't see how to make this work - the only thought I have is that I may be able to leave the original SDP header intact on the invite to the registrar, and then only fix the SDP header in the INVITE sent to the UAC AFTER the 302 moved, by using the onbranch_route (as we should now have both dest/source). I think I tried something like this though and it didn't work. Any ideas, is my logic correct?
Cheers, Chris.