<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello,</p>
<p>the dialog is inserted inside the database on 200ok. When you
have the initial INVITE in processing, use $ci to get the call id.</p>
<p>Cheers,<br>
Daniel<br>
</p>
<br>
<div class="moz-cite-prefix">On 18.10.17 13:52, mahsa _a_ wrote:<br>
</div>
<blockquote type="cite"
cite="mid:876643743.518395.1508327537540@mail.yahoo.com">
<div style="color:#000; background-color:#fff; font-family:標楷體,
dfkai-sb;font-size:16px">
<div id="yui_3_16_0_ym19_1_1508324803476_3374">hi all;</div>
<div id="yui_3_16_0_ym19_1_1508324803476_3993" dir="ltr">i want
to write "billing" project with kamailio,i using
python,postgresql, </div>
<pre id="yui_3_16_0_ym19_1_1508324803476_3996">dialog module and falcon.my problem is in "call_id" section.</pre>
<div id="yui_3_16_0_ym19_1_1508324803476_3590" dir="ltr">my
code(this section) is in python :</div>
<div id="yui_3_16_0_ym19_1_1508324803476_4159" dir="ltr"><br>
</div>
<div id="yui_3_16_0_ym19_1_1508324803476_3589" dir="ltr">"""</div>
<div id="yui_3_16_0_ym19_1_1508324803476_4378" dir="ltr">.</div>
<div id="yui_3_16_0_ym19_1_1508324803476_4498" dir="ltr">.</div>
<div id="yui_3_16_0_ym19_1_1508324803476_4379" dir="ltr">.<br>
</div>
<div id="yui_3_16_0_ym19_1_1508324803476_4232" dir="ltr">if
(method == 'INVITE'):<br
id="yui_3_16_0_ym19_1_1508324803476_3567">
callid =
req.get_param_as_list("call_id")<br
id="yui_3_16_0_ym19_1_1508324803476_3568">
print(req.get_param_as_list("Ts")) <br
id="yui_3_16_0_ym19_1_1508324803476_3569">
print("call id = %s " % callid)</div>
<div id="yui_3_16_0_ym19_1_1508324803476_3605" dir="ltr"><br>
</div>
<div id="yui_3_16_0_ym19_1_1508324803476_4185" dir="ltr">elif
(method == 'ACK'): <br
id="yui_3_16_0_ym19_1_1508324803476_3574">
time_req =
int(req.get_param_as_list("Ts")[0])<br
id="yui_3_16_0_ym19_1_1508324803476_3575">
callid =
req.get_param_as_list("call_id")[0]<br
id="yui_3_16_0_ym19_1_1508324803476_3576">
print("user %s call to %s at time %d %
(from_user,to_user,time_req))</div>
<div id="yui_3_16_0_ym19_1_1508324803476_3871" dir="ltr">.</div>
<div id="yui_3_16_0_ym19_1_1508324803476_4234" dir="ltr">.</div>
<div id="yui_3_16_0_ym19_1_1508324803476_4186" dir="ltr">.
<br>
</div>
<div id="yui_3_16_0_ym19_1_1508324803476_4235" dir="ltr">"""<br>
</div>
<div id="yui_3_16_0_ym19_1_1508324803476_3833" dir="ltr">and in
kamailio.cfg:</div>
<div id="yui_3_16_0_ym19_1_1508324803476_3835" dir="ltr"><br>
</div>
<div id="yui_3_16_0_ym19_1_1508324803476_3880" dir="ltr">"""</div>
<div id="yui_3_16_0_ym19_1_1508324803476_4532" dir="ltr">http_query(<a class="moz-txt-link-rfc2396E" href="http://127.0.0.1:5000/test?method=$rm& call_id=$dlg(callid)&Ts=$Ts&fu=$fu&tu=$tu">"http://127.0.0.1:5000/test?method=$rm&
call_id=$dlg(callid)&Ts=$Ts&fu=$fu&tu=$tu"</a>,"$var(result)");</div>
<div id="yui_3_16_0_ym19_1_1508324803476_3889" dir="ltr"><br>
</div>
<div id="yui_3_16_0_ym19_1_1508324803476_3891" dir="ltr">""""</div>
<div id="yui_3_16_0_ym19_1_1508324803476_3925" dir="ltr"><br>
</div>
<div id="yui_3_16_0_ym19_1_1508324803476_4147" dir="ltr">"callid"
in ACK is ok but "callid' in invite is "null", where is my
problem?</div>
<div id="yui_3_16_0_ym19_1_1508324803476_4149" dir="ltr"><br>
</div>
<div id="yui_3_16_0_ym19_1_1508324803476_4150" dir="ltr">thanks.<br>
</div>
<div id="yui_3_16_0_ym19_1_1508324803476_3927" dir="ltr"><br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training, Nov 13-15, 2017, in Berlin - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
</body>
</html>