[OpenSIPS-Users] Pass calls to another realm via gateway

Alexander goal81 at gmail.com
Mon Nov 2 21:25:24 CET 2009


> El Lunes, 2 de Noviembre de 2009, Alexander escribió:
>>   Thanks for advice, but I want to change something like this:
>> 
>>   From: "Some user" <sip:xxxxxx at domain.com <sip%3Axxxxxx at domain.com>>
>> 
>>   to:
>> 
>>   From: sip:xxxxxx at domain.com <sip%3Axxxxxx at domain.com>
>> 
>>   We don't need info inside quotation marks, and quotation marks
>>  themselves.

> That's right. However I don't know why a proxy should remove the From display 
> name. If you are routing the request to a PSTN gateway and you have UDP size 
> issues then it's ok, but if not...

  Yes,  because  of  our gateway. For example, X-Lite inserts name to "From", if
number   presents   in   address  book and we get something like "From: "person"
<sip:xxx at domain.com>". So, because of two reasons (we are not interested in such
info,  and UDP size  issue  is  critical)  we can  chop it (in our case, but for
somebody else it may be unacceptable).

>>  And my regullar expression does not cut something like
>>  "tag=..." and so on, because it does not contain "^" and "$". As I think,
>>  it pretty harmless.

> I didn't mean that. Instead I meant that your regular expression would work 
> for the following From headers:

> subst("/^From: \".+\" (<sip: *[a-zA-Z0-9_\.-]+ at .*>)/From: \1/ig");

> a) From: sip:alice at domain.org;tag=qweqwe
> b) From:<sip:alice at domain.org>;tag=qweqwe
> c) From: <sip:user;aaa=bbb at domain.org>;tag=qweqwe
> d) From: <tel:+12345678>;tag=qweqwe

> a) fails because it doesn't use < >.

  It's   ok,  it  doesn't contain person's name in quotation marks, which should
stand before "<". Nothing to chop.

> b) fails because there is no space between "From:" and SIP URI.

  Almost  as  a) By  the way, our gateway doesn't accept such "From" headers. It
doesn't like "<" and ">" signs, when there is no person name.

> c) fails because there are params in the username part but your regular 
> expressión doesn't allow ";" in the username part. Neither other valid symbols 
> as ~ are allowed.
> d) fails because your regular expression doesn't allow TEL URI's.

  Well, this may be a problem. I'll try to add possible valid characters.

-- 
С уважением,
 Alexander                          mailto:goal81 at gmail.com




More information about the Users mailing list