[OpenSIPS-Users] Gw module or dispatch authentication?

Bogdan-Andrei Iancu bogdan at voice-system.ro
Thu Dec 24 11:24:52 CET 2009


Hi Brian,

opensipslist at encambio.com wrote:
> 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
>   

Here it is:

    http://www.opensips.org/html/docs/db/db-schema-1.6.x.html#AEN2152
> ...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.
>   
Wrong :)

As db_text uses ":" as separator, if this char does appear in the column 
content, you need to escape it:
    ...:11.22.33.44\:5070:....
> 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();
>   }
>   
Correct - that is the way it should work.
> Is that the general idea?
>   
yes.

Regards,
Bogdan

> Regards,
> Brian
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro




More information about the Users mailing list