[OpenSIPS-Users] how to debug many dialogs stuck in state 5?

2024-03-20 Thread Babak Yakhchali
Hi
When calling and immediately cancelling, the call is ended but dlg_list
shows the dialog stuck in state 5. Increasing log level to 4 shows these
messages:
Mar 13 15:15:37 : DBG:tm:timer_routine: timer routine:3,tl=0x7f1c861d06e0
next=(nil), timeout=26
Mar 13 15:15:37 : DBG:tm:delete_handler: removing 0x7f1c861d0630
Mar 13 15:15:37 : DBG:tm:delete_cell: delete_cell 0x7f1c861d0630: can't
delete -- still reffed (-1)
Mar 13 15:15:37 : DBG:tm:set_timer: relative timeout is 2
Mar 13 15:15:37 : DBG:tm:insert_timer_unsafe: [3]: 0x7f1c861d06e0 (28)
Mar 13 15:15:37 : DBG:tm:delete_handler: done
Mar 13 15:15:39 : DBG:tm:timer_routine: timer routine:3,tl=0x7f1c861d06e0
next=(nil), timeout=28
Mar 13 15:15:39 : DBG:tm:delete_handler: removing 0x7f1c861d0630
Mar 13 15:15:39 : DBG:tm:delete_cell: delete_cell 0x7f1c861d0630: can't
delete -- still reffed (-1)
Mar 13 15:15:39 : DBG:tm:set_timer: relative timeout is 2
Mar 13 15:15:39 : DBG:tm:insert_timer_unsafe: [3]: 0x7f1c861d06e0 (30)
Mar 13 15:15:39 : DBG:tm:delete_handler: done

How can I debug the issue? What are the possible causes of this?
thanks
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] can not get uac_redirect to work

2022-11-15 Thread Babak Yakhchali
Hi
I'm tryin to handle 302 redirect replies to opensips, In my failure route I
have this:

if (t_check_status("30[12]") && $(hdr(X-xferByCharger))== "true") {

  xlog("failure_route: redirect by charger to $(hdr(Contact))");
  

  if (get_redirects(1,1)){
  xlog("failure_route: after redirect ru:$ru and du:$du");
   t_relay();
  }
exit;
}

and the 302 msg is:
2022/11/15 15:29:25.253868 10.0.0.82:5060 -> 10.0.0.192:5060
SIP/2.0 302 Moved Temporarily
Via: SIP/2.0/UDP 10.0.0.192:5060;branch=z9hG4bK4897.63b48a64.0
Via: SIP/2.0/UDP 172.18.120.236:49276
;received=80.191.36.252;rport=49276;branch=z9hG4bK14771
Max-Forwards: 69
From: "" ;tag=5447
To: ;tag=6Dyya5c1yvpQK
Call-ID: 21726
CSeq: 20 INVITE
*Contact: "unknown" >*
User-Agent: FreeSWITCH-mod_sofia/1.9.0+git~20190122T161705Z~5ac757ce54~64bit
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER,
REFER, NOTIFY
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, refer
Reason: Q.850;cause=31;text="NORMAL_UNSPECIFIED"
Content-Length: 0

