[Users] Using uac_replace_from to munge username between ser and Asterisk?

Bogdan-Andrei Iancu bogdan at voice-system.ro
Mon Jan 30 20:19:34 CET 2006


if you enable auto from_restore_mode, you do not need to perform any 
restore from script. Just replace the from in the initial INVITE and 
this is it - all replies and sequential request would be auto fixed 
(restore/replace).

regards,
bogdan

Barry Flanagan wrote:

> Bogdan-Andrei Iancu wrote:
>
>> Hi Barry,
>>
>> have you set auto from restoring? See:
>>    http://openser.org/docs/modules/1.1.x/uac.html#AEN75
>
>
> Yes, but I am not sure where it is supposed to go.
>
> I have the following in just before relaying to Asterisk:
>
>     rewritehostport("XXX.XXX.XXX.XXX:5060");
>     uac_replace_from("$fn","sip:$au_$ar@$fd");
>     append_hf("P-hint: GATEWAY\r\n");
>     t_relay("udp:XXX.XXX.XXX.XXX:5060");
>
>
> and I put in uac_restore_from(); just after the record_route()
>
>
> with all the other modparams I have:
>
> modparam("uac","from_restore_mode","auto")
>
>
> Thanks for the help.
>
> -Barry
>
>
>> regards,
>> bogdan
>>
>> Barry Flanagan wrote:
>>
>>>
>>> So, the only way around it that I can see is to somehow have OpenSER 
>>> change the username to username_domain so that each will be unique.
>>>
>>> It looks like uac_from_replace should handle this. I have tried it, 
>>> and I can see that Asterisk does in fact get user_domain at domain in 
>>> the first invite, but thereafter for some reason OpenSER changes it 
>>> to just _ at domain for subsequent requests.
>>>
>>>
>>> Regards,
>>>
>>> -Barry
>>>
>
>





More information about the Users mailing list