Iñaki Baz Castillo | 1 Aug 10:18 2007
Picon

Re: [OpenSER-Users] Can't use variables as function parameter?

El Tuesday 31 July 2007 20:38:44 Victor Gamov escribió:
> Iñaki Baz Castillo wrote:
> > Hi, in URI as "ping@..." I need to change URI to just "domain.org"
> > (without the username <at> ). But I have multidomain so can't rewrite uri
> > directly and must use the requested URI domain ($rd).
> >
> > So I try:
> >
> >       if (uri=~"sip:ping[ <at> ]+.*") {
> > 	  rewriteuri("sip:$rd");
> >           xlog("L_INFO", "-- New URI = $ru\r\n");
>
> $ru = "sip:" + $rd ?

Yes, thanks, that works.
Anyway I can't understand why some functions allow variables into their 
parameters and others no :(

Thanks a lot.

--

-- 
Iñaki Baz Castillo
ibc@...

zze-WU Yin RD-MAPS-LAN | 1 Aug 10:53 2007

[OpenSER-Users] Problem with "log_fmt"

Hi, everybody

   I use openser and want to use acc module. But when I tryed to use

   modaparm("acc", "log_fmt", "mfs")

   openser can not start. Can you tell me why?

<div>

<p><span lang="fr">Hi, everybody</span>
</p>

<p><span lang="fr">&nbsp;&nbsp; I use openser and want to use acc module. But when I tryed to use </span>
</p>

<p><span lang="fr">&nbsp;&nbsp; modaparm("acc", "log_fmt", "mfs") </span>
</p>

<p><span lang="fr">&nbsp;&nbsp; openser can not start. Can you tell me why?</span><span lang="zh-cn"></span>
</p>

</div>
zze-WU Yin RD-MAPS-LAN | 1 Aug 11:00 2007

[OpenSER-Users] Attribue User-name was not found in request, unique ID MAY be inconsistent

Hi, everybody

   Another probleme with Openser and Freeradius. When I tried to use the acc module, i recieved:

   rlm_acct_unique: WARNING Attribue User-name was not found in request, unique ID MAY be inconsistent

   And in the Accounting-Request packet, i can not find User-name. Do anybody know why? Thank you very much!!
 

<div>

<p><span lang="fr">Hi, everybody</span>
</p>

<p><span lang="fr">&nbsp;&nbsp; Another probleme with Openser and Freeradius. When I tried to use the acc module, i recieved:</span>
</p>

<p><span lang="fr">&nbsp;&nbsp; rlm_acct_unique: WARNING Attribue User-name was not found in request, unique ID MAY be inconsistent</span>
</p>

<p><span lang="fr">&nbsp;&nbsp; And in the Accounting-Request packet, i can not find User-name. Do anybody know why? Thank you very much!!</span>

<br><span lang="fr">&nbsp;</span><span lang="zh-cn"> </span>
</p>

</div>
Henning Westerholt | 1 Aug 11:05 2007
Picon

Re: [OpenSER-Users] Problem with "log_fmt"

On Wednesday 01 August 2007, zze-WU Yin RD-MAPS-LAN wrote:
> Hi, everybody
>
>    I use openser and want to use acc module. But when I tryed to use
>
>    modaparm("acc", "log_fmt", "mfs")
>
>    openser can not start. Can you tell me why?

Hello,

you'll find more hints why the server don't start in this case in the log 
messages, for example in /var/log/messages or /var/log/daemon.log .

Cheers,

Henning

Iñaki Baz Castillo | 1 Aug 11:10 2007
Picon

Re: [OpenSER-Users] Problem with "log_fmt"

El Wednesday 01 August 2007 10:53:38 zze-WU Yin RD-MAPS-LAN escribió:
> Hi, everybody
>
>    I use openser and want to use acc module. But when I tryed to use
>
>    modaparm("acc", "log_fmt", "mfs")
>
>    openser can not start. Can you tell me why?

Maybe you should write the error you get.

--

-- 
Iñaki Baz Castillo
ibc@...

zze-WU Yin RD-MAPS-LAN | 1 Aug 12:12 2007

[OpenSER-Users] Pb with log_fmt

 Hi, thank you very much. I know what the problem is now. Because I use a openser-1.2.1-notls. So the "log_fmt" is obsolete.

In the http://www.openser.org/docs/modules/1.2.x/acc.htm it wrote that:

The accouting module will log by default a fixed set of attributes for the transaction - if you customize you accouting by adding more information to be logged, please see the next chapter about extra accouting - Section 1.2.

The fixed minimal accouting information is:
Request Method name
From header TAG parameter
To header TAG parameter
Call-Id
3-digit Status code from final reply
Reason phrase from final reply
Time stamp when transaction was completed
If a value is not present in request, the empty string is accounted instead.

I want have a User-Name in the accounting information.

So I saw in the Section 1.2

Selection of extra information is done via xxx_extra parameters by specifying the names of additional information you want to log. This information is defined via pseudo-variables and may include headers or AVPs values or other message or system values. The syntax of the parameter is:


xxx_extra = extra_definition (';'extra_definition)*

extra_definition = log_name '=' pseudo_variable


And the pseudo_variable I need is '$au' for User-Name. But I don't understand how to use this paramater in the openser.cfg. Do you have some ideas??



<div>

<p><span lang="zh-cn">&nbsp;Hi, thank you very much. I know what the problem is now. Because I use a openser-1.2.1-notls. So the "log_fmt" is obsolete. </span></p>

<p><span lang="zh-cn">In the </span><a href="http://www.openser.org/docs/modules/1.2.x/acc.htm"><span lang="zh-cn">http://www.openser.org/docs/modules/1.2.x/acc.htm</span></a><span lang="zh-cn"> it wrote that:</span>
</p>

<p><span lang="zh-cn">The accouting module will log by default a fixed set of attributes for the transaction - if you customize you accouting by adding more information to be logged, please see the next chapter about extra accouting - Section 1.2. </span></p>

<p><span lang="zh-cn">The fixed minimal accouting information is: </span>

<br><span lang="zh-cn">Request Method name</span>

<br><span lang="zh-cn">From header TAG parameter</span>

<br><span lang="zh-cn">To header TAG parameter</span>

<br><span lang="zh-cn">Call-Id</span>

<br><span lang="zh-cn">3-digit Status code from final reply</span>

<br><span lang="zh-cn">Reason phrase from final reply</span>

<br><span lang="zh-cn">Time stamp when transaction was completed</span>

<br><span lang="zh-cn">If a value is not present in request, the empty string is accounted instead. </span>
</p>

<p><span lang="zh-cn">I want have a User-Name in the accounting information.</span>
</p>

<p><span lang="zh-cn">So I saw in the Section 1.2</span>
</p>

<p><span lang="zh-cn">Selection of extra information is done via xxx_extra parameters by specifying the names of additional information you want to log. This information is defined via pseudo-variables and may include headers or AVPs values or other message or system values. The syntax of the parameter is: </span></p>
<br><p><span lang="zh-cn">xxx_extra = extra_definition (';'extra_definition)* </span>
</p>

<p><span lang="zh-cn">extra_definition = log_name '=' pseudo_variable </span>
</p>
<br><p><span lang="zh-cn">And the pseudo_variable I need is '$au' for User-Name. But I don't understand how to use this paramater in the openser.cfg. Do you have some ideas??</span></p>
<br><br>
</div>
Peter Gradwell | 1 Aug 12:54 2007

[OpenSER-Users] Header Mangling

hi ya,

When we send phone call out to our PSTN gateways and carriers, we often 
have to modify the To and From headers to put them in the right syntax 
and to copy the caller id up from the remote-party-id header.

We think the uac module will allow us to do this on the From header,  
but we also need to add/replace digits in the To header, e.g. changing 
it into INTL format, from 01225 to 441225...

If we do this using TextOps then the problem is that it only changes the 
string sent to the Telco switch, and it is not therefore changed on the 
reply, and so the end user agent does not then handle the replies properly.

Does anyone know how we can mangle the To header? Is there a similar 
module to uac for To headers?

cheers
peter

Thomas Deillon | 1 Aug 14:56 2007
Picon

[OpenSER-Users] Dispatcher

Hi,

I'm using OpenSER as PROXY and REGISTRAR server, a Cisco as Gateway and 2 Asterisks (using dispatcher) as Voicemail and conference Servers.

It works perfectly on load-balancing, but not in failover because I never go on the failure route.
Do you have a idea (a part of my config file below) ?
rq: Just for information, the 12 is the milliwatt() function on Asterisks.

my openser.cfg

modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")
modparam("usrloc", "db_url", "mysql://openser:openser <at> localhost/openser")
modparam("usrloc", "db_mode",   1)

modparam("dispatcher","list_file","/usr/local/etc/openser/dispatcher.list")
modparam("dispatcher","flags",2)
modparam("dispatcher", "dst_avp", "$avp(i:271)")
modparam("dispatcher", "grp_avp", "$avp(i:272)")
modparam("dispatcher", "cnt_avp", "$avp(i:273)")
modparam("dispatcher", "force_dst", 1)

route {
[...]

 if (method=="INVITE")
 {
  if (uri=~"sip:12 <at> .*")
  {
   xlog( "L_ERR", "A: $rm $fu:$op -> $du  AVP: $avp(i:271), $avp(i:272), $avp(i:273)\n" );
   ds_select_dst("1", "4");
   #t_relay();
   xlog( "L_ERR", "B: $rm $fu:$op -> $du  AVP: $avp(i:271), $avp(i:272), $avp(i:273)\n" );
   t_on_failure("1");
  }
 }
[...]
}

failure_route[1]
{
 xlog( "L_ERR", "C: $rm $fu:$op -> $du\n" );
 if(t_check_status("408"))
{
   ds_mark_dst();
   ds_next_dst();
 }
 else  {  t_reply("501", "Not Implemented"); }

 xlog( "L_ERR", "D: $rm $fu:$op -> $du\n" );
}

Cheers,

Thomas


<div><p>Hi,<br><br>I'm using OpenSER as PROXY and REGISTRAR server, a Cisco as Gateway and 2 Asterisks (using dispatcher) as Voicemail and conference Servers.<br><br>It works perfectly on load-balancing, but not in failover because I never go on the failure route.
<br>Do you have a idea (a part of my config file below) ?<br>rq: Just for information, the 12 is the milliwatt() function on Asterisks.<br><br>my openser.cfg<br><br>modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")
<br>
modparam("usrloc", "db_url", "mysql://openser:openser <at> localhost/openser")<br>
modparam("usrloc", "db_mode",&nbsp;&nbsp; 1)<br><br>
modparam("dispatcher","list_file","/usr/local/etc/openser/dispatcher.list")<br>
modparam("dispatcher","flags",2)<br>
modparam("dispatcher", "dst_avp", "$avp(i:271)")<br>
modparam("dispatcher", "grp_avp", "$avp(i:272)")<br>
modparam("dispatcher", "cnt_avp", "$avp(i:273)")<br>
modparam("dispatcher", "force_dst", 1)<br><br>
route {<br>
[...]<br><br>
&nbsp;if (method=="INVITE")<br>
&nbsp;{<br>
&nbsp; if (uri=~"sip:12 <at> .*")<br>
&nbsp; {<br>
&nbsp;&nbsp; xlog( "L_ERR", "A: $rm $fu:$op -&gt; $du&nbsp; AVP: $avp(i:271), $avp(i:272), $avp(i:273)\n" );<br>
&nbsp;&nbsp; ds_select_dst("1", "4");<br>
&nbsp;&nbsp; #t_relay();<br>
&nbsp;&nbsp; xlog( "L_ERR", "B: $rm $fu:$op -&gt; $du&nbsp; AVP: $avp(i:271), $avp(i:272), $avp(i:273)\n" );<br>
&nbsp;&nbsp; t_on_failure("1");<br>
&nbsp; }<br>
&nbsp;}<br>
[...]<br>
}<br><br>
failure_route[1]<br>
{<br>
&nbsp;xlog( "L_ERR", "C: $rm $fu:$op -&gt; $du\n" );<br>
&nbsp;if(t_check_status("408"))<br>{<br>
&nbsp;&nbsp; ds_mark_dst();<br>
&nbsp;&nbsp; ds_next_dst();<br>
&nbsp;}<br>
&nbsp;else&nbsp; {&nbsp; t_reply("501", "Not Implemented"); }<br><br>&nbsp;xlog( "L_ERR", "D: $rm $fu:$op -&gt; $du\n" );<br>
}<br><br>Cheers,<br><br>
Thomas<br><br><br></p></div>
Kuddusi | 1 Aug 16:09 2007
Picon

[OpenSER-Users] Adding an attribute to SDP

Hi,

 

How can I add a header to SDP?

 

Actually what I want to do is, whenever an INVITE with SDP comes, search for a ptime and if ptime can not be found, add a default line to SDP body.

 

Like

 

    if (has_body()){

               if (!search_body("ptime") {

      # like below

  à  # append_body(“a=ptime:20”);

    }

    }

 

Thanks,

 

Kuddusi CIFTCIBASI

Next Generation Networks

Teletek Telecommunication Services Corp.

 

Ayazma Dere Cad. AkşitPlaza No:12/1
Fulya, Beşiktaş , 34349, www.teletek.net

 

Tel : +90 212 227 7030

Direkt: +90 212 310 2233
Fax : +90 212 227 8700

Email:  kuddusi.ciftcibasi-4T+EhuwuhabR7s880joybQ@public.gmane.org

 

Skype : realkudu

MSN : kuddusic-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org

Yahoo: kuddusi.

<div>
<div>
<p class="MsoNormal"><span>Hi,<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span><span>How can I 
add a header to SDP?<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span><span>Actually 
what I want to do is, whenever an INVITE with SDP comes, search for a ptime and 
if ptime can not be found, add a default <span>line</span> to SDP body.<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span><span>Like<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span><span>&nbsp;&nbsp;&nbsp; if 
(has_body()){<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
if (<span>!</span>search_body("ptime") 
{<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 
like below<p></p></span></p>
<p class="MsoNormal"><span>&nbsp; </span><span>&agrave;</span><span>&nbsp; # 
append_body(&#147;a=ptime:20&#148;);<p></p></span></p>
<p class="MsoNormal"><span>&nbsp; 
&nbsp;&nbsp;}<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp; 
}<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span><span>Thanks,<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span><span>Kuddusi 
CIFTCIBASI</span></p>
<p class="MsoNormal"><span></span><span>Next Generation 
Networks<p></p></span></p>
<p class="MsoNormal"><span>Teletek 
Telecommunication Services Corp.<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;<p></p></span></p>
<p class="MsoNormal"><span>Ayazma 
Dere Cad. Ak&#351;itPlaza 
No:12/1</span><span><br><span>Fulya, 
Be&#351;ikta&#351; , </span>34349, <span>www.teletek.net</span></span><span><p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>Tel 
: +90 212 227 7030</span><span><p></p></span></p>
<p class="MsoNormal"><span>Direkt: 
+90 212 310 2233</span><span><br><span>Fax : +90 
212 227 8700</span></span><span><p></p></span></p>
<p class="MsoNormal"><span>Email:&nbsp; 
kuddusi.ciftcibasi@...<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>Skype : 
realkudu</span><span><p></p></span></p>
<p class="MsoNormal"><span>MSN : 
</span><span><a title="blocked::mailto:kuddusic@..." href="mailto:kuddusic@..."><span title="blocked::mailto:kuddusic@...">kuddusic@...</span></a></span><span><p></p></span></p>
<p class="MsoNormal"><span>Yahoo: 
kuddusi.</span><span><p></p></span></p>
</div>
</div>
Kuddusi | 1 Aug 17:18 2007
Picon

[OpenSER-Users] Fw: Adding an attribute to SDP

Hi,

 

How can I add a header to SDP?

 

Actually what I want to do is, whenever an INVITE with SDP comes, search for a ptime and if ptime can not be found, add a default line to SDP body.

 

Like

 

    if (has_body()){

               if (!search_body("ptime") {

      # like below

  à  # append_body(“a=ptime:20”);

    }

    }

 

Thanks,

 

Kuddusi CIFTCIBASI

Next Generation Networks

Teletek Telecommunication Services Corp.

 

Ayazma Dere Cad. AkşitPlaza No:12/1
Fulya, Beşiktaş , 34349, www.teletek.net

 

Tel : +90 212 227 7030

Direkt: +90 212 310 2233
Fax : +90 212 227 8700

Email:  kuddusi.ciftcibasi-4T+EhuwuhabR7s880joybQ@public.gmane.org

 

Skype : realkudu

MSN : kuddusic-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org

Yahoo: kuddusi.

<div>
<div><span>Hi,<p></p></span></div>
<div>
<p class="MsoNormal"><span><p>&nbsp;</p></span><span>How can I 
add a header to SDP?<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span><span>Actually 
what I want to do is, whenever an INVITE with SDP comes, search for a ptime and 
if ptime can not be found, add a default <span>line</span> to SDP body.<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span><span>Like<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span><span>&nbsp;&nbsp;&nbsp; if 
(has_body()){<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
if (<span>!</span>search_body("ptime") 
{<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 
like below<p></p></span></p>
<p class="MsoNormal"><span>&nbsp; </span><span>&agrave;</span><span>&nbsp; # 
append_body(&#147;a=ptime:20&#148;);<p></p></span></p>
<p class="MsoNormal"><span>&nbsp; 
&nbsp;&nbsp;}<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;&nbsp;&nbsp; 
}<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span><span>Thanks,<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span><span>Kuddusi 
CIFTCIBASI</span></p>
<p class="MsoNormal"><span></span><span>Next Generation 
Networks<p></p></span></p>
<p class="MsoNormal"><span>Teletek 
Telecommunication Services Corp.<p></p></span></p>
<p class="MsoNormal"><span>&nbsp;<p></p></span></p>
<p class="MsoNormal"><span>Ayazma 
Dere Cad. Ak&#351;itPlaza 
No:12/1</span><span><br><span>Fulya, 
Be&#351;ikta&#351; , </span>34349, <span>www.teletek.net</span></span><span><p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>Tel 
: +90 212 227 7030</span><span><p></p></span></p>
<p class="MsoNormal"><span>Direkt: 
+90 212 310 2233</span><span><br><span>Fax : +90 
212 227 8700</span></span><span><p></p></span></p>
<p class="MsoNormal"><span>Email:&nbsp; 
kuddusi.ciftcibasi@...<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>Skype : 
realkudu</span><span><p></p></span></p>
<p class="MsoNormal"><span>MSN : 
</span><span><a title="blocked::mailto:kuddusic@..." href="mailto:kuddusic@..."><span title="blocked::mailto:kuddusic@...">kuddusic@...</span></a></span><span><p></p></span></p>
<p class="MsoNormal"><span>Yahoo: 
kuddusi.</span><span><p></p></span></p>
</div>
</div>

Gmane