and opensips logs:
Nov 15 15:52:12 lta-opensips-stage /usr/sbin/opensips[40099]:
DBG:uac_redirect:get_redirect: resume branch=0
Nov 15 15:52:12 lta-opensips-stage /usr/sbin/opensips[40099]:
DBG:uac_redirect:get_redirect: checking branch=0 (added=0)
Nov 15 15:52:12 lta-opensips-stage /usr/sbin/opensips[40099]:
DBG:uac_redirect:get_redirect: branch=0 is a redirect (added=0)
Nov 15 15:52:12 lta-opensips-stage /usr/sbin/opensips[40099]:
DBG:core:parse_headers: flags=
*Nov 15 15:52:12 lta-opensips-stage /usr/sbin/opensips[40099]:
DBG:uac_redirect:sort_contacts: sort_contacts: http://sip:123456@10.0.0.82:5060>> q=10*
Nov 15 15:52:12 lta-opensips-stage /usr/sbin/opensips[40099]:
DBG:uac_redirect:shmcontact2dset: 1 contacts remaining after filtering and
sorting
Nov 15 15:52:12 lta-opensips-stage /usr/sbin/opensips[40099]:
DBG:uac_redirect:shmcontact2dset: adding contact 
Nov 15 15:52:12 lta-opensips-stage /usr/sbin/opensips[40099]:
DBG:core:pv_get_dsturi: no destination URI
Nov 15 15:52:12 lta-opensips-stage /usr/sbin/opensips[40099]:
DBG:tracer:is_id_traced: trace=on dyn=off
Nov 15 15:52:12 lta-opensips-stage /usr/sbin/opensips[40099]:
DBG:tracer:is_id_traced: trace=on dyn=off
Nov 15 15:52:12 lta-opensips-stage /usr/sbin/opensips[40099]:
DBG:tracer:sip_context_trace_impl: name hep_tid, hash 1710534437, type 0,
traceable on
Nov 15 15:52:12 lta-opensips-stage /usr/sbin/opensips[40099]:
DBG:proto_hep:add_hep_chunk: Chunk with (id=17; vendor=0) not found!
Creating!
Nov 15 15:52:12 lta-opensips-stage /usr/sbin/opensips[40099]:
DBG:proto_hep:add_hep_chunk: Hep chunk with (id=17; vendor=0) successfully
built!
Nov 15 15:52:12 lta-opensips-stage /usr/sbin/opensips[40099]:
DBG:core:mk_proxy: doing DNS lookup...
Nov 15 15:52:12 lta-opensips-stage /usr/sbin/opensips[40099]:
failure_route: after redirect *ru:sip:123456@10.0.0.82:5060
 and du:*

Reading uac_redirect docs I expect that Contact header to be used as a new
destination but the original ru is used again!
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] sip_trace with d option supplied not tracing OPTION messages

2022-09-06 Thread Babak Yakhchali
Hi
I'm using sip_trace to capture all traffic and logs to Homer, everything
works fine except for OPTIONS packets generated by the dialog module. How
can I capture those messages?
opensips version is 2.4 and I'm calling sip_trace like this:

if (is_method("INVITE")) {
sip_trace("$var(trace_id)", "d", "sip|xlog|rest", "$var(user)");
}

thanks
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] how to call ul_dump?brief using jsonrpc

2020-11-11 Thread Babak Yakhchali
Hi
I'm using opensips 3.1.
What json should be sent as body to http mi which results like ul_dump?brief
I tried this curl command but it is not working
curl --location --request POST 'http://127.0.0.1:8080/opensips_mi' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc":"2.0","method":"ul_dump","id":10,*"params":["brief"]*
}'
I get
{"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params"}

this works but it is not brief :)
 curl --location --request POST 'http://127.0.0.1:8080/opensips_mi'
--header 'Content-Tya-raw '{"jsonrpc":"2.0","method":"ul_dump","id":10}'

thanks
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Handling multiple re invites from freeswitch

2020-07-14 Thread Babak Yakhchali
Hi
I'm testing re-invites from a freeswitch server with this scenario:
client1,client2 <=> opensips (rtpproxy) <=> freeswitch
[image: arch.jpg]
freeswitch is used to announce some mid call sound file. At start
freeswitch is not in the rtp path and rtp goes through rtpproxy to clients.
After 7 seconds freeswitch sends re-invites to come  to the rtp session and
play the sound file and after playback sends re-invites to leave the rtp
path.
All sip signalling is done correctly and the sound file is played
successfully, but after that no rtp is sent from rtpproxy to clients.
I'm using rtpproxy on invites like this:
if (has_body("application/sdp"))
{
if(has_totag()){
  rtpproxy_unforce();
}
rtpproxy_offer("ronf", "x.x.x.x");
}
and on reply route:
rtpproxy_answer("ronf", " x.x.x.x");

Can rtpproxy handle such a scenario? Should I do anything special because
there is some kind of loopback in rtpproxy?
opensips version is 2.4 git branch
rtpproxy version is 2.2.alpha.61e74c0
thanks
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Forking call to more than one AOR

2020-04-14 Thread Babak Yakhchali
For anyone interested:
I used append_branch() two times to create 2 branches. then using
$(branch(uri)[1]) = $avp(other_aor);
I set the second branch to go for other AOR, now calling lookup() like this:
lookup("location","r")
will create all needed branches based on the 2 already created branches and
removes them from destination set. Till now invites are generated for
different contacts, BUT there is a problem with clients registered with
second contact, because To header is based on the first AOR in ruri and
they will not accept the invite message, to solve this I used a branch
route and changed the To header like this:

