How to increase number of SIP-AVP in reply
Hi, I am setting these SIP-AVP's in freeradius reply to opensips. But see freeradius sending only one(first)AVP back to opensips. Mon Feb 22 19:54:51 2016 : Debug: rlm_python:authenticate: 'reply:SIP-AVP' = 'allowedCallTime:86400' Mon Feb 22 19:54:51 2016 : Debug: (0) python: ::: FROM 1 TO 0 MAX 1 Mon Feb 22 19:54:51 2016 : Debug: (0) python: ::: Examining SIP-AVP Mon Feb 22 19:54:51 2016 : Debug: (0) python: ::: APPENDING SIP-AVP FROM 0 TO 0 Mon Feb 22 19:54:51 2016 : Debug: (0) python: ::: TO in 0 out 0 Mon Feb 22 19:54:51 2016 : Debug: rlm_python:authenticate: 'reply:SIP-AVP' = 'isCname:No' Mon Feb 22 19:54:51 2016 : Debug: (0) python: ::: FROM 1 TO 1 MAX 2 Mon Feb 22 19:54:51 2016 : Debug: (0) python: ::: Examining SIP-AVP Mon Feb 22 19:54:51 2016 : Debug: (0) python: ::: TO in 1 out 1 Mon Feb 22 19:54:51 2016 : Debug: (0) python: ::: to[0] = SIP-AVP Mon Feb 22 19:54:51 2016 : Debug: rlm_python:authenticate: 'reply:SIP-AVP' = 'accountCode:6034604325' Mon Feb 22 19:54:51 2016 : Debug: (0) python: ::: FROM 1 TO 1 MAX 2 Mon Feb 22 19:54:51 2016 : Debug: (0) python: ::: Examining SIP-AVP Mon Feb 22 19:54:51 2016 : Debug: (0) python: ::: TO in 1 out 1 Mon Feb 22 19:54:51 2016 : Debug: (0) python: ::: to[0] = SIP-AVP Mon Feb 22 19:54:51 2016 : Debug: rlm_python:authenticate: 'reply:SIP-AVP' = 'rtp_proxy:No' Mon Feb 22 19:54:51 2016 : Debug: (0) python: ::: FROM 1 TO 1 MAX 2 Mon Feb 22 19:54:51 2016 : Debug: (0) python: ::: Examining SIP-AVP Mon Feb 22 19:54:51 2016 : Debug: (0) python: ::: TO in 1 out 1 Mon Feb 22 19:54:51 2016 : Debug: (0) python: ::: to[0] = SIP-AVP Mon Feb 22 19:54:51 2016 : Debug: rlm_python:authenticate: 'reply:SIP-AVP' = 'callrecording:No' Mon Feb 22 19:54:51 2016 : Debug: (0) python: ::: FROM 1 TO 1 MAX 2 Mon Feb 22 19:54:51 2016 : Debug: (0) python: ::: Examining SIP-AVP Mon Feb 22 19:54:51 2016 : Debug: (0) python: ::: TO in 1 out 1 Mon Feb 22 19:54:51 2016 : Debug: (0) python: ::: to[0] = SIP-AVP Mon Feb 22 19:54:51 2016 : Debug: (0) modsingle[authenticate]: returned from python (rlm_python) for request 0 Mon Feb 22 19:54:51 2016 : Debug: (0) [python] = ok Mon Feb 22 19:54:51 2016 : Debug: (0) } # Auth-Type Python = ok Mon Feb 22 19:54:51 2016 : Debug: (0) # Executing section post-auth from file /usr/local/radius01/etc/raddb/sites-enabled/default Mon Feb 22 19:54:51 2016 : Debug: (0) post-auth { Mon Feb 22 19:54:51 2016 : Debug: (0) update { Mon Feb 22 19:54:51 2016 : Debug: (0) No attributes updated Mon Feb 22 19:54:51 2016 : Debug: (0) } # update = noop Mon Feb 22 19:54:51 2016 : Debug: (0) modsingle[post-auth]: calling exec (rlm_exec) for request 0 Mon Feb 22 19:54:51 2016 : Debug: (0) modsingle[post-auth]: returned from exec (rlm_exec) for request 0 Mon Feb 22 19:54:51 2016 : Debug: (0) [exec] = noop Mon Feb 22 19:54:51 2016 : Debug: (0) } # post-auth = noop *Mon Feb 22 19:54:51 2016 : Debug: (0) Sent Access-Accept Id 86 from 127.0.0.1:1812 <http://127.0.0.1:1812> to 127.0.0.1:47158 <http://127.0.0.1:47158> length 0* *Mon Feb 22 19:54:51 2016 : Debug: (0) SIP-AVP = "allowedCallTime:86400"* Mon Feb 22 19:54:51 2016 : Debug: (0) Finished request Mon Feb 22 19:54:51 2016 : Debug: Waking up in 4.9 seconds. Mon Feb 22 19:54:56 2016 : Debug: (0) Cleaning up request packet ID 86 with timestamp +8 Mon Feb 22 19:54:56 2016 : Info: Ready to process requests I see these is somewhere MAX limit for AVP set, but can't figure out where it is set. I am using freeradius 3.0.11. In freeradius 2.2.9 i was able to set multiple AVPs in reply. Any pointer is much appreciated. Thanks in Advance.
On Feb 23, 2016, at 12:06 PM, Aqs Younas <aqsyounas@gmail.com> wrote:
I am setting these SIP-AVP's in freeradius reply to opensips. But see freeradius sending only one(first)AVP back to open sips.
Read "man unlang". You have to use the "+=" operator to add multiple attributes of the same name. Alan DeKok.
Thanks for your Reply. I am using mod_python for setting SIP-AVP This is how I set them, So where do i need to add "+=" radiusReply = (('SIP-AVP','callrecording:'No ),) + radiusReply radiusReply = (('SIP-AVP','rtp_proxy:'No),) + radiusReply radiusReply = (('SIP-AVP','accountCode:'6034604325 ),) + radiusReply radiusReply = (('SIP-AVP','isCname:'No) ),) + radiusReply radiusReply = (('SIP-AVP','allowedCallTime:86400),) + radiusReply Thanks in Advance. On 23 February 2016 at 22:34, Alan DeKok <aland@deployingradius.com> wrote:
On Feb 23, 2016, at 12:06 PM, Aqs Younas <aqsyounas@gmail.com> wrote:
I am setting these SIP-AVP's in freeradius reply to opensips. But see freeradius sending only one(first)AVP back to open sips.
Read "man unlang".
You have to use the "+=" operator to add multiple attributes of the same name.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On Feb 23, 2016, at 1:08 PM, Aqs Younas <aqsyounas@gmail.com> wrote:
Thanks for your Reply. I am using mod_python for setting SIP-AVP
This is how I set them, So where do i need to add "+="
radiusReply = (('SIP-AVP','callrecording:'No ),) + radiusReply
Use: radiusReply = (('SIP-AVP','+=', 'value' ), That should work. Alan DeKok.
Perfect. Thank You Much. On 24 February 2016 at 00:25, Alan DeKok <aland@deployingradius.com> wrote:
On Feb 23, 2016, at 1:08 PM, Aqs Younas <aqsyounas@gmail.com> wrote:
Thanks for your Reply. I am using mod_python for setting SIP-AVP
This is how I set them, So where do i need to add "+="
radiusReply = (('SIP-AVP','callrecording:'No ),) + radiusReply
Use:
radiusReply = (('SIP-AVP','+=', 'value' ),
That should work.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
participants (2)
-
Alan DeKok -
Aqs Younas