How to integrate mediaproxy in the opensips.cfg file

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

How to integrate mediaproxy in the opensips.cfg file

bay2x1
Can anybody show me sample code in integrating engage_media_proxy and use_media_proxy.  I have recently used engage_media_proxy but it keeps the radacct.UserName empty that is why the rating engine cannot compute for the price of call.
Reply | Threaded
Open this post in threaded view
|

Re: How to integrate mediaproxy in the opensips.cfg file

Iñaki Baz Castillo
El Lunes, 23 de Febrero de 2009, bay2x1 escribió:
> radacct.UserName

That field is set by OpenSIPS, not by MediaProxy, so you have a problem in
your script.

--
Iñaki Baz Castillo

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to integrate mediaproxy in the opensips.cfg file

bay2x1
Thanx for the information, but I am a bit confused on what particular area I have misconfigured the opensips.cfg?



Iñaki Baz Castillo wrote
El Lunes, 23 de Febrero de 2009, bay2x1 escribió:
> radacct.UserName

That field is set by OpenSIPS, not by MediaProxy, so you have a problem in
your script.

--
Iñaki Baz Castillo

_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to integrate mediaproxy in the opensips.cfg file

Iñaki Baz Castillo
El Lunes, 23 de Febrero de 2009, bay2x1 escribió:
> Thanx for the information, but I am a bit confused on what particular area
> I have misconfigured the opensips.cfg?

Ensure you are setting the pseudo-variable which is passed to Radius
with "UserName" name. Commonly $au is used for that purpose.


--
Iñaki Baz Castillo

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to integrate mediaproxy in the opensips.cfg file

bay2x1
I have integrated $au in my opensips.cfg configuration in this code, please correct me if this is wrong.

modparam("acc", "radius_flag", 1)
modparam("acc", "radius_missed_flag", 1)
modparam("acc", "radius_extra", "User-Name=$Au; \
                                 Calling-Station-Id=$from; \
                                 Called-Station-Id=$to; \
                                 Sip-Translated-Request-URI=$ru; \
                                 Sip-RPid=$avp(s:rpid); \
                                 Source-IP=$avp(s:source_ip); \
                                 Source-Port=$avp(s:source_port); \
                                 SIP-Proxy-IP=$avp(s:sip_proxy_ip); \
                                 Canonical-URI=$avp(s:can_uri); \
                                 Billing-Party=$avp(s:billing_party); \
                                 Divert-Reason=$avp(s:divert_reason); \
                                 User-Agent=$hdr(user-agent); \
                                 Contact=$hdr(contact); \
                                 Event=$hdr(event); \
                                 ENUM-TLD=$avp(s:enum_tld)")



Iñaki Baz Castillo wrote
El Lunes, 23 de Febrero de 2009, bay2x1 escribió:
> Thanx for the information, but I am a bit confused on what particular area
> I have misconfigured the opensips.cfg?

Ensure you are setting the pseudo-variable which is passed to Radius
with "UserName" name. Commonly $au is used for that purpose.


--
Iñaki Baz Castillo

_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to integrate mediaproxy in the opensips.cfg file

Iñaki Baz Castillo
El Lunes, 23 de Febrero de 2009, bay2x1 escribió:
> I have integrated $au in my opensips.cfg configuration in this code, please
> correct me if this is wrong.
>
> modparam("acc", "radius_flag", 1)
> modparam("acc", "radius_missed_flag", 1)
> modparam("acc", "radius_extra", "User-Name=$Au; \

$Au != $au (please read the documentation about OpenSIPS pseudo-variables).
Anyway both can be valid, your issue is not here. I hope you understand that
$Au and $au variables are just set *after* authentication, so are you
authenticating users before the accounting?


--
Iñaki Baz Castillo

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to integrate mediaproxy in the opensips.cfg file

bay2x1
I have checked my radacct details and the User-Name is not empty. I think that these data will be saved at radacct table including the UserName=User-Name.

Mon Feb 23 09:27:59 2009
        Acct-Status-Type = Start
        Service-Type = Sip-Session
        Sip-Response-Code = 200
        Sip-Method = Invite
        Event-Timestamp = "Feb 23 2009 09:27:59 PHT"
        Sip-From-Tag = "1643738875"
        Sip-To-Tag = "495548121"
        Acct-Session-Id = "117393189@172.16.100.15"
        User-Name = "1000@xxx.xx.xxx.xx"
        Calling-Station-Id = "sip:1000@xxx.xx.xxx.xx"
        Called-Station-Id = "sip:1001@xxx.xx.xxx.xx"
        Sip-Translated-Request-URI = "sip:xxx.xx.xxx.xx:5060;transport=udp"
        Canonical-URI = "sip:1001@xxx.xx.xxx.xx"
        User-Agent = "Minisip"
        Contact = "<sip:1000@xxx.xx.xxx.xx:5060;transport=udp>;expires=1000"
        NAS-Port = 5060
        Acct-Delay-Time = 0
        NAS-IP-Address = 127.0.0.1
        Client-IP-Address = 127.0.0.1
        Timestamp = 1235352479

Mon Feb 23 09:28:02 2009
        Acct-Status-Type = Stop
        Service-Type = Sip-Session
        Sip-Response-Code = 200
        Sip-Method = Bye
        Event-Timestamp = "Feb 23 2009 09:28:02 PHT"
        Sip-From-Tag = "495548121"
        Sip-To-Tag = "1643738875"
        Acct-Session-Id = "117393189@xxx.xx.xxx.xx"
        User-Name = "1001@xxx.xx.xxx.xx"
        Calling-Station-Id = "sip:1001@xxx.xx.xxx.xx"
        Called-Station-Id = "sip:1000@xxx.xx.xxx.xx"
        Sip-Translated-Request-URI = "sip:1000@xxx.xx.xxx.15:5060;transport=udp"
        Canonical-URI = "sip:1000@xxx.xx.xxx.xx:5060;transport=udp"
        NAS-Port = 5060
        Acct-Delay-Time = 0
        NAS-IP-Address = 127.0.0.1
        Client-IP-Address = 127.0.0.1
        Timestamp = 1235352482



Iñaki Baz Castillo wrote
El Lunes, 23 de Febrero de 2009, bay2x1 escribió:
> I have integrated $au in my opensips.cfg configuration in this code, please
> correct me if this is wrong.
>
> modparam("acc", "radius_flag", 1)
> modparam("acc", "radius_missed_flag", 1)
> modparam("acc", "radius_extra", "User-Name=$Au; \

$Au != $au (please read the documentation about OpenSIPS pseudo-variables).
Anyway both can be valid, your issue is not here. I hope you understand that
$Au and $au variables are just set *after* authentication, so are you
authenticating users before the accounting?


--
Iñaki Baz Castillo

_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users