branch_route[per_branch_ops] {
   if($tU != $rU){
uac_replace_to("","$avp(other_aor)");
   }
}


On Tue, Apr 14, 2020 at 12:46 PM Babak Yakhchali 
wrote:

> Hi
> I'm trying to implement this scenario:
> each user has two AORs. one for mobile and one for a userId (random string)
> at any time user may be registered on one, both or none of these AORs
> when a call comes to one of these AORs the other one must be called too
> (if there is a registered contact for it)
>
> reading the documents I think I need to use lookup("location","r"). but I
> don't know how should I add branches before calling it for the two AORs
>
> thanks
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Forking call to more than one AOR

2020-04-14 Thread Babak Yakhchali
Hi
I'm trying to implement this scenario:
each user has two AORs. one for mobile and one for a userId (random string)
at any time user may be registered on one, both or none of these AORs
when a call comes to one of these AORs the other one must be called too (if
there is a registered contact for it)

reading the documents I think I need to use lookup("location","r"). but I
don't know how should I add branches before calling it for the two AORs

thanks
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] timer related warnings

2019-09-04 Thread Babak Yakhchali
Hi
should I be worried about these warnings?
Sep  4 23:11:24 opensips_prod /usr/local/sbin/opensips[19797]:
WARNING:core:handle_timer_job: timer job  has a 7 us delay in
execution
Sep  4 23:43:24 opensips_prod /usr/local/sbin/opensips[19790]:
WARNING:core:handle_timer_job: utimer job  has a 6 us delay
in execution
Sep  5 00:59:39 opensips_prod /usr/local/sbin/opensips[19782]:
WARNING:core:handle_timer_job: timer job  has a 7 us delay in
execution
Sep  5 01:16:44 opensips_prod /usr/local/sbin/opensips[19785]:
WARNING:core:handle_timer_job: utimer job  has a 7 us delay
in execution
Sep  5 01:24:09 opensips_prod /usr/local/sbin/opensips[19829]:
WARNING:core:handle_timer_job: utimer job  has a 8 us delay
in execution
Sep  5 01:26:04 opensips_prod /usr/local/sbin/opensips[19784]:
WARNING:core:handle_timer_job: utimer job  has a 7 us delay
in execution
Sep  5 02:37:04 opensips_prod /usr/local/sbin/opensips[19807]:
WARNING:core:handle_timer_job: timer job  has a 7 us delay
in execution
Sep  5 02:40:19 opensips_prod /usr/local/sbin/opensips[19816]:
WARNING:core:handle_timer_job: utimer job  has a 6 us delay
in execution
Sep  5 02:47:34 opensips_prod /usr/local/sbin/opensips[19786]:
WARNING:core:handle_timer_job: utimer job  has a 7 us delay
in execution
Sep  5 03:21:34 opensips_prod /usr/local/sbin/opensips[19799]:
WARNING:core:handle_timer_job: utimer job  has a 8 us delay
in execution
Sep  5 03:46:04 opensips_prod /usr/local/sbin/opensips[19815]:
WARNING:core:handle_timer_job: timer job  has a 7 us delay in
execution
Sep  5 04:13:09 opensips_prod /usr/local/sbin/opensips[19829]:
WARNING:core:handle_timer_job: timer job  has a 7 us delay in
execution
Sep  5 04:22:39 opensips_prod /usr/local/sbin/opensips[19794]:
WARNING:core:handle_timer_job: timer job  has a 7 us delay in
execution
Sep  5 04:27:59 opensips_prod /usr/local/sbin/opensips[19827]:
WARNING:core:handle_timer_job: utimer job  has a 7 us delay
in execution
Sep  5 04:42:24 opensips_prod /usr/local/sbin/opensips[19786]:
WARNING:core:handle_timer_job: utimer job  has a 7 us delay
in execution
Sep  5 04:42:24 opensips_prod /usr/local/sbin/opensips[19789]:
WARNING:core:handle_timer_job: utimer job  has a 7 us delay
in execution
Sep  5 04:52:49 opensips_prod /usr/local/sbin/opensips[19788]:
WARNING:core:handle_timer_job: utimer job  has a 7 us delay
in execution
Sep  5 04:52:49 opensips_prod /usr/local/sbin/opensips[19830]:
WARNING:core:handle_timer_job: utimer job  has a 7 us delay
in execution
Sep  5 04:52:54 opensips_prod /usr/local/sbin/opensips[19783]:
WARNING:core:handle_timer_job: timer job  has a 7 us delay
in execution
Sep  5 05:05:19 opensips_prod /usr/local/sbin/opensips[19793]:
WARNING:core:handle_timer_job: timer job  has a 6 us delay
in execution
Sep  5 05:21:19 opensips_prod /usr/local/sbin/opensips[19788]:
WARNING:core:handle_timer_job: utimer job  has a 7 us delay
in execution
Sep  5 06:17:19 opensips_prod /usr/local/sbin/opensips[19794]:
WARNING:core:handle_timer_job: utimer job  has a 7 us delay
in execution
Sep  5 06:20:14 opensips_prod /usr/local/sbin/opensips[19795]:
WARNING:core:handle_timer_job: timer job  has a 7 us delay in
execution
Sep  5 06:36:24 opensips_prod /usr/local/sbin/opensips[19789]:
WARNING:core:handle_timer_job: timer job  has a 7 us delay
in execution
Sep  5 06:40:54 opensips_prod /usr/local/sbin/opensips[19828]:
WARNING:core:handle_timer_job: utimer job  has a 7 us delay
in execution
Sep  5 06:59:59 opensips_prod /usr/local/sbin/opensips[19797]:
WARNING:core:handle_timer_job: utimer job  has a 7 us delay
in execution
Sep  5 07:06:19 opensips_prod /usr/local/sbin/opensips[19828]:
WARNING:core:handle_timer_job: utimer job  has a 7 us delay
in execution
Sep  5 07:15:34 opensips_prod /usr/local/sbin/opensips[19816]:
WARNING:core:handle_timer_job: timer job  has a 7 us delay in
execution
Sep  5 07:44:09 opensips_prod /usr/local/sbin/opensips[19812]:
WARNING:core:handle_timer_job: utimer job  has a 7 us delay
in execution
Sep  5 08:57:59 opensips_prod /usr/local/sbin/opensips[19826]:
WARNING:core:handle_timer_job: utimer job  has a 7 us delay
in execution
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] how to build opensips 2.3 2.4 with openssl 1.0.2?

