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

Barry Flanagan barryf-lists at flanagan.ie
Mon Jan 30 21:02:27 CET 2006


Bogdan-Andrei Iancu wrote:
> 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).

Aha! Thank you very much  - that seems to have done the trick!

Regards,

-Barry Flanagan

> 
> 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
>>>>
>>
>>
> 


-- 

-Barry Flanagan




More information about the sr-users mailing list