On Tue, May 10, 2011 at 3:54 PM, JR Richardson jmr.richardson@gmail.com wrote:
Hi All,
Been playing around with the dialog module to help me keep track of SIP trunk utilization, trying to identify how many calls are active on each SIP trunk. My dialog count for inbound calls is 10 (correct) but my outbound calls are always double that and I'm not sure why. Here is a snip of my config:
loadmodule "dialog.so"
if($rU=~"^111") { dlg_manage(); dlg_setflag("4"); set_dlg_profile("inbound","trunk111"); route(PDT); exit; }
PDT lookup for prefix then call is forwarded to dispatcher to route out to carrier through 'route[relay]'
route[RELAY] { dlg_setflag("4"); set_dlg_profile("outbound","$rd");
if (!t_relay()) { sl_reply_error(); exit; } exit; }
I setup 10 active calls and here are my results:
test-sip-router2:~# kamctl fifo profile_get_size inbound profile:: name=inbound value= count=10
test-sip-router2:~# kamctl fifo profile_get_size outbound profile:: name=outbound value= count=20
Also 'kamctl fifo dlg_list' will list only 10 active dialogs.
So my question is, why am I getting a 20 count for outbound and only 10 count for inbound?
Thanks.
JR
I think I answered my own question, the double dialogs for the outbound calls is a result of loose route response from the outbound SIP Trunk carrier upstream using route[relay]. I guess I need to be a bit more careful where I put my dialog flags for outbound trunk counting.
JR