<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body><div>Hi,</div><div><br></div><div>Currently experimenting with the EXEC module. Still all advice is welcome.</div><div><br></div><div>Regards,</div><div><br></div><div>Ronald</div><div><br></div><p>February 3, 2024 at 4:39 PM, <a href="mailto:rvg@rvgeerligs.nl" target="_blank" tabindex="-1">rvg@rvgeerligs.nl</a> wrote:</p><blockquote><div><div><div><div><div>Hi,</div><div><br></div><div>I managed to integrate pn in opensips 3.4 as I get as reply to register from my opensips server:</div><div><br></div><div>SIP/2.0 200 OK
</div><div>
</div><div>Via: SIP/2.0/UDP 192.168.1.14:57993;received=x.x.x.x;branch=z9hG4bK.wxwvFfCSG;rport=57993
</div><div>
</div><div>To: sip:xx;tag=eeba.752562b862ac8bd9236fb7979b3044b6
</div><div>
</div><div>From: <sip:xx>;tag=mFddPGSw6
</div><div>
</div><div>Call-ID: UFVVRWp5rN
</div><div>
</div><div>CSeq: 23 REGISTER
</div><div>
</div><div><b>Feature-Caps: +sip.pns="apns";+sip.pnsreg="130";+sip.pnspurr="3fa.a1d4c.c3fbd0c8"
</b></div><div>
</div><div>Server: OpenSIPS (3.4.0 (aarch64/linux))
</div><div>
</div><div>Content-Length: 0</div><div><br></div><div><br></div><div>Also I have a bash script getting token and sending pn to apns developement.</div><div>I have pn-prid, pn-param, pn-provider</div><div>I want to connect the in the function </div><div><br></div><div>
</div></div></div></div><p><span>route[pm_send]</span></p><div>
</div><p><span>{</span>
</p><div>
</div><p><span>exit;</span></p><div>
</div><p><span>}</span></p><div><div><p style='outline: 0px; -webkit-tap-highlight-color: transparent; margin: 0.715em 0px; box-sizing: border-box; color: rgb(0, 0, 0); font-family: Verdana, Geneva, "Bitstream Vera Sans", "DejaVu LGC Sans", Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;'><br></p><div style='outline: 0px; -webkit-tap-highlight-color: transparent; box-sizing: border-box; color: rgb(0, 0, 0); font-family: Verdana, Geneva, "Bitstream Vera Sans", "DejaVu LGC Sans", Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;'>questions: </div><div style='outline: 0px; -webkit-tap-highlight-color: transparent; box-sizing: border-box; color: rgb(0, 0, 0); font-family: Verdana, Geneva, "Bitstream Vera Sans", "DejaVu LGC Sans", Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;'>How do I get opensips to call a bash script with arguments? Arguments being pn-prid, pn-param, pn-provider.</div><div style='outline: 0px; -webkit-tap-highlight-color: transparent; box-sizing: border-box; color: rgb(0, 0, 0); font-family: Verdana, Geneva, "Bitstream Vera Sans", "DejaVu LGC Sans", Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;'>Where do I place the script?</div><div style='outline: 0px; -webkit-tap-highlight-color: transparent; box-sizing: border-box; color: rgb(0, 0, 0); font-family: Verdana, Geneva, "Bitstream Vera Sans", "DejaVu LGC Sans", Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;'><br></div><div style='outline: 0px; -webkit-tap-highlight-color: transparent; box-sizing: border-box; color: rgb(0, 0, 0); font-family: Verdana, Geneva, "Bitstream Vera Sans", "DejaVu LGC Sans", Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;'>would that be in my module path?</div><div style='outline: 0px; -webkit-tap-highlight-color: transparent; box-sizing: border-box; color: rgb(0, 0, 0); font-family: Verdana, Geneva, "Bitstream Vera Sans", "DejaVu LGC Sans", Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;'>
</div></div></div><p><span>mpath="/usr/local/lib64/opensips/modules/"</span></p><div><div style='outline: 0px; -webkit-tap-highlight-color: transparent; box-sizing: border-box; color: rgb(0, 0, 0); font-family: Verdana, Geneva, "Bitstream Vera Sans", "DejaVu LGC Sans", Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;'><br></div><div style='outline: 0px; -webkit-tap-highlight-color: transparent; box-sizing: border-box; color: rgb(0, 0, 0); font-family: Verdana, Geneva, "Bitstream Vera Sans", "DejaVu LGC Sans", Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;'>I tried a marg.sh doing:</div><div style='outline: 0px; -webkit-tap-highlight-color: transparent; box-sizing: border-box; color: rgb(0, 0, 0); font-family: Verdana, Geneva, "Bitstream Vera Sans", "DejaVu LGC Sans", Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;'>
</div></div><p><span>#!/bin/bash</span>
</p><div>
</div><p><span>echo "The first argument is: $1"</span></p><div>
</div><p><span>echo "The second argument is: $2"</span></p><div>
</div><p><span>echo "The third argument is: $3"</span></p><div><div><div style='outline: 0px; -webkit-tap-highlight-color: transparent; box-sizing: border-box; color: rgb(0, 0, 0); font-family: Verdana, Geneva, "Bitstream Vera Sans", "DejaVu LGC Sans", Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;'><br></div><div style='outline: 0px; -webkit-tap-highlight-color: transparent; box-sizing: border-box; color: rgb(0, 0, 0); font-family: Verdana, Geneva, "Bitstream Vera Sans", "DejaVu LGC Sans", Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;'>But I got:</div><div style='outline: 0px; -webkit-tap-highlight-color: transparent; box-sizing: border-box; color: rgb(0, 0, 0); font-family: Verdana, Geneva, "Bitstream Vera Sans", "DejaVu LGC Sans", Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;'>
</div></div></div><p><span>ERROR:core:parse_opensips_cfg: bad config file (4 errors)</span></p><div><br></div><div>Any advise appreciated.</div><div><br></div><div>Regards,</div><div><br></div><div><br></div><div><div><div style='outline: 0px; -webkit-tap-highlight-color: transparent; box-sizing: border-box; color: rgb(0, 0, 0); font-family: Verdana, Geneva, "Bitstream Vera Sans", "DejaVu LGC Sans", Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;'><br></div><div style='outline: 0px; -webkit-tap-highlight-color: transparent; box-sizing: border-box; color: rgb(0, 0, 0); font-family: Verdana, Geneva, "Bitstream Vera Sans", "DejaVu LGC Sans", Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;'><br></div><div style='outline: 0px; -webkit-tap-highlight-color: transparent; box-sizing: border-box; color: rgb(0, 0, 0); font-family: Verdana, Geneva, "Bitstream Vera Sans", "DejaVu LGC Sans", Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;'><br></div><div style='outline: 0px; -webkit-tap-highlight-color: transparent; box-sizing: border-box; color: rgb(0, 0, 0); font-family: Verdana, Geneva, "Bitstream Vera Sans", "DejaVu LGC Sans", Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;'><br></div><div style='outline: 0px; -webkit-tap-highlight-color: transparent; box-sizing: border-box; color: rgb(0, 0, 0); font-family: Verdana, Geneva, "Bitstream Vera Sans", "DejaVu LGC Sans", Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;'><br></div><div style='outline: 0px; -webkit-tap-highlight-color: transparent; box-sizing: border-box; color: rgb(0, 0, 0); font-family: Verdana, Geneva, "Bitstream Vera Sans", "DejaVu LGC Sans", Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;'><br></div><div style='outline: 0px; -webkit-tap-highlight-color: transparent; box-sizing: border-box; color: rgb(0, 0, 0); font-family: Verdana, Geneva, "Bitstream Vera Sans", "DejaVu LGC Sans", Arial, sans-serif; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;'><br></div><div><br></div><div><br></div></div><div><br></div></div><div><br></div></div></blockquote><div><br></div></body></html>