<HTML><HEAD>
<META content="text/html charset=windows-1254" http-equiv=Content-Type></HEAD>
<BODY
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space"
dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: 'Calibri'; COLOR: #000000"><D
IV>Hi,</DIV><D IV>Thanks for the response.I realized that http_query can not
resolve the domain.When I use ip address instead of domain name I get no
error.Is there any module other than http_query module that I can use with web
service?</DIV><D IV>
<DIV></DIV><D IV>Best Regards
<DIV></DIV><D style="FONT-SIZE: 12pt; FONT-FAMILY: 'Calibri'; COLOR: #000000"
IV><D
style='FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: "Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; DISPLAY: inline'
IV>
<DIV></DIV>
<DIV></DIV><D style="FONT-SIZE: 12pt; FONT-FAMILY: 'Calibri'; COLOR: #000000"
IV><D
style='FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: "Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; DISPLAY: inline'
IV>
<DIV></DIV><D style="FONT: 10pt Tahoma" IV><D style="BACKGROUND: #f5f5f5" IV><D
style="font-color: black" IV><B>From:</B> <A title=davy.van.de.moere@gmail.com
href="mailto:davy.van.de.moere@gmail.com">davy</A>
<DIV></DIV><D IV><B>Sent:</B> Tuesday, August 12, 2014 5:28 PM
<DIV></DIV><D IV><B>To:</B> <A title=sr-users@lists.sip-router.org
href="mailto:sr-users@lists.sip-router.org">Kamailio (SER) - Users Mailing
List</A>
<DIV></DIV><D IV><B>Subject:</B> Re: [SR-Users] Dialog module event_route
problem
<DIV></DIV>
<DIV></DIV>
<DIV></DIV><D IV>
<DIV></DIV>
<DIV></DIV><D
style='FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: "Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; DISPLAY: inline'
IV>why don’t you hook your http_queries up to the relevant SIP packets passing
by? <D IV>
<DIV></DIV><D IV>INVITE -> start
<DIV></DIV><D IV>180/183 -> ringing
<DIV></DIV><D IV>200 -> pickup
<DIV></DIV><D IV>BYE/CANCEL -> end
<DIV></DIV><D IV>
<DIV></DIV><D IV>It’s quite straightforward to get that cleanly in your
configfile, and it give you a massive control over things. (just be aware of
packets arriving twice ;) )
<DIV></DIV><D IV>
<DIV></DIV><D IV>Anyhow, that’s how I typically handle this one. You can always
also combine it with CNXCC, which is great for prepaid! Or do something from
external with dlg.dlg_end to kill specific calls which are going over their
limit.
<DIV></DIV><D IV>
<DIV></DIV><D IV>But, I’m sure others will have even better ideas !
<DIV></DIV><D IV>
<DIV></DIV><D IV>Grtz,
<DIV></DIV><D IV>Davy Van De Moere
<DIV></DIV><D IV>
<DIV></DIV><D IV><D IV>
<DIV></DIV><D IV><D IV>Op 12-aug.-2014, om 15:00 heeft <<A
href="mailto:betul.cerit@netgsm.com.tr">betul.cerit@netgsm.com.tr</A>> <<A
href="mailto:betul.cerit@netgsm.com.tr">betul.cerit@netgsm.com.tr</A>> het
volgende geschreven:
<DIV></DIV><BR class=Apple-interchange-newline>
<BLOCKQUOTE type="cite"><D dir=ltr IV><D dir=ltr IV><D
style="FONT-SIZE: 12pt; FONT-FAMILY: Calibri" IV><D iv="">Hello;</D>
<DIV></DIV><D iv=""></D>
<DIV></DIV><D iv="">I am trying to build a prepaid accounting system. I use
dialog module's <D IV>
<DIV></DIV><D iv="">start/end event-route. When even_route[dialog:started]
triggered, a <D IV>
<DIV></DIV><D iv="">http_query works for the started call. When
event_route[dialog:end] triggered , a <D IV>
<DIV></DIV><D iv="">http_query works for call is ended. When http_query
works in <D IV>
<DIV></DIV><D iv="">event_route[dialog:started], i get some CRITICAL ERROR
like <D IV>
<DIV></DIV><D iv="">'Aug 12 12:16:09
/usr/local/sbin/kamailio[10151]: CRITICAL: dialog <D IV>
<DIV></DIV><D iv="">[dlg_timer.c:205]: update_dlg_timer(): Trying to update a
bogus dlg <D IV>
<DIV></DIV><D iv="">tl=0x7f7634d925d8 tl->next=(nil) tl->prev=(nil)' <D
IV>
<DIV></DIV><D iv="">'Aug 12 12:16:09
/usr/local/sbin/kamailio[10151]: ERROR: dialog <D IV>
<DIV></DIV><D iv="">[dlg_handlers.c:1263]: dlg_onroute(): failed to update
dialog lifetime' <D IV>
<DIV></DIV><D iv="">Http_query works very well. I can get all call information
on Web <D IV>
<DIV></DIV><D iv="">Servers but default_time out or other timeout isn't
working. <D IV>
<DIV></DIV><D iv=""><D IV>
<DIV></DIV><D iv="">After i commented out http_query in
event_route[dialog:started] , it stopped giving <D IV>
<DIV></DIV><D iv="">ERROR but i realized that dialog cannot uptade dialog hash
map .I can see all finished call with "kamctl dialog show". After i closed <D
IV>
<DIV></DIV><D iv="">http_query in even_route[dialog:end] , all problems are
solved. <D IV>
<DIV></DIV><D iv="">I think a problem occured between http_query and dialog
event_routes.It <D IV>
<DIV></DIV><D iv="">cannot control dialog lifetime.Any idea about this problem
or suggest an alternative way will be appreciated.My configuration is as
follows. <D IV>
<DIV></DIV><D iv=""><D IV>
<DIV></DIV><D iv="">Best Regards <D IV>
<DIV></DIV><D iv="">Betül. <D IV>
<DIV></DIV><D iv=""><D IV>
<DIV></DIV><D iv="">#---------------- dialog params ------------- <D IV>
<DIV></DIV><D iv="">#!ifdef WITH_DIALOG <D IV>
<DIV></DIV><D iv="">modparam("dialog", "enable_stats", 1) <D IV>
<DIV></DIV><D iv="">modparam("dialog", "hash_size", 8192) <D IV>
<DIV></DIV><D iv="">modparam("dialog", "rr_param", "did") <D IV>
<DIV></DIV><D iv="">modparam("dialog", "dlg_flag",4) <D IV>
<DIV></DIV><D iv="">modparam("dialog", "timeout_avp", "$avp(i:10)") <D IV>
<DIV></DIV><D iv="">modparam("dialog", "dlg_match_mode", 1) <D IV>
<DIV></DIV><D iv="">modparam("dialog", "default_timeout", 3600) <D IV>
<DIV></DIV><D iv="">modparam("dialog", "detect_spirals", 1) <D IV>
<DIV></DIV><D iv="">modparam("dialog", "profiles_with_value", "userid ; opkodu
; useropkodu ") <D IV>
<DIV></DIV><D iv="">modparam("dialog", "dlg_extra_hdrs", "Hint: Hell
Yeah\r\n") <D IV>
<DIV></DIV><D iv="">modparam("dialog", "send_bye", 1) <D IV>
<DIV></DIV><D iv="">#!endif <D IV>
<DIV></DIV><D iv=""><D IV>
<DIV></DIV><D iv="">route[CHCK_DLG]{ <D IV>
<DIV></DIV><D iv=""><D IV>
<DIV></DIV><D iv="">xlog("L_INFO","DLG:AVP=>
:>:$avp(i:77):$avp(op_kodu):$avp(i:69) "); <D IV>
<DIV></DIV><D iv=""><D IV>
<DIV></DIV><D
iv="">
$dlg_ctx(timeout_bye)=1; <D IV>
<DIV></DIV><D
iv="">
$avp(unique_id)=$sruid; <D IV>
<DIV></DIV><D iv=""><D IV>
<DIV></DIV><D
iv="">
/* Time out suresi i:10 konusabilecegi sure saniye */ <D IV>
<DIV></DIV><D
iv="">
$avp(i:10)=0; <D IV>
<DIV></DIV><D
iv="">
$avp(i:10)=(int)$avp(i:77); <D IV>
<DIV></DIV><D
iv="">
#$avp(i:10)=10; <D IV>
<DIV></DIV><D
iv="">
$dlg_ctx(timeout_route)=33; <D IV>
<DIV></DIV><D
iv="">
$dlg_var(uniqueid)=$avp(unique_id); <D IV>
<DIV></DIV><D
iv="">
$dlg_var(userid)=$avp(userid); <D IV>
<DIV></DIV><D
iv="">
$dlg_var(opkodu)=$avp(op_kodu); <D IV>
<DIV></DIV><D iv=""><D IV>
<DIV></DIV><D iv=""><D IV>
<DIV></DIV><D
iv="">
set_dlg_profile("userid","$avp(userid)"); <D IV>
<DIV></DIV><D
iv="">
set_dlg_profile("opkodu","$avp(op_kodu)"); <D IV>
<DIV></DIV><D
iv="">set_dlg_profile("useropkodu","$avp(userid):$avp(op_kodu)"); <D IV>
<DIV></DIV><D iv=""><D IV>
<DIV></DIV><D iv=""><D IV>
<DIV></DIV><D iv="">if(get_profile_size("useropkodu","$avp(d_user_opkodu)")){
<D IV>
<DIV></DIV><D iv="">xlog("L_INFO","Userid_Size:$avp(d_user_opkodu) kk : <D IV>
<DIV></DIV><D iv="">$avp(userid):$avp(op_kodu) "); <D IV>
<DIV></DIV><D
iv="">xlog("L_INFO","Userid_Limit:$sht(sayac=>$avp(userid):$avp(op_kodu))");
<D IV>
<DIV></DIV><D iv=""><D IV>
<DIV></DIV><D
iv="">if(!($sht(sayac=>$avp(userid):$avp(op_kodu))>$avp(d_user_opkodu))){
<D IV>
<DIV></DIV><D iv="">sl_send_reply("403","Kapasite Asildi."); <D IV>
<DIV></DIV><D
iv="">
exit; <D IV>
<DIV></DIV><D
iv="">
} <D IV>
<DIV></DIV><D
iv="">
} <D IV>
<DIV></DIV><D iv=""><D IV>
<DIV></DIV><D
iv="">
dlg_manage(); <D IV>
<DIV></DIV><D iv=""><D IV>
<DIV></DIV><D iv=""> return;
<D IV>
<DIV></DIV><D iv="">} <D IV>
<DIV></DIV><D iv=""><D IV>
<DIV></DIV><D iv=""><D IV>
<DIV></DIV><D iv=""><D IV>
<DIV></DIV><D iv="">event_route[dialog:start]{ <D IV>
<DIV></DIV><D
iv="">xlog("L_ALERT","START:CI:$dlg(callid):u_id:$dlg_var(uniqueid):U_id:$dlg_var(userid)
<D IV>
<DIV></DIV><D iv="">"); <D IV>
<DIV></DIV><D
iv="">xlog("L_ALERT","START:lifetime:$avp(i:10):opkodu:$dlg_var(opkodu):$avp(aranan)"
<D IV>
<DIV></DIV><D iv="">); <D IV>
<DIV></DIV><D iv=""><D IV>
<DIV></DIV><D iv="">#!ifdef WITH_UTILS <D IV>
<DIV></DIV><D iv="">$var(http_res)=http_query("<A
href="http://bla.com/somestuff.php?userid=">http://bla.com/somestuff.php?userid=</A>$avp(userid)&aranan=$avp(aranan)&callid=$ci&uniqueid=$dlg_var(uniqueid)&lifetime=$avp(i:10)&opkodu=$dlg_var(opkodu)","$var(result)");
<D IV>
<DIV></DIV><D iv=""><D IV>
<DIV></DIV><D iv="">
if($var(http_res)=="200"){ <D IV>
<DIV></DIV><D
iv="">
json_get_field("$var(result)","sonuc","$var(snc)"); <D IV>
<DIV></DIV><D iv="">json_get_field("$var(result)","yorum","$var(yorum)"); <D
IV>
<DIV></DIV><D iv="">json_get_field("$var(result)","yorum","$var(debug)"); <D
IV>
<DIV></DIV><D
iv="">
if($var(snc)!=200){ <D IV>
<DIV></DIV><D
iv="">xlog("L_ERR","START:CI:$ci:Sonuc:$var(snc):Yorum:$var(yorum):Debug:$var(debug)");
<D IV>
<DIV></DIV><D
iv="">
}else{ <D IV>
<DIV></DIV><D iv="">xlog("L_INFO","START:CI:$ci:Sonuc:$var(snc)"); <D IV>
<DIV></DIV><D
iv="">
} <D IV>
<DIV></DIV><D iv=""> }else{ <D
IV>
<DIV></DIV><D iv="">xlog("L_ERR","START:CI:$ci:HTTP_RESULT:$var(http_res)");
<D IV>
<DIV></DIV><D iv=""> } <D IV>
<DIV></DIV><D iv="">#!endif <D IV>
<DIV></DIV><D iv="">} <D IV>
<DIV></DIV><D iv=""><D IV>
<DIV></DIV><D iv=""><D IV>
<DIV></DIV><D iv=""><D IV>
<DIV></DIV><D iv=""><D IV>
<DIV></DIV><D iv="">event_route[dialog:end]{ <D IV>
<DIV></DIV><D iv=""><D IV>
<DIV></DIV><D iv="">
xlog("L_ALERT","END <D IV>
<DIV></DIV><D
iv="">::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :"); <D
IV>
<DIV></DIV><D
iv="">xlog("L_ALERT","END:CI:$ci:START_TIME:$dlg(start_ts):NOW:$TS"); <D IV>
<DIV></DIV><D iv="">
$var(billsec)=$TS-$dlg(start_ts); <D IV>
<DIV></DIV><D iv="">
xlog("L_ALERT","END:SURE : $var(billsec): u_id: <D IV>
<DIV></DIV><D iv="">$dlg_var(uniqueid):code:$T_reply_code:$DLG_status
"); <D IV>
<DIV></DIV><D
iv="">xlog("L_ALERT","END:U_ID:$dlg_var(userid):O_Kodu:$dlg_var(opkodu):"); <D
IV>
<DIV></DIV><D iv=""><D IV>
<DIV></DIV><D iv="">
if($var(billsec)<0){ <D IV>
<DIV></DIV><D
iv="">
$var(billsec)=$DLG_lifetime; <D IV>
<DIV></DIV><D
iv="">
xlog("L_ERR","START:CI:$ci:Billsec Negatif geldi : <D IV>
<DIV></DIV><D iv="">lifetime alinacak:$DLG_lifetime"); <D IV>
<DIV></DIV><D iv=""> } <D IV>
<DIV></DIV><D iv=""><D IV>
<DIV></DIV><D iv=""><D IV>
<DIV></DIV><D iv="">#!ifdef WITH_UTILS <D IV>
<DIV></DIV><D iv=""><D IV>
<DIV></DIV><D iv="">$var(http_res)=http_query("<A
href="http://bla.com/somestuff.php?uniqueid=">http://bla.com/somestuff.php?uniqueid=</A>$dlg_var(uniqueid)&billsec=$var(billsec)","$var(result)");
<D IV>
<DIV></DIV><D iv=""><D IV>
<DIV></DIV><D iv="">
if($var(http_res)=="200"){ <D IV>
<DIV></DIV><D
iv="">
json_get_field("$var(result)","sonuc","$var(snc)"); <D IV>
<DIV></DIV><D iv="">json_get_field("$var(result)","yorum","$var(yorum)"); <D
IV>
<DIV></DIV><D iv="">json_get_field("$var(result)","yorum","$var(debug)"); <D
IV>
<DIV></DIV><D
iv="">
if($var(snc)!=200){ <D IV>
<DIV></DIV><D
iv="">xlog("L_ERR","START:CI:$ci:Sonuc:$var(snc):Yorum:$var(yorum):Debug:$var(debug)");
<D IV>
<DIV></DIV><D
iv="">
} <D IV>
<DIV></DIV><D iv=""> }else{ <D
IV>
<DIV></DIV><D iv="">xlog("L_ERR","START:CI:$ci:HTTP_RESULT:$var(http_res)");
<D IV>
<DIV></DIV><D iv=""> } <D IV>
<DIV></DIV><D iv="">#!endif <D IV>
<DIV></DIV><D iv="">
xlog("L_ALERT","END <D IV>
<DIV></DIV><D
iv="">::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :"); <D
IV>
<DIV></DIV><D iv="">} <D IV>
<DIV></DIV><D style="FONT-SIZE: 12pt; FONT-FAMILY: calibri" iv=""><D IV>
<DIV></DIV><D IV>
<DIV></DIV><D IV>
<DIV></DIV></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D></D>
<DIV></DIV>_______________________________________________<BR>SIP Express
Router (SER) and Kamailio (OpenSER) - sr-users mailing list<BR><A
href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</A><BR>http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users<BR></BLOCKQUOTE>
<DIV></DIV><D IV>
<DIV></DIV>
<DIV></DIV>
<P>
<HR>
_______________________________________________<BR>SIP Express Router (SER) and
Kamailio (OpenSER) - sr-users mailing
list<BR>sr-users@lists.sip-router.org<BR>http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users<BR>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV></BODY></HTML>