OK.
From the code, I noticed that the old API (before kemi), it exports a
getHeader(...) method to Python API.
Just for sake of completion - starting with 5.0, there are more methods available, including a method to retrieve the value of any kamailio cfg variable, like in:
- https://github.com/kamailio/kamailio/blob/master/misc/examples/kemi/kamailio...
Cheers, Daniel
On 10/02/2017 11:52, gmele wrote:
I tested passing the parameter as suggested by Konstantin and it works fine:
In kamailio.cfg :
/python_exec("SendPushNotification", $_s($tU@$td!!$fU@$fd!!$ci)); /
In our python script:
/ def SendPushNotification(self, msg, parameters): requestUri = "" fromUri = "" callId = ""
try: # Extract the message fields requestUri, fromUri, callId = parameters.split("!!") *...
*/
All is working fine on our servers...
Regards
Giovanni
-- View this message in context: http://sip-router.1086192.n5.nabble.com/python-exec-and-parameters-tp155803p... Sent from the Users mailing list archive at Nabble.com.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users