Re: [OpenSIPS-Users] Hangup Routine

2022-01-19 Thread Alexander Perkins
Hi Bogdan.  You are my hero!  Thank you for the prompt reply.  I will test
that out and let you know.

Thank you!

On Wed, Jan 19, 2022 at 9:55 AM Bogdan-Andrei Iancu 
wrote:

> Hi Alexander,
>
> You actually have 2 options here:
>
> 1) if you want to do that for all the calls, you can use
> E_DLG_STATE_CHANGED [1] event via the event route [2]. And check when the
> new dialog state is TERMINATED
>
> 2) if you want to do it only for some calls, use the dlg_on_hangup hook
> [3] and have it set only for the calls you need.
>
>
> [1]
> https://opensips.org/html/docs/modules/3.2.x/dialog.html#event_E_DLG_STATE_CHANGED
> [2] https://www.opensips.org/Documentation/Script-Routes-3-2#toc9
> [3]
> https://opensips.org/html/docs/modules/3.2.x/dialog.html#func_dlg_on_hangup
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS eBootcamp 2021
>   https://opensips.org/training/OpenSIPS_eBootcamp_2021/
>
> On 1/19/22 3:37 PM, Alexander Perkins wrote:
>
> Hi All.  I would like to invoke a web service when the call hangs up.  I'd
> like to send over to the web service items such as how long the calls
> lasted (milliseconds), etc.  I know how to invoke the web service, but
> where should I invoke it so it can send over those variables?
>
> Thank you!
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Hangup Routine

2022-01-19 Thread Bogdan-Andrei Iancu

Hi Alexander,

You actually have 2 options here:

1) if you want to do that for all the calls, you can use 
E_DLG_STATE_CHANGED [1] event via the event route [2]. And check when 
the new dialog state is TERMINATED


2) if you want to do it only for some calls, use the dlg_on_hangup hook 
[3] and have it set only for the calls you need.



[1] 
https://opensips.org/html/docs/modules/3.2.x/dialog.html#event_E_DLG_STATE_CHANGED

[2] https://www.opensips.org/Documentation/Script-Routes-3-2#toc9
[3] 
https://opensips.org/html/docs/modules/3.2.x/dialog.html#func_dlg_on_hangup


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS eBootcamp 2021
  https://opensips.org/training/OpenSIPS_eBootcamp_2021/

On 1/19/22 3:37 PM, Alexander Perkins wrote:
Hi All.  I would like to invoke a web service when the call hangs up.  
I'd like to send over to the web service items such as how long the 
calls lasted (milliseconds), etc.  I know how to invoke the web 
service, but where should I invoke it so it can send over those variables?


Thank you!

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


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


[OpenSIPS-Users] Hangup Routine

2022-01-19 Thread Alexander Perkins
Hi All.  I would like to invoke a web service when the call hangs up.  I'd
like to send over to the web service items such as how long the calls
lasted (milliseconds), etc.  I know how to invoke the web service, but
where should I invoke it so it can send over those variables?

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


Re: [OpenSIPS-Users] Issue with rtpengine

2022-01-19 Thread Răzvan Crainea

Hi, Sergey!

Rtpengine uses by default the SDP received in the message, it does not 
take into account any "local" changes you make.
What you can try is to replace the body and get the result in a pvar, 
and then pass that pvar to the rtpengine_offer function[1], 3rd parameter.


[1] 
https://opensips.org/html/docs/modules/3.2.x/rtpengine#func_rtpengine_offer


Best regards,

Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 1/18/22 19:37, Sergey Pisanko wrote:


I tried to remove crypto strings that's not needed with "replace_body()" 
function before rtpengine execution.. And I got the string what I need. 
But despite this, when rtpengine is applied and proxy relays message to 
UA2, rtpengine adds a string what I got rid from SDP on the previous 
step. And I don't have any idea, from where rtpengine get crypto string 
in a changed body. Here is what the script in this part looks like:


branch_route[invite_to_pbx] {
    xlog("outgoing to pbx");
      if(has_body("application/sdp")) {
          if (replace_body_all("a=crypto:([1-9])+( AES_CM_256)+(.*)$", 
"")) {

             xlog("Replaced");
          }
        rtpengine_offer("RTP/SAVP ICE=remove"));
       }
  }

I also tried to execute this in a request route, but without changing.

Can you help me to understand why rtpengine ignores changed SDP? Is my 
script logic correct?


Best regards,
Sergey Pysanko.
Mailtrack 
 
	Sender notified by
Mailtrack 
 
	01/18/22, 07:13:23 PM 	



пт, 14 янв. 2022 г. в 17:30, Sergey Pisanko >:


Hello.

I've faced an issue when using rtpengine module with tls transport.
When UA originates a call it pointed set of crypto
parameters in SDP, like that:

a=crypto:1 AES_CM_256_HMAC_SHA1_80
inline:PZASLY5HoxVo6Ljz2niwxqNJ+3A2mW71SgfL75cRFtShKQIvcKVF2Y39zGd1fQ==
a=crypto:2 AES_CM_256_HMAC_SHA1_32
inline:LRjGKIj8wvfxDP68+5XOEmlvO2ufqxDkhJ3hUQRWzjFulFr2kBztgSjrPSSACw==
a=crypto:3 AES_CM_128_HMAC_SHA1_80
inline:Nup7cVUaHGb+oQPf8gg1wDmjVJOZ5K+HZdhyovzz
a=crypto:4 AES_CM_128_HMAC_SHA1_32
inline:rjLdKaMyQ7+YQWCcIFKkVRLd+GZxkUogGK/4i1L0

