Re: [SR-Users] uri_param function
Thanks Brandon for your responses. For some reason I misunderstood the use of uri_param and thought that would just check if the param "ak" would exist. Yeah I did something like what you just mentioned except I'm not checking for blank value, but checking to make sure the param exists. if(uri =~ "(AK|ak)") { ... } On Mon, Jan 21, 2019 at 4:38 PM Brandon Armstead wrote: > Andrew, > >Perhaps try something like this: > > if(!($(ru{uri.param,ak}) == "")){ > // ak has a value > } else { > // ak has no value > } > > On Mon, Jan 21, 2019 at 1:28 PM Brandon Armstead wrote: > >> Andrew, >> >>I believe per docs it finds a param with no value, so it may not match >> if there is a value on that attribute. >> >> On Mon, Jan 21, 2019 at 1:24 PM Andrew Chen wrote: >> >>> Hi all, >>> >>> Question. I'm executing uri_param() function to look for our customized >>> Request-URI parameters generated by our client. However, it keeps saying >>> the param is not there even though my client logs shows the param was >>> generated. Below is an example Request-URI from a test call I made: >>> >>> sips:@sjomainkamavip50.fuzemeeting.com:443;FN= >>> sjomainfn92.a.fuzemeeting.com;BR=sjomainfn91.a.fuzemeeting.com;AK=>> key>;transport=wss" >>> >>> And here is my line of code to check it: >>> >>> if(uri_param("AK") ||uri_param("ak")) { >>> xlog("L_INFO", "[CSeq $cs] AK value >>> detected"); >>> } else { >>> xlog("L_INFO", "[CSeq $cs] AK value not >>> detected. Aborting call"); >>> drop(); >>> } >>> Am I misusing this function somehow? >>> >>> I'm running 5.1.2. >>> >>> Thanks >>> >>> Regards, >>> >>> -- >>> Andy Chen >>> >>> >>> *Confidentiality Notice: The information contained in this e-mail and any >>> attachments may be confidential. If you are not an intended recipient, >>> you >>> are hereby notified that any dissemination, distribution or copying of >>> this >>> e-mail is strictly prohibited. If you have received this e-mail in error, >>> please notify the sender and permanently delete the e-mail and any >>> attachments immediately. You should not retain, copy or use this e-mail >>> or >>> any attachment for any purpose, nor disclose all or any part of the >>> contents to any other person. Thank you.* >>> ___ >>> Kamailio (SER) - Users Mailing List >>> sr-users@lists.kamailio.org >>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users >>> >> ___ > Kamailio (SER) - Users Mailing List > sr-users@lists.kamailio.org > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > -- Andy Chen Sr. Telephony Lead Engineer 415 516 5535 (M) achen@ fuze.com -- *Confidentiality Notice: The information contained in this e-mail and any attachments may be confidential. If you are not an intended recipient, you are hereby notified that any dissemination, distribution or copying of this e-mail is strictly prohibited. If you have received this e-mail in error, please notify the sender and permanently delete the e-mail and any attachments immediately. You should not retain, copy or use this e-mail or any attachment for any purpose, nor disclose all or any part of the contents to any other person. Thank you.* ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] uri_param function
Andrew, Perhaps try something like this: if(!($(ru{uri.param,ak}) == "")){ // ak has a value } else { // ak has no value } On Mon, Jan 21, 2019 at 1:28 PM Brandon Armstead wrote: > Andrew, > >I believe per docs it finds a param with no value, so it may not match > if there is a value on that attribute. > > On Mon, Jan 21, 2019 at 1:24 PM Andrew Chen wrote: > >> Hi all, >> >> Question. I'm executing uri_param() function to look for our customized >> Request-URI parameters generated by our client. However, it keeps saying >> the param is not there even though my client logs shows the param was >> generated. Below is an example Request-URI from a test call I made: >> >> sips:@sjomainkamavip50.fuzemeeting.com:443;FN= >> sjomainfn92.a.fuzemeeting.com;BR=sjomainfn91.a.fuzemeeting.com;AK=> key>;transport=wss" >> >> And here is my line of code to check it: >> >> if(uri_param("AK") ||uri_param("ak")) { >> xlog("L_INFO", "[CSeq $cs] AK value >> detected"); >> } else { >> xlog("L_INFO", "[CSeq $cs] AK value not >> detected. Aborting call"); >> drop(); >> } >> Am I misusing this function somehow? >> >> I'm running 5.1.2. >> >> Thanks >> >> Regards, >> >> -- >> Andy Chen >> >> >> *Confidentiality Notice: The information contained in this e-mail and any >> attachments may be confidential. If you are not an intended recipient, you >> are hereby notified that any dissemination, distribution or copying of >> this >> e-mail is strictly prohibited. If you have received this e-mail in error, >> please notify the sender and permanently delete the e-mail and any >> attachments immediately. You should not retain, copy or use this e-mail or >> any attachment for any purpose, nor disclose all or any part of the >> contents to any other person. Thank you.* >> ___ >> Kamailio (SER) - Users Mailing List >> sr-users@lists.kamailio.org >> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users >> > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] uri_param function
Andrew, Also - my brain is still waking up but -- I would make sure you are not confusing inner param vs outer param, i.e. ;outer=OUT - just another thought or common possibility I see happening, but given that you are specifically stating request-uri this may not be applicable. On Mon, Jan 21, 2019 at 1:28 PM Brandon Armstead wrote: > Andrew, > >I believe per docs it finds a param with no value, so it may not match > if there is a value on that attribute. > > On Mon, Jan 21, 2019 at 1:24 PM Andrew Chen wrote: > >> Hi all, >> >> Question. I'm executing uri_param() function to look for our customized >> Request-URI parameters generated by our client. However, it keeps saying >> the param is not there even though my client logs shows the param was >> generated. Below is an example Request-URI from a test call I made: >> >> sips:@sjomainkamavip50.fuzemeeting.com:443;FN= >> sjomainfn92.a.fuzemeeting.com;BR=sjomainfn91.a.fuzemeeting.com;AK=> key>;transport=wss" >> >> And here is my line of code to check it: >> >> if(uri_param("AK") ||uri_param("ak")) { >> xlog("L_INFO", "[CSeq $cs] AK value >> detected"); >> } else { >> xlog("L_INFO", "[CSeq $cs] AK value not >> detected. Aborting call"); >> drop(); >> } >> Am I misusing this function somehow? >> >> I'm running 5.1.2. >> >> Thanks >> >> Regards, >> >> -- >> Andy Chen >> >> >> *Confidentiality Notice: The information contained in this e-mail and any >> attachments may be confidential. If you are not an intended recipient, you >> are hereby notified that any dissemination, distribution or copying of >> this >> e-mail is strictly prohibited. If you have received this e-mail in error, >> please notify the sender and permanently delete the e-mail and any >> attachments immediately. You should not retain, copy or use this e-mail or >> any attachment for any purpose, nor disclose all or any part of the >> contents to any other person. Thank you.* >> ___ >> Kamailio (SER) - Users Mailing List >> sr-users@lists.kamailio.org >> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users >> > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] uri_param function
Andrew, I believe per docs it finds a param with no value, so it may not match if there is a value on that attribute. On Mon, Jan 21, 2019 at 1:24 PM Andrew Chen wrote: > Hi all, > > Question. I'm executing uri_param() function to look for our customized > Request-URI parameters generated by our client. However, it keeps saying > the param is not there even though my client logs shows the param was > generated. Below is an example Request-URI from a test call I made: > > sips:@sjomainkamavip50.fuzemeeting.com:443;FN= > sjomainfn92.a.fuzemeeting.com;BR=sjomainfn91.a.fuzemeeting.com;AK= key>;transport=wss" > > And here is my line of code to check it: > > if(uri_param("AK") ||uri_param("ak")) { > xlog("L_INFO", "[CSeq $cs] AK value > detected"); > } else { > xlog("L_INFO", "[CSeq $cs] AK value not > detected. Aborting call"); > drop(); > } > Am I misusing this function somehow? > > I'm running 5.1.2. > > Thanks > > Regards, > > -- > Andy Chen > > > *Confidentiality Notice: The information contained in this e-mail and any > attachments may be confidential. If you are not an intended recipient, you > are hereby notified that any dissemination, distribution or copying of this > e-mail is strictly prohibited. If you have received this e-mail in error, > please notify the sender and permanently delete the e-mail and any > attachments immediately. You should not retain, copy or use this e-mail or > any attachment for any purpose, nor disclose all or any part of the > contents to any other person. Thank you.* > ___ > Kamailio (SER) - Users Mailing List > sr-users@lists.kamailio.org > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] uri_param function
Hi all, Question. I'm executing uri_param() function to look for our customized Request-URI parameters generated by our client. However, it keeps saying the param is not there even though my client logs shows the param was generated. Below is an example Request-URI from a test call I made: sips:@sjomainkamavip50.fuzemeeting.com:443;FN= sjomainfn92.a.fuzemeeting.com;BR=sjomainfn91.a.fuzemeeting.com;AK=;transport=wss" And here is my line of code to check it: if(uri_param("AK") ||uri_param("ak")) { xlog("L_INFO", "[CSeq $cs] AK value detected"); } else { xlog("L_INFO", "[CSeq $cs] AK value not detected. Aborting call"); drop(); } Am I misusing this function somehow? I'm running 5.1.2. Thanks Regards, -- Andy Chen -- *Confidentiality Notice: The information contained in this e-mail and any attachments may be confidential. If you are not an intended recipient, you are hereby notified that any dissemination, distribution or copying of this e-mail is strictly prohibited. If you have received this e-mail in error, please notify the sender and permanently delete the e-mail and any attachments immediately. You should not retain, copy or use this e-mail or any attachment for any purpose, nor disclose all or any part of the contents to any other person. Thank you.* ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users