2019-09-02 Thread Babak Yakhchali
I followed this link
https://www.howtoforge.com/tutorial/how-to-install-openssl-from-source-on-linux/
and after that installed opensips from source, build system detected
openssl 1.0.2 (I think because I did not install openssl-dev)  and now ssl
related problems are solved.

On Sat, Aug 31, 2019 at 9:12 AM Babak Yakhchali 
wrote:

> Hi
> because of problems with openssl 1.1 on debian 9 (
> https://github.com/OpenSIPS/opensips/issues/1767)   I need to use openssl
> 1.0 with branch 2.4 or 2.3. When I list installed libssl packages on debian
> 9 I see this:
>  dpkg -l | grep ssl
> ii  libssl1.0.2:amd64 1.0.2l-2+deb9u3amd64
>Secure Sockets Layer toolkit - shared libraries
> ii  libssl1.1:amd64   1.1.0f-3+deb9u2amd64
>Secure Sockets Layer toolkit - shared libraries
> ii  openssl   1.1.0f-3+deb9u2amd64
>Secure Sockets Layer toolkit - cryptographic utility
> it seems libssl 1.0.2 library also exsists beside libssl 1.1 . Can I use
> the 1.0.2 to build opensips or use it with the already installed 2.3
> version? if yes what changes do I need to apply to Makefile or environment?
> thanks
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] how to build opensips 2.3 2.4 with openssl 1.0.2?

2019-08-30 Thread Babak Yakhchali
Hi
because of problems with openssl 1.1 on debian 9 (
https://github.com/OpenSIPS/opensips/issues/1767)   I need to use openssl
1.0 with branch 2.4 or 2.3. When I list installed libssl packages on debian
9 I see this:
 dpkg -l | grep ssl
ii  libssl1.0.2:amd64 1.0.2l-2+deb9u3amd64
   Secure Sockets Layer toolkit - shared libraries
ii  libssl1.1:amd64   1.1.0f-3+deb9u2amd64
   Secure Sockets Layer toolkit - shared libraries
ii  openssl   1.1.0f-3+deb9u2amd64
   Secure Sockets Layer toolkit - cryptographic utility
it seems libssl 1.0.2 library also exsists beside libssl 1.1 . Can I use
the 1.0.2 to build opensips or use it with the already installed 2.3
version? if yes what changes do I need to apply to Makefile or environment?
thanks
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users