RFC 3261 defines that upon reception of a 6xx response, a proxy SHOULD
cancel all forked dialogs and send back the 6xx as the final response to
the upstream UA.
--- rfc 3261, section 16.7 -------
Under the new rules, upon receiving a 6xx, a proxy will issue a CANCEL
request, which will generally result in 487 responses from all
outstanding client transactions, and then at that point the 6xx is
forwarded upstream.
----------------------------------
Some call forking experiments have shown that openser 1.2 does not
follow these rules, instead it seems to disregard any 6xx response and
continue with normal processing of existing forked dialogs.
E.g. if a call forks to five phones and one of them sends back a 603
Declined response, the other four phones continue to ring until
fr_inv_timer fires and failure_route is called with a status of 408 Timeout.
Is it possible to make openser more SIP RFC compliant through
configuration or does this need a code change?
thanks,
Christian
Hi,
I would like to route all incoming requests which have a "proxy IP"
in the request URI to a specific domain.
How can I do this through changing openser.cfg?
Thanks for the help,
Piyush
Hello everyone,
I am facing a problem trying to load data from MySQL in ser.cfg. I need to
load the subsciber's email address in order to pass it to SEMS. I've tried
two modules (avpops and db_ops) both with no success.
I am using Ser 2.0.0-rc1 and I added an 'email' column to the uri table.
Here is the DB schema (only 1 row shown without did, flags and scheme
colums):
+--------------+------------------------------+--------------------------+
| username | uid | email |
+--------------+------------------------------+--------------------------+
| sb4157762898 | sb4157762898(a)sq2.doclinx.com | sb4157762898(a)doclinx.com
| |
+--------------+------------------------------+--------------------------+
A. avpops module. I have the following module params:
modparam("avpops", "avp_table", "uri")
modparam("avpops", "uid_column", "uid");
modparam("avpops", "avp_aliases", "email=i:47")
modparam("avpops", "db_scheme",
"email_scheme:table=uri;uid_col=uid;value_col=email;value_type=string")
Then when I'm going to forward to SEMS:
avp_db_load("$to", "$email/$email_scheme");
xlog("L_INFO",
"route INBOUND[%rm]: voicemail, email=%$email, from: [%fu], To:
[%tu]\n");
append_hf("P-App-Name: voicemail\r\n");
append_hf("P-App-Param: Email-Address=%$email\r\n");
rewritehostport("127.0.0.1:5070");
t_relay_to_udp("127.0.0.1","5070");
Here is the appropriate excerpt from the SER log (from the xlog statement
above):
Jul 9 13:12:39 sq2 /usr/local/sbin/ser[5595]: route INBOUND[INVITE]:
voicemail, email=<null>, from: [sip:sb7037160791@sq2.doclinx.com], To:
[sip:sb4157762898@sq2.doclinx.com]
2. db_ops module. I have the following module params:
modparam("db_ops", "declare_query", "select/uri/email/uid///%$t.uid");
Then when I'm going to forward to SEMS:
$email = @db_query[0];
xlog("L_INFO",
"route INBOUND[%rm]: voicemail, email=%$email, from: [%fu], To:
[%tu]\n");
append_hf("P-App-Name: voicemail\r\n");
append_hf("P-App-Param: Email-Address=%$email\r\n");
rewritehostport("127.0.0.1:5070");
t_relay_to_udp("127.0.0.1","5070");
This makes SER fail on startup with this message:
0(5693) Unable to resolve select 'db_query' at level 0
0(5693) BUG: route.c:492: Unable to resolve select
ERROR: error -1 while trying to fix configuration
I have followed the README file in db_ops to the letter. What am I missng?
I'd be be happy to post ser.cfg and the log file.
Thank you very much for your help.
Best regards,
- Ravin
Hi all,
I'm using openser from the SVN. The configuration file that I'm using
is attached. The server upon receiving PUBLISH, replies with a 200 OK.
But doesnt send out NOTIFY.
I want to use the presence modules, without XCAP. I just want the
server to send out SUBSCRIBE on the UA's behalf, by looking up the
values from the database and also to send out NOTIFY on the UA's
behalf, whenever it receives the PUBLISH, all without having anything
to do with XCAP. Is this possible ? If yes, what changes do I need to
do with the configuration file.
Thank you in advance.
Kumar
#0 0x080844a7 in comp_s2s (op=Variable "op" is not available.
) at route.c:748
#1 0x080847ef in comp_scriptvar (msg=0x81787b0, op=21, left=0x8170a60,
right=0x8170a6c) at route.c:948
#2 0x080850a5 in eval_expr (e=0x8170a58, msg=0x81787b0, val=0x0) at
route.c:1323
#3 0x0808517e in eval_expr (e=0x8170c38, msg=0x81787b0, val=0x0) at
route.c:1365
#4 0x08084dcf in eval_expr (e=0x8170c60, msg=0x81787b0, val=0x0) at
route.c:1374
#5 0x08050b5c in do_action (a=0x8170ed0, msg=0x81787b0) at action.c:783
#6 0x0805329c in run_action_list (a=0x81708c0, msg=0x81787b0) at
action.c:131
#7 0x08051c20 in do_action (a=0x8166648, msg=0x81787b0) at action.c:111
#8 0x0805329c in run_action_list (a=0x8155010, msg=0x81787b0) at
action.c:131
#9 0x080534cf in run_top_route (a=0x8155010, msg=0x81787b0) at
action.c:111
#10 0x0807b4a6 in receive_msg (
buf=0x811b160 "ACK sip:DEMO1@213.5.43.4 SIP/2.0\r\nVia: SIP/2.0/UDP
213.5.17.78:5060;branch=z9hG4bK7a9dbc5b;rport\r\nFrom: \"GEOP
Papadopoul\" <sip:2116872933@altecnet.gr>;tag=as4aecac7c\r\nTo:
<sip:DEMO1@213.5.43.4>;tag=b3"..., len=411,
rcv_info=0xbffb2d40) at receive.c:156
#11 0x080a4475 in udp_rcv_loop () at udp_server.c:451
#12 0x0806a116 in main_loop () at main.c:834
#13 0x0806c007 in main (argc=6, argv=0xbffb2f24) at main.c:1393
> -----Original Message-----
> From: Daniel-Constantin Mierla [mailto:daniel@voice-system.ro]
> Sent: Monday, July 09, 2007 3:03 PM
> To: Papadopoulos Georgios
> Cc: users(a)openser.org
> Subject: Re: [OpenSER-Users] crash when checking empty destination uri
>
> Hello,
>
> On 07/09/07 13:50, Papadopoulos Georgios wrote:
> > Hi Daniel,
> >
> > Here is the ACK packet
> >
> > U 2007/07/09 13:13:31.577697 213.5.17.78:5060 ->
> 213.5.43.4:5060 ACK
> > sip:demo1@213.5.168.214:54656 SIP/2.0.
> > Via: SIP/2.0/UDP 213.5.17.78:5060;branch=z9hG4bK504461f5;rport.
> > Route: <sip:213.5.43.4;lr=on;ftag=as2f3574dc>.
> > From: "GEOP Papadopoul" <sip:2116872933@altecnet.gr>;tag=as2f3574dc.
> > To: <sip:DEMO1@213.5.43.4>;tag=80299598395.
> > Contact: <sip:2116872933@213.5.17.78>.
> > Call-ID: 088e7cdc7176016349ad45ea69468b7b(a)altecnet.gr.
> > CSeq: 102 ACK.
> > User-Agent: Asterisk PBX.
> > Max-Forwards: 70.
> > Content-Length: 0.
> >
> > How do I get the backtrace that you need? All I get from
> gdb is this:
> > #0 0x080844a7 in ?? ()
> > #1 0xbffb26e0 in ?? ()
> > #2 0x00b56cee in ?? ()
> > #3 0x00000000 in ?? ()
> >
>
> Check if you got a core file, and then:
> gdb /path/to/openser /path/to/core_file
>
> # bt
>
> Cheers,
> Daniel
>
> > Best regards
> >
> > George
> >
> >
> >
> >
> >> -----Original Message-----
> >> From: Daniel-Constantin Mierla [mailto:daniel@voice-system.ro]
> >> Sent: Monday, July 09, 2007 12:10 PM
> >> To: Papadopoulos Georgios
> >> Cc: users(a)openser.org
> >> Subject: Re: [OpenSER-Users] crash when checking empty destination
> >> uri
> >>
> >> Hello George,
> >>
> >> if loose_route returns true, the $du should be set. Can
> you send me a
> >> sample of such ACK along with the backtrace?
> >>
> >> Cheers,
> >> Daniel
> >>
> >>
> >> On 07/09/07 10:52, Papadopoulos Georgios wrote:
> >>
> >>> Hi Daniel,
> >>>
> >>> Thank you for looking into this. I got from SVN the patch
> for rev.
> >>> 2420 and I applied it to my 1.2 branch. OpenSER still
> >>>
> >> crashes at the
> >>
> >>> same point. Did I get the right patch? The one I have
> >>>
> >> changes one line
> >>
> >>> on route.c and transformations.c. I will add it at the end
> >>>
> >> of the email.
> >>
> >>> Best regards
> >>>
> >>> George
> >>>
> >>>
> >>> Index: route.c^M
> >>>
> >>>
> >>
> ===================================================================^M
> >>
> >>> --- route.c (revision 2419)^M
> >>> +++ route.c (revision 2420)^M
> >>> @@ -446,6 +446,9 @@^M
> >>> char backup2;
> >>> str res;
> >>> xl_value_t value;
> >>> +
> >>> + if(ival==NULL || ival->s==NULL)
> >>> + goto error;
> >>>
> >>> res.s = 0; res.len = 0;
> >>> if(opd->type == SCRIPTVAR_ST)
> >>> Index: transformations.c^M
> >>>
> >>>
> >>
> ===================================================================^M
> >>
> >>> --- transformations.c (revision 2419)^M
> >>> +++ transformations.c (revision 2420)^M
> >>> @@ -71,7 +71,8 @@^M
> >>> char *p, *s;
> >>> str st;
> >>> xl_value_t v;
> >>> - if(val==NULL)
> >>> +
> >>> + if(val==NULL || val->flags&XL_VAL_NULL)
> >>> return -1;
> >>>
> >>> switch(subtype)
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>> -----Original Message-----
> >>>> From: Daniel-Constantin Mierla [mailto:daniel@voice-system.ro]
> >>>> Sent: Friday, July 06, 2007 9:19 PM
> >>>> To: Papadopoulos Georgios
> >>>> Cc: users(a)openser.org
> >>>> Subject: Re: [OpenSER-Users] crash when checking empty
> destination
> >>>> uri
> >>>>
> >>>> Hello,
> >>>>
> >>>> On 07/06/07 17:09, Papadopoulos Georgios wrote:
> >>>>
> >>>>
> >>>>> Hello,
> >>>>>
> >>>>> I have the following line in my script which causes OpenSER
> >>>>>
> >>>>>
> >>>> (1.2) to
> >>>>
> >>>>
> >>>>> crash when the execution gets there for an ACK.
> >>>>> if ($du=~"[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)")
> >>>>> It gets at this line when an ACK is received and after
> >>>>>
> >>>>>
> >>>> loose_route()
> >>>>
> >>>>
> >>>>> returns true. So I am guessing the destination uri is
> >>>>>
> >> null at that
> >>
> >>>>> point and the check causes OpenSER to crash.
> >>>>>
> >>>>> If I add the following check then everything works fine.
> >>>>> if (isdsturiset() &&
> >>>>> $du=~"[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)")
> >>>>>
> >>>>>
> >>>> can you test with devel version? I applied a patch, and if
> >>>>
> >> ok, I will
> >>
> >>>> backport. Thanks for reporting.
> >>>>
> >>>> Cheers,
> >>>> Daniel
> >>>>
> >>>>
> >>>>
> >>>>>
> >>>>> thank you
> >>>>>
> >>>>> George
> >>>>>
> >>>>>
> >>>>>
> >>>>> Disclaimer
> >>>>>
> >>>>> The information in this e-mail and any attachments is
> >>>>>
> >>>>>
> >>>> confidential. It
> >>>>
> >>>>
> >>>>> is intended solely for the attention and use of the named
> >>>>> addressee(s). If you are not the intended recipient, or person
> >>>>> responsible for delivering this information to the intended
> >>>>>
> >>>>>
> >>>> recipient,
> >>>>
> >>>>
> >>>>> please notify the sender immediately. Unless you are
> the intended
> >>>>> recipient or his/her representative you are not
> >>>>>
> >> authorized to, and
> >>
> >>>>> must not, read, copy, distribute, use or retain this
> >>>>>
> >> message or any
> >>
> >>>>> part of it. E-mail transmission cannot be guaranteed to be
> >>>>>
> >>>>>
> >>>> secure or
> >>>>
> >>>>
> >>>>> error-free as information could be intercepted,
> corrupted, lost,
> >>>>> destroyed, arrive late or incomplete, or contain viruses.
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>
> ---------------------------------------------------------------------
> >>
> >>>> -
> >>>>
> >>>>
> >>>>> --
> >>>>>
> >>>>> _______________________________________________
> >>>>> Users mailing list
> >>>>> Users(a)openser.org
> >>>>> http://openser.org/cgi-bin/mailman/listinfo/users
> >>>>>
> >>>>>
> >>>>>
> >>>
> >>>
> >
> >
>
Hi Daniel,
Here is the ACK packet
U 2007/07/09 13:13:31.577697 213.5.17.78:5060 -> 213.5.43.4:5060
ACK sip:demo1@213.5.168.214:54656 SIP/2.0.
Via: SIP/2.0/UDP 213.5.17.78:5060;branch=z9hG4bK504461f5;rport.
Route: <sip:213.5.43.4;lr=on;ftag=as2f3574dc>.
From: "GEOP Papadopoul" <sip:2116872933@altecnet.gr>;tag=as2f3574dc.
To: <sip:DEMO1@213.5.43.4>;tag=80299598395.
Contact: <sip:2116872933@213.5.17.78>.
Call-ID: 088e7cdc7176016349ad45ea69468b7b(a)altecnet.gr.
CSeq: 102 ACK.
User-Agent: Asterisk PBX.
Max-Forwards: 70.
Content-Length: 0.
How do I get the backtrace that you need? All I get from gdb is this:
#0 0x080844a7 in ?? ()
#1 0xbffb26e0 in ?? ()
#2 0x00b56cee in ?? ()
#3 0x00000000 in ?? ()
Best regards
George
> -----Original Message-----
> From: Daniel-Constantin Mierla [mailto:daniel@voice-system.ro]
> Sent: Monday, July 09, 2007 12:10 PM
> To: Papadopoulos Georgios
> Cc: users(a)openser.org
> Subject: Re: [OpenSER-Users] crash when checking empty destination uri
>
> Hello George,
>
> if loose_route returns true, the $du should be set. Can you
> send me a sample of such ACK along with the backtrace?
>
> Cheers,
> Daniel
>
>
> On 07/09/07 10:52, Papadopoulos Georgios wrote:
> > Hi Daniel,
> >
> > Thank you for looking into this. I got from SVN the patch for rev.
> > 2420 and I applied it to my 1.2 branch. OpenSER still
> crashes at the
> > same point. Did I get the right patch? The one I have
> changes one line
> > on route.c and transformations.c. I will add it at the end
> of the email.
> >
> > Best regards
> >
> > George
> >
> >
> > Index: route.c^M
> >
> ===================================================================^M
> > --- route.c (revision 2419)^M
> > +++ route.c (revision 2420)^M
> > @@ -446,6 +446,9 @@^M
> > char backup2;
> > str res;
> > xl_value_t value;
> > +
> > + if(ival==NULL || ival->s==NULL)
> > + goto error;
> >
> > res.s = 0; res.len = 0;
> > if(opd->type == SCRIPTVAR_ST)
> > Index: transformations.c^M
> >
> ===================================================================^M
> > --- transformations.c (revision 2419)^M
> > +++ transformations.c (revision 2420)^M
> > @@ -71,7 +71,8 @@^M
> > char *p, *s;
> > str st;
> > xl_value_t v;
> > - if(val==NULL)
> > +
> > + if(val==NULL || val->flags&XL_VAL_NULL)
> > return -1;
> >
> > switch(subtype)
> >
> >
> >
> >
> >> -----Original Message-----
> >> From: Daniel-Constantin Mierla [mailto:daniel@voice-system.ro]
> >> Sent: Friday, July 06, 2007 9:19 PM
> >> To: Papadopoulos Georgios
> >> Cc: users(a)openser.org
> >> Subject: Re: [OpenSER-Users] crash when checking empty destination
> >> uri
> >>
> >> Hello,
> >>
> >> On 07/06/07 17:09, Papadopoulos Georgios wrote:
> >>
> >>> Hello,
> >>>
> >>> I have the following line in my script which causes OpenSER
> >>>
> >> (1.2) to
> >>
> >>> crash when the execution gets there for an ACK.
> >>> if ($du=~"[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)")
> >>> It gets at this line when an ACK is received and after
> >>>
> >> loose_route()
> >>
> >>> returns true. So I am guessing the destination uri is
> null at that
> >>> point and the check causes OpenSER to crash.
> >>>
> >>> If I add the following check then everything works fine.
> >>> if (isdsturiset() &&
> >>> $du=~"[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)")
> >>>
> >> can you test with devel version? I applied a patch, and if
> ok, I will
> >> backport. Thanks for reporting.
> >>
> >> Cheers,
> >> Daniel
> >>
> >>
> >>>
> >>> thank you
> >>>
> >>> George
> >>>
> >>>
> >>>
> >>> Disclaimer
> >>>
> >>> The information in this e-mail and any attachments is
> >>>
> >> confidential. It
> >>
> >>> is intended solely for the attention and use of the named
> >>> addressee(s). If you are not the intended recipient, or person
> >>> responsible for delivering this information to the intended
> >>>
> >> recipient,
> >>
> >>> please notify the sender immediately. Unless you are the intended
> >>> recipient or his/her representative you are not
> authorized to, and
> >>> must not, read, copy, distribute, use or retain this
> message or any
> >>> part of it. E-mail transmission cannot be guaranteed to be
> >>>
> >> secure or
> >>
> >>> error-free as information could be intercepted, corrupted, lost,
> >>> destroyed, arrive late or incomplete, or contain viruses.
> >>>
> >>>
> >>>
> >>
> ---------------------------------------------------------------------
> >> -
> >>
> >>> --
> >>>
> >>> _______________________________________________
> >>> Users mailing list
> >>> Users(a)openser.org
> >>> http://openser.org/cgi-bin/mailman/listinfo/users
> >>>
> >>>
> >
> >
>
Hi Daniel,
Thank you for looking into this. I got from SVN the patch for rev. 2420
and I applied it to my 1.2 branch. OpenSER still crashes at the same
point. Did I get the right patch? The one I have changes one line on
route.c and transformations.c. I will add it at the end of the email.
Best regards
George
Index: route.c^M
===================================================================^M
--- route.c (revision 2419)^M
+++ route.c (revision 2420)^M
@@ -446,6 +446,9 @@^M
char backup2;
str res;
xl_value_t value;
+
+ if(ival==NULL || ival->s==NULL)
+ goto error;
res.s = 0; res.len = 0;
if(opd->type == SCRIPTVAR_ST)
Index: transformations.c^M
===================================================================^M
--- transformations.c (revision 2419)^M
+++ transformations.c (revision 2420)^M
@@ -71,7 +71,8 @@^M
char *p, *s;
str st;
xl_value_t v;
- if(val==NULL)
+
+ if(val==NULL || val->flags&XL_VAL_NULL)
return -1;
switch(subtype)
> -----Original Message-----
> From: Daniel-Constantin Mierla [mailto:daniel@voice-system.ro]
> Sent: Friday, July 06, 2007 9:19 PM
> To: Papadopoulos Georgios
> Cc: users(a)openser.org
> Subject: Re: [OpenSER-Users] crash when checking empty destination uri
>
> Hello,
>
> On 07/06/07 17:09, Papadopoulos Georgios wrote:
> > Hello,
> >
> > I have the following line in my script which causes OpenSER
> (1.2) to
> > crash when the execution gets there for an ACK.
> > if ($du=~"[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)")
> > It gets at this line when an ACK is received and after
> loose_route()
> > returns true. So I am guessing the destination uri is null at that
> > point and the check causes OpenSER to crash.
> >
> > If I add the following check then everything works fine.
> > if (isdsturiset() &&
> > $du=~"[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)")
> can you test with devel version? I applied a patch, and if
> ok, I will backport. Thanks for reporting.
>
> Cheers,
> Daniel
>
> >
> > thank you
> >
> > George
> >
> >
> >
> > Disclaimer
> >
> > The information in this e-mail and any attachments is
> confidential. It
> > is intended solely for the attention and use of the named
> > addressee(s). If you are not the intended recipient, or person
> > responsible for delivering this information to the intended
> recipient,
> > please notify the sender immediately. Unless you are the intended
> > recipient or his/her representative you are not authorized to, and
> > must not, read, copy, distribute, use or retain this message or any
> > part of it. E-mail transmission cannot be guaranteed to be
> secure or
> > error-free as information could be intercepted, corrupted, lost,
> > destroyed, arrive late or incomplete, or contain viruses.
> >
> >
> ----------------------------------------------------------------------
> > --
> >
> > _______________________________________________
> > Users mailing list
> > Users(a)openser.org
> > http://openser.org/cgi-bin/mailman/listinfo/users
> >
>
Hi, Szasz!
I found that both UAC are only sending out packets but didn't receive any
packets from either party. For instance, softphone A only send packets to
serverA whereas softphone B only send packets to serverB.
Is there any other settings that I need configure as well? Which firewall
settings that I need to check (server/client)?
Thanks.
Roa Yu
-----Original Message-----
From: Szasz Szabolcs [mailto:sszasz@digicomm.ro]
Sent: Monday, July 09, 2007 4:40 PM
To: roayu
Cc: serusers(a)lists.iptel.org
Subject: Re: [Serusers] How SER communicate to other SIP server
Hi!
See your firewall settings, probably you don't allow to forward the RTP
packets.
Szasz Szabolcs
----- Original Message -----
From: "roayu" <roayu(a)ctisys.net>
To: "Olaf Bergmann" <Olaf.Bergmann(a)freenet-ag.de>
Cc: <serusers(a)lists.iptel.org>
Sent: Monday, July 09, 2007 11:12 AM
Subject: Re: [Serusers] How SER communicate to other SIP server
> Hi, Olaf!
>
> I managed to call to the other SIP server. Unfortunately, both sides can't
> hear anything. What could be the problem? Could it be the NAT issue? If
> so,
> where should I allocate them to use the mediaproxy(before/after
> rewritehostport())?
>
>
> Thanks.
>
> Best regards,
> Roa Yu
>
>
> -----Original Message-----
> From: Olaf Bergmann [mailto:Olaf.Bergmann@freenet-ag.de]
> Sent: Wednesday, July 04, 2007 2:14 PM
> To: roayu
> Cc: serusers(a)lists.iptel.org
> Subject: Re: [Serusers] How SER communicate to other SIP server
>
> roayu wrote:
>> Hi, Olaf!
>>
>>>From what I understand about forward() is that it will forward the
>>>request
>> to the given destination statelessly. Whereas for t_relay(), it will
>> relay
> a
>> message to the destination stated in current URI statefully. How do I get
>> the URI to point to the other SIP server by using t_relay() as I couldn't
>> assign any IP address for t_relay(). I managed to assign an IP address by
>> using forward().
>>
>> I tried to use both. Unfortunately, I still failed to forward the message
> to
>> the another SIP server to establish the call. Is there any functions I
> need
>> to use before using either those 2 functions? FYI, I will only call them
>> when it starts to INVITE.
>
> 482 Loop Detected
>
> The function you are looking for is called rewritehostport (or
> rewritehost, if you like). But you could also use
> t_relay_to_{udp,tcp} to specify a literal transport address where
> you want your request being routed to.
> <http://www.iptel.org/ser/doc/search> gives more information on
> these functions.
>
> Regards,
> Olaf
> _______________________________________________
> Serusers mailing list
> Serusers(a)lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers