[OpenSIPS-Users] Media IP Question

2022-01-12 Thread Alexander Perkins
Hi All.  I have an interesting question - how can I get the media IP of a
call?  Not the signaling IP, but the media IP.  Is there a variable for
that?  Any help is appreciated.

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


[OpenSIPS-Users] can't get timerec to work in dynamic routing

2022-01-12 Thread Kingsley Tart
Hi,

I'm using OpenSIPS 3.1.7. I'm trying to set time based dynamic routing
rules but am struggling to understand the timerec and get it working.

The intention here is that from 2000-01-01 00:00:00 to 2022-01-12
18:34:59 then prefix 441476292508 will go to gw9, but after that it
will go to gw8. This is for all times of day and all days of the week.

This is what I have in the appropriate partition:

++-+--+---++
| ruleid | groupid | prefix   | timerec   | gwlist |
++-+--+---++
| 88 | 0   | 441476292508 | 2101T00|||20220112T183459 | #gw9   |
| 89 | 0   | 441476292508 | 20220112T183500|||1231T235959 | #gw8   |
++-+--+---++

However, even though the time and date has now passed 2022-01-12
18:34:59, it is still sending to gw9. The new rule seems to be being
ignored.

I did dr_reload and even completely restarted OpenSIPS.

Any idea what I am doing wrong here?

Cheers,
Kingsley.


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


Re: [OpenSIPS-Users] Parse P-Asserted-Identity

2022-01-12 Thread Bogdan-Andrei Iancu

:+1:

Bogdan-Andrei Iancu

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

On 1/11/22 9:14 PM, Kingsley Tart wrote:

That's interesting - I'm more accustomed to seeing those tags on an
RPID header than PAID. With PAID I would have expected a separate
Privacy header to contain the "id" string.

Is this still OK with the RFCs?

Cheers,
Kingsley.

On Mon, 2021-11-29 at 13:22 +0100, Mickael MONSIEUR wrote:

Hello,

My provider add to my INVITE's :

P-Asserted-Identity: "Anonymous"
;party=calling;privacy=yes;screen=no

Whether the call should be Anonymized to end-users.

How to get the value of "privacy" ?

I try:

if( $(ai{privacy}) == "yes" )

But it does not work. (error when starting opensips)

Thanks

___
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



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


Re: [OpenSIPS-Users] Compiling for arm v7

2022-01-12 Thread Bogdan-Andrei Iancu

nice job @razvan !

Bogdan-Andrei Iancu

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

On 1/12/22 1:26 PM, Răzvan Crainea wrote:

Hi, all!

I've documented this as a tutorial[1]. Feel free to add your 
additional experience there. If you cannot edit the Wiki page, do let 
me know.


[1] https://www.opensips.org/Documentation/Tutorials-CrossCompile#toc1

Best regards,

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

On 1/5/22 18:27, Ovidiu Sas wrote:

All this should go in the wiki, maybe on a dedicated section.

-ovidiu

On Wed, Jan 5, 2022 at 09:50 Micael > wrote:



    So, in short, what I had to do to cross compile for armv7a using 
GCC 10.



    1. Remove the section in Makefile.defs that tries to detect the arm
    compiler version, since it is outdated afaict. This could of 
course be
    fixed to also include newer GCC versions in the test. But you 
guys know
    more about the history here, and if it is worth the effort. GCC 
stayed

    still in versioning for a long while, and then it kind of exploded.

    2. For armv7a, also in Makefile.defs, change the macro test from
    __ARM_ARCH_7__ to __ARM_ARCH_7A__ (this could probably be added as a
    secondary test instead, since it is a rather clean test).

    3. Add -marm to CC options

    4. Edit modules/tls_wolfssl/Makfile, adding --host=arm
    There's a good error message in the wolfssl output, so it did not 
take

    too long to figure out this.


    In my case, I used these options (again, gcc 10);
    CC -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon 
-marm


    I don't think they are all needed, but I include them as a 'known 
good'

    setup. :)


    Note;
    I have not yet tested anything really, but the outlook is good.

    Thanks,
   Micael



    On 2022-01-05 14:53, Bogdan-Andrei Iancu wrote:
 > Guys,
 >
 > if you went thru all the pain of getting to the bottom of this,
    should
 > we document somewhere how this cross compiling should be done? to
    spare
 > some future pain of other users :).
 >
 > 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/5/22 3:42 PM, Micael wrote:
 >>
 >> Hi again Răzvan,
 >>
 >> Yes!! That was the final missing bit of the puzzle!
 >>
 >> Everything compiles just fine now!
 >>
 >>
 >> (I had to also make a minor change in wolfssl/Makefile, adding
 >> "–host=arm")
 >>
 >>
 >> Many thanks for your help,
 >>
 >>  Micael
 >>
 >>
 >>
 >>
 >> On 2022-01-05 13:23, Răzvan Crainea wrote:
 >>> Hi, Micael!
 >>>
 >>> Can you try to add `-marm` in your CC_EXRTA_FLAGS?
 >>>
 >>> Best regards,
 >>>
 >>> Răzvan Crainea
 >>> OpenSIPS Core Developer
 >>> http://www.opensips-solutions.com
    
 >>>
 >>> On 1/5/22 12:19, Micael wrote:
 
  Hi Răzvan,
 
  Thanks, with your input I learned more about what is 
happening!

 
  So I tried you suggestion and variants of it, but it gave the
    same
  result. So I grep'd the CC_ARCH, and found in Makefile.defs
    that it
  is overwritten by a compiler predefined macro test
    (__ARM_ARCH_7__).
  I checked my compiler (gcc 10), and it has __ARM_ARCH_7A__ 
set.

  So I changed Makefile.defs into testing against that, and that
  changed things.
  First of all, I now see "Target architecture ", 
instead of

   when compiling.
 
  But then I arrive into the next problem, I guess this is 
the same
  code (fastlock.h). But now I'm getting into deep water, I 
suspect

  the assembler code needs some TLC?
 
 
  $ make
  Target architecture , host architecture 
  Compiling action.c
  /tmp/ccrHaC9i.s: Assembler messages:
  /tmp/ccrHaC9i.s:145: Error: thumb conditional instruction
    should be
  in IT block -- `strexeq r3,r1,[r2]'
  make: *** [Makefile.rules:28: action.o] Error 1
 
 
  I tried to test with different thumb and interwork options,
    but that
  did not change anything.
 
 
  For reference, I added -v to see exactly which flags where
    enabled,
  on the build.
 
  COLLECT_GCC_OPTIONS= '-mthumb-interwork' '-mfloat-abi=hard'
  '-mfpu=neon' '-v' '-g' '-I'
 
'/volt001/tmp/sysroots-components/cortexa8hf-neon/openssl/usr/include'
 

Re: [OpenSIPS-Users] Compiling for arm v7

2022-01-12 Thread Răzvan Crainea

Hi, all!

I've documented this as a tutorial[1]. Feel free to add your additional 
experience there. If you cannot edit the Wiki page, do let me know.


[1] https://www.opensips.org/Documentation/Tutorials-CrossCompile#toc1

Best regards,

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

On 1/5/22 18:27, Ovidiu Sas wrote:

All this should go in the wiki, maybe on a dedicated section.

-ovidiu

On Wed, Jan 5, 2022 at 09:50 Micael mailto:m8...@abc.se>> 
wrote:



So, in short, what I had to do to cross compile for armv7a using GCC 10.


1. Remove the section in Makefile.defs that tries to detect the arm
compiler version, since it is outdated afaict. This could of course be
fixed to also include newer GCC versions in the test. But you guys know
more about the history here, and if it is worth the effort. GCC stayed
still in versioning for a long while, and then it kind of exploded.

2. For armv7a, also in Makefile.defs, change the macro test from
__ARM_ARCH_7__ to __ARM_ARCH_7A__ (this could probably be added as a
secondary test instead, since it is a rather clean test).

3. Add -marm to CC options

4. Edit modules/tls_wolfssl/Makfile, adding --host=arm
There's a good error message in the wolfssl output, so it did not take
too long to figure out this.


In my case, I used these options (again, gcc 10);
CC -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -marm

I don't think they are all needed, but I include them as a 'known good'
setup. :)


Note;
I have not yet tested anything really, but the outlook is good.

Thanks,
   Micael



On 2022-01-05 14:53, Bogdan-Andrei Iancu wrote:
 > Guys,
 >
 > if you went thru all the pain of getting to the bottom of this,
should
 > we document somewhere how this cross compiling should be done? to
spare
 > some future pain of other users :).
 >
 > 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/5/22 3:42 PM, Micael wrote:
 >>
 >> Hi again Răzvan,
 >>
 >> Yes!! That was the final missing bit of the puzzle!
 >>
 >> Everything compiles just fine now!
 >>
 >>
 >> (I had to also make a minor change in wolfssl/Makefile, adding
 >> "–host=arm")
 >>
 >>
 >> Many thanks for your help,
 >>
 >>  Micael
 >>
 >>
 >>
 >>
 >> On 2022-01-05 13:23, Răzvan Crainea wrote:
 >>> Hi, Micael!
 >>>
 >>> Can you try to add `-marm` in your CC_EXRTA_FLAGS?
 >>>
 >>> Best regards,
 >>>
 >>> Răzvan Crainea
 >>> OpenSIPS Core Developer
 >>> http://www.opensips-solutions.com

 >>>
 >>> On 1/5/22 12:19, Micael wrote:
 
  Hi Răzvan,
 
  Thanks, with your input I learned more about what is happening!
 
  So I tried you suggestion and variants of it, but it gave the
same
  result. So I grep'd the CC_ARCH, and found in Makefile.defs
that it
  is overwritten by a compiler predefined macro test
(__ARM_ARCH_7__).
  I checked my compiler (gcc 10), and it has __ARM_ARCH_7A__ set.
  So I changed Makefile.defs into testing against that, and that
  changed things.
  First of all, I now see "Target architecture ", instead of
   when compiling.
 
  But then I arrive into the next problem, I guess this is the same
  code (fastlock.h). But now I'm getting into deep water, I suspect
  the assembler code needs some TLC?
 
 
  $ make
  Target architecture , host architecture 
  Compiling action.c
  /tmp/ccrHaC9i.s: Assembler messages:
  /tmp/ccrHaC9i.s:145: Error: thumb conditional instruction
should be
  in IT block -- `strexeq r3,r1,[r2]'
  make: *** [Makefile.rules:28: action.o] Error 1
 
 
  I tried to test with different thumb and interwork options,
but that
  did not change anything.
 
 
  For reference, I added -v to see exactly which flags where
enabled,
  on the build.
 
  COLLECT_GCC_OPTIONS= '-mthumb-interwork' '-mfloat-abi=hard'
  '-mfpu=neon' '-v' '-g' '-I'
 
'/volt001/tmp/sysroots-components/cortexa8hf-neon/openssl/usr/include'
  '-D' 'PKG_MALLOC' '-D' 'SHM_MMAP' '-D' 'USE_MCAST' '-D'
  'DISABLE_NAGLE' '-D' 'STATISTICS' '-D' 'HAVE_RESOLV_RES' '-D'
  'F_MALLOC' '-D' 'Q_MALLOC' '-D' 'HP_MALLOC' '-D' 'DBG_MALLOC'
'-D'
  'HAVE_STDATOMIC' '-D'