[OpenSIPS-Users] Gw module or dispatch authentication?
opensipslist at encambio.com
opensipslist at encambio.com
Tue Dec 22 13:11:57 CET 2009
Hello Bogdan,
An mar., déc 22, 2009, Bogdan-Andrei Iancu schrieb:
>opensipslist at encambio.com wrote:
>> Has anyone had this problem of wanting to forward a INVITE to
>> a PSTN gateway, and not being able to authenticate?
>>
>> Is carrierroute really what should be used in this case, or some
>> combination of modules... maybe uac for the authentication?
>>
>Take a look at the UAC module - it can do user auth -
>http://www.opensips.org/html/docs/modules/devel/uac.html
>
>you can use the attr field in the drouting module to store the
>username and password required by that GW and dynamically inject
>them into UAC.
>
Neiter online nor distribution documents mention this 'attr' field:
http://www.opensips.org/html/docs/modules/devel/drouting.html
opensips-1.6.1-tls.orig/modules/drouting/README
...but I believe you that it is just what is needed.
Another problem is that unlike the gw table, the dr_gateways table
doesn't provide a column for the host port number. Before you say
'just tack it on the address field with a : between them', please
note that this would not be compatible with db_text tables which
interpret the ':' as a field separator. This means the 'Table 1.2.
Sample dr_gateways records' in the docs mentioned above are flawed.
With 'dynamically inject them into UAC' I suppose you mean something
similar to:
modparam("uac","auth_realm_avp","$avp(s:realm)")
modparam("uac","auth_username_avp","$avp(s:user)")
modparam("uac","auth_password_avp","$avp(s:pass)")
modparam("drouting", "attrs_avp", "$avp(dr_attrs)")
route {
do_routing();
$avp(s:user) = $avp(dr_attrs); # avp parsing needed
$avp(s:pass) = $avp(dr_attrs); # avp parsing needed
uac_auth();
}
Is that the general idea?
Regards,
Brian
More information about the Users
mailing list