But when Opensips relays original message to UA2, rtpengine removes
all the crypto suite strings except the first one.
Unfortunately, there is no way to configure client's behaivior to
send certain crypto suite.
In other side, UA2, that is PBX, doesn't support all crypto suites
except AES_CM_128_HMAC_SHA1_80
Is there a way to configure Opensips/rtpengine to choose specific
crypto string or to leave crypto set without changing at all?

Best Regards,
Sergey Pysanko.



Mailtrack


Sender notified by
Mailtrack


01/14/22, 05:28:49 PM   


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


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


Re: [OpenSIPS-Users] Compiliing issue OpenSIPS 3.2.4 - WolfSSL on Debian 11

2022-01-19 Thread Răzvan Crainea

Hi, Eugene!

I've redirected this email to the OpenSIPS' user's list[1]. Please post 
your questions here.


[1] http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Best regards,

Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 1/18/22 15:46, Eugen Prieb wrote:

Hello,

i have a problem with compiling OpenSIPS 3.2.4 on Debian 11. Issue is on 
WolfSSL compiling...


make[1]: Entering directory '/usr/src/opensips/modules/tls_wolfssl'
Compiling wolfssl.c
wolfssl.c: In function ‘oss_mutex_cb’:
wolfssl.c:140:7: error: ‘WOLFSSL_USER_MUTEX_INIT’ undeclared (first use 
in this function)

   140 |  case WOLFSSL_USER_MUTEX_INIT:
   |   ^~~
wolfssl.c:140:7: note: each undeclared identifier is reported only once 
for each function it appears in
wolfssl.c:141:4: error: ‘wolfSSL_Mutex’ {aka ‘pthread_mutex_t’} has no 
member named ‘mutex’

   141 |   m->mutex = lock_alloc();
   |    ^~
wolfssl.c:142:9: error: ‘wolfSSL_Mutex’ {aka ‘pthread_mutex_t’} has no 
member named ‘mutex’

   142 |   if (!m->mutex || !lock_init(m->mutex)) {
   | ^~
wolfssl.c:142:32: error: ‘wolfSSL_Mutex’ {aka ‘pthread_mutex_t’} has no 
member named ‘mutex’

   142 |   if (!m->mutex || !lock_init(m->mutex)) {
   |    ^~
wolfssl.c:147:7: error: ‘WOLFSSL_USER_MUTEX_FREE’ undeclared (first use 
in this function)

   147 |  case WOLFSSL_USER_MUTEX_FREE:
   |   ^~~
In file included from wolfssl.c:34:
wolfssl.c:149:17: error: ‘wolfSSL_Mutex’ {aka ‘pthread_mutex_t’} has no 
member named ‘mutex’

   149 |   lock_dealloc(m->mutex);
   | ^~
../../mem/shm_mem.h:513:38: note: in definition of macro ‘shm_free’
   513 | #define shm_free( _ptr ) _shm_free( (_ptr), \
   |  ^~~~
wolfssl.c:149:3: note: in expansion of macro ‘lock_dealloc’
   149 |   lock_dealloc(m->mutex);
   |   ^~~~
wolfssl.c:150:4: error: ‘wolfSSL_Mutex’ {aka ‘pthread_mutex_t’} has no 
member named ‘mutex’

   150 |   m->mutex = NULL;
   |    ^~
wolfssl.c:152:7: error: ‘WOLFSSL_USER_MUTEX_LOCK’ undeclared (first use 
in this function)

   152 |  case WOLFSSL_USER_MUTEX_LOCK:
   |   ^~~
In file included from ../../mem/shm_mem.h:50,
  from wolfssl.c:34:
wolfssl.c:153:13: error: ‘wolfSSL_Mutex’ {aka ‘pthread_mutex_t’} has no 
member named ‘mutex’

   153 |   lock_get(m->mutex);
   | ^~
../../mem/../lock_ops.h:93:34: note: in definition of macro ‘lock_get’
    93 |  #define lock_get(lock) get_lock(lock)
   |  ^~~~
wolfssl.c:155:7: error: ‘WOLFSSL_USER_MUTEX_UNLOCK’ undeclared (first 
use in this function)

   155 |  case WOLFSSL_USER_MUTEX_UNLOCK:
   |   ^
In file included from ../../mem/shm_mem.h:50,
  from wolfssl.c:34:
wolfssl.c:156:17: error: ‘wolfSSL_Mutex’ {aka ‘pthread_mutex_t’} has no 
member named ‘mutex’

   156 |   lock_release(m->mutex);
   | ^~
../../mem/../lock_ops.h:90:41: note: in definition of macro ‘lock_release’
    90 | #define lock_release(lock) release_lock(lock)
   | ^~~~
wolfssl.c: In function ‘mod_init’:
wolfssl.c:172:2: warning: implicit declaration of function 
‘wolfSSL_SetUserMutexCb’; did you mean ‘wolfSSL_SetHsDoneCb’? 
[-Wimplicit-function-declaration]

   172 |  wolfSSL_SetUserMutexCb(oss_mutex_cb);
   |  ^~
   |  wolfSSL_SetHsDoneCb
make[1]: *** [../../Makefile.rules:28: wolfssl.o] Error 1
make[1]: Leaving directory '/usr/src/opensips/modules/tls_wolfssl'
make: *** [Makefile:197: modules] Error 2-

maili

--
Eugen P.




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