Hello,
On 02/15/2010 05:05 PM, Anton Roman wrote:
Hi all,
I'm trying to implement parallel forking to different users registered on a Kamailio server. I want to fork the call to a number of different users (not including the called user). To do this I added the piece of code below to the default 3.0.0 config file:
... # account only INVITEs if (is_method("INVITE")) { setflag(1); # do accounting setflag(4); #dialog aware if(avp_db_load("$ru/username","$avp(s:fork)")) { avp_pushto("$ru/username","$avp(s:fork)/g"); }; } ....
This is usr_preference table content:
+----+------+----------+--------+-----------+------+-------+---------------------+ | id | uuid | username | domain | attribute | type | value | last_modified | +----+------+----------+--------+-----------+------+-------+---------------------+ | 4 | | 1000 | | fork | 0 | 1001 | | | 3 | | 1000 | | fork | 0 | 1005 | | +----+------+----------+--------+-----------+------+-------+---------------------+
Kamailio correctly forks the call to 1001 and 1005, but the Request-URI of the 1005 user is not correctly set, because the proxy IP is used instead of the IP where the user is registered (10.1.2.15). You can see the INVITEs below.
Could anybody tell me what I'm doing badly?
apart of first destination which is set in the r-uri, the rest become branches. You have to loop back so they arrive as r-uri and location lookup resolves the user address. lookup("location") works only with r-uri.
Cheers, Daniel
Thanks for your time, best regards
Anton
# U +0.000328 10.1.20.103:5060 http://10.1.20.103:5060 -> 10.1.3.18:5061 http://10.1.3.18:5061 INVITE sip:1001@10.1.3.18:5061 http://sip:1001@10.1.3.18:5061 SIP/2.0 Record-Route: sip:10.1.20.103;lr=on;did=c34.3ed81d77 Via: SIP/2.0/UDP 10.1.20.103;branch=z9hG4bKc40b.ec3572a3.0 Via: SIP/2.0/UDP 10.1.3.15:5061;branch=z9hG4bK-213aa77 From: "1002" <sip:1002@10.1.20.103 mailto:sip%3A1002@10.1.20.103>;tag=280da520d15d62cfo1 To: "1000" <sip:1000@10.1.20.103 mailto:sip%3A1000@10.1.20.103> Call-ID: 8973c34-427096cb@10.1.3.15 mailto:8973c34-427096cb@10.1.3.15 CSeq: 102 INVITE Max-Forwards: 69 Contact: "1002" <sip:1002@10.1.3.15:5061 http://sip:1002@10.1.3.15:5061> Expires: 240 User-Agent: Linksys/SPA941-5.1.5 Content-Length: 202 Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER Supported: replaces Content-Type: application/sdp
v=0 o=- 2003696 2003696 IN IP4 10.1.3.15 ...
# U +0.000052 10.1.20.103:5060 http://10.1.20.103:5060 -> 10.1.20.103:5060 http://10.1.20.103:5060 INVITE sip:1005@10.1.20.103 mailto:sip%3A1005@10.1.20.103 SIP/2.0 Record-Route: sip:10.1.20.103;lr=on;did=c34.3ed81d77 Via: SIP/2.0/UDP 10.1.20.103;branch=z9hG4bKc40b.ec3572a3.1 Via: SIP/2.0/UDP 10.1.3.15:5061;branch=z9hG4bK-213aa77 From: "1002" <sip:1002@10.1.20.103 mailto:sip%3A1002@10.1.20.103>;tag=280da520d15d62cfo1 To: "1000" <sip:1000@10.1.20.103 mailto:sip%3A1000@10.1.20.103> Call-ID: 8973c34-427096cb@10.1.3.15 mailto:8973c34-427096cb@10.1.3.15 CSeq: 102 INVITE Max-Forwards: 69 Contact: "1002" <sip:1002@10.1.3.15:5061 http://sip:1002@10.1.3.15:5061> Expires: 240 User-Agent: Linksys/SPA941-5.1.5 Content-Length: 202 Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER Supported: replaces Content-Type: application/sdp
v=0 o=- 2003696 2003696 IN IP4 10.1.3.15 ...
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users