I found the root cause of it. This is because I am terminating sessions on Kamailio, by sending 200 ok from config. I don’t specify callee “Contact” at that point. Even though there are active chat sessions,
dialog are not shown with cmd below.
I am attaching relevant config below -
Questions:
1.
Can dlg_refer work without callee contact details? Or
2.
Should I make up some contact and put in the 200 OK below Or
3.
Should I handcraft a REFER message and send to caller instead?
Please advise.
Config section:
sl_send_reply("100", "Trying");
sl_send_reply("180", "Ringing");
append_to_reply("Record-Route: <sip:MY_PUBLICIP_ADDR:$Rp;lr;nat=yes>\r\n");
pv_printf("$var(sessid)", "s.$(pp).$(var(cnt)).$(RANDOM)");
$var(rbody) = "v=0\r\n";
$var(rbody) = $var(rbody) + "o=- 3688213899 3688213900 IN IP4 MY_IP_ADDR\r\n";
$var(rbody) = $var(rbody) + "s=Kamailio\r\n";
$var(rbody) = $var(rbody) + "t=0 0\r\n";
$var(rbody) = $var(rbody) + "m=message 2855 TCP/TLS/MSRP *\r\n";
$var(rbody) = $var(rbody) + "c=IN IP4 MY_IP_ADDR\r\n";
$var(rbody) = $var(rbody) + "a=path:msrps://MY_IP_ADDR:MY_MSRP_PORT/" + $var(sessid) + ";tcp\r\n";
$var(rbody) = $var(rbody) + "a=accept-types:message/cpim text/* image/* application/im-iscomposing+xml\r\n";
$var(rbody) = $var(rbody) + "a=accept-wrapped-types:text/* image/* application/im-iscomposing+xml\r\n";
$var(rbody) = $var(rbody) + "a=setup:passive\r\n";
set_reply_body("$var(rbody)", "application/sdp");
sl_send_reply("200", "OK");
Thanks
Pranathi
From: Daniel-Constantin Mierla [mailto:miconda@gmail.com]
Sent: Friday, May 05, 2017 2:43 AM
To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>; Pranathi Venkatayogi <pvenkatayogi@cyracom.com>
Subject: Re: [SR-Users] How does dlg_bridge work?
Hello,
is the dialog already answered at that time? Can you see it via kamcmd dlg.list ?
Cheers,
Daniel
On 04.05.17 22:48, Pranathi Venkatayogi wrote:
When I use dlg_refer I get the following error:
2689 May 4 16:09:56 devsip00 /sbin/kamailio[24617]: exec: *** cfgtrace:failure_route=[HTTP_ALLOCATE_RESPONSE] c=[routingdev.cfg] l=567 a=26 n=dlg_refer
2690 May 4 16:09:56 devsip00 /sbin/kamailio[24617]: DEBUG: dialog [dlg_hash.c:690]: dlg_lookup(): ref dlg 0x7f92d19835e8 with 1 -> 2
2691 May 4 16:09:56 devsip00 /sbin/kamailio[24617]: DEBUG: dialog [dlg_hash.c:692]: dlg_lookup(): dialog id=10603 found on entry 2058
2692 May 4 16:09:56 devsip00 /sbin/kamailio[24617]: DEBUG: dialog [dlg_hash.c:452]: build_new_dlg(): new dialog on hash 2058
2693 May 4 16:09:56 devsip00 /sbin/kamailio[24617]: ERROR: dialog [dlg_req_within.c:85]: build_dlg_t(): no contact available
2694 May 4 16:09:56 devsip00 /sbin/kamailio[24617]: ERROR: dialog [dlg_transfer.c:188]: dlg_refer_callee(): failed to create dlg_t
2695 May 4 16:09:56 devsip00 /sbin/kamailio[24617]: DEBUG: dialog [dlg_hash.c:922]: dlg_unref_helper(): unref op on 0x7f92d19835e8 with 1 from dlg_hash.c:940
From: Pranathi Venkatayogi
Sent: Thursday, May 04, 2017 5:28 AM
To: 'Kamailio (SER) - Users Mailing List' <sr-users@lists.kamailio.org>
Subject: How does dlg_bridge work?
I have a TEXT call from cust1@somedomain to Kamailio. I have an agent who is logged in, but is not in any call yet.
I want now refer cust1@somedomain to talk to agent directly. How do I do that?
I tried - dlg_bridge("$dlg(from_contact)", "$var(agentSipAddress)","");
I get an “audio call” from “Kamailio” to customer, but nothing happens on the agent side.
I tried “dlg_refer” as well but nothing happens at all.
Should I handcraft “Refer” message using uac module and send to “customer” instead?
Please suggest.
Thanks
Pranathi Venkatayogi
System Developer II
(520) 745-9447 x4466
DISCLAIMER: This e-mail and any attached content may contain confidential or privileged material delivered for the sole use of the intended recipient(s). Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender immediately by reply e-mail and delete all copies of this message. It is the recipient's responsibility to scan this e-mail and any attachments for viruses. The content of this e-mail message, including any attachments, does not comprise a contract or a portion of a contract, and so does not bind CyraCom International, Inc. or any of its agents or subsidiaries. CyraCom, LLC and Voiance Language Services, LLC are wholly owned subsidiaries of CyraCom International, Inc.
_______________________________________________Kamailio (SER) - Users Mailing Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com