[OpenSIPS-Users] pn opensips 3.4

Bogdan-Andrei Iancu bogdan at opensips.org
Mon Feb 5 09:19:13 UTC 2024


Hi,

you can consider using exec in async way, with launch() for example:
https://opensips.org/html/docs/modules/3.4.x/exec.html#afunc_exec

But imho anything else (non-blocking) may be better than exec, to avoid 
the penalty for forking new processes ; rest_client, in async way is 
also an option, for example, raising events (with external subscriber) 
too, message queue, etc.

Regards

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com
   https://www.siphub.com

On 04.02.2024 12:22, Volkan Oransoy wrote:
> Hi Ronald
>
> For our case, we use exec on development environment too. For the 
> production, we will use rabbitmq and custom events to decouple pn 
> delivery from the script.
>
> Volkan Oransoy
> On 3 Feb 2024 at 20:54 +0000, rvg at rvgeerligs.nl, wrote:
>> Hi,
>>
>> Currently experimenting with the EXEC module. Still all advice is 
>> welcome.
>>
>> Regards,
>>
>> Ronald
>>
>> February 3, 2024 at 4:39 PM, rvg at rvgeerligs.nl wrote:
>>
>>     Hi,
>>
>>     I managed to integrate pn in opensips 3.4 as I get as reply to
>>     register from my opensips server:
>>
>>     SIP/2.0 200 OK
>>     Via: SIP/2.0/UDP
>>     192.168.1.14:57993;received=x.x.x.x;branch=z9hG4bK.wxwvFfCSG;rport=57993
>>     To: sip:xx;tag=eeba.752562b862ac8bd9236fb7979b3044b6
>>     From: <sip:xx>;tag=mFddPGSw6
>>     Call-ID: UFVVRWp5rN
>>     CSeq: 23 REGISTER
>>     *Feature-Caps:
>>     +sip.pns="apns";+sip.pnsreg="130";+sip.pnspurr="3fa.a1d4c.c3fbd0c8"*
>>     Server: OpenSIPS (3.4.0 (aarch64/linux))
>>     Content-Length: 0
>>
>>
>>     Also I have a bash script getting token and sending pn to apns
>>     developement.
>>     I have pn-prid, pn-param, pn-provider
>>     I want to connect the in the function
>>
>>     route[pm_send]
>>
>>     {
>>
>>     exit;
>>
>>     }
>>
>>
>>     questions:
>>     How do I get opensips to call a bash script with arguments?
>>     Arguments being pn-prid, pn-param, pn-provider.
>>     Where do I place the script?
>>
>>     would that be in my module path?
>>
>>     mpath="/usr/local/lib64/opensips/modules/"
>>
>>
>>     I tried a marg.sh doing:
>>
>>     #!/bin/bash
>>
>>     echo "The first argument is: $1"
>>
>>     echo "The second argument is: $2"
>>
>>     echo "The third argument is: $3"
>>
>>
>>     But I got:
>>
>>     ERROR:core:parse_opensips_cfg: bad config file (4 errors)
>>
>>
>>     Any advise appreciated.
>>
>>     Regards,
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20240205/d49c829c/attachment.html>


More information about the Users mailing list