Hi
I use kamailio 4.0.3 with presence. I sometimes get these errors:
Oct 4 09:26:24 server /usr/sbin/kamailio[1292]: ERROR: presence
[publish.c:171]: msg_presentity_clean(): Marking presentity
Oct 4 09:26:34 server /usr/sbin/kamailio[1292]: ERROR: db_mysql
[km_dbase.c:122]: db_mysql_submit_query(): driver error on query:
Duplicate entry 'username-domain-presence-*#-OFFLINE-#*' for key
'presentity_idx'
Oct 4 09:26:34 server /usr/sbin/kamailio[1292]: ERROR: <core>
[db_query.c:337]: db_do_update(): error while submitting query
Oct 4 09:26:34 server /usr/sbin/kamailio[1292]: ERROR: presence
[presentity.c:1281]: mark_presentity_for_delete(): unsuccessful sql
update operation
This is when multiple SIP clients are registered using the same
credentials, they each have a presentity entry, with the same username
and domain but different etags, which is fine. But when they expire, the
presentity.etag will be filled with '*#-OFFLINE-#*', and when both
expire at about the same time, kamailio tries to fill both with the same
'*#-OFFLINE-#*' etag. Because presentity table has a 'CONSTRAINT
presentity_idx UNIQUE (username, domain, event, etag)', this gives the
errors.
Should the constraint be removed to cope with this situation?
Thank you!
Yufei
--
Yufei Tao
Red Embedded
This E-mail and any attachments hereto are strictly confidential and intended solely for the addressee. If you are not the intended addressee please notify the sender by return and delete the message.
You must not disclose, forward or copy this E-mail or attachments to any third party without the prior consent of the sender.
Red Embedded Design, Company Number 06688253 Registered in England: The Waterfront, Salts Mill Rd, Saltaire, BD17 7EZ
Hello,
Consider the following: the Dispatcher module has two destinations loaded.
Now let's say we have the following two scenarios:
Scenario 1:
Kamailio tries to relay the INVITE to the first destination selected by the Dispatcher module, but this destination does not reply for some reason.
Scenario 2:
Kamailio tries to relay the INVITE to the first destination selected by the Dispatcher module, but this destination replies back with a 500 Server Internal Error.
I know that in the first case, Kamailio will enter the failure_route and try to Dispatch the INIVTE to the next destination in the set.
In the second case, I'm not sure, because this would require some custom code to drop the 500 reply and try the next destination in the Dispatcher set. Correct?
If the second case solution is possible and Kamailio tries the next destination, which values would make the second INVITE and its replies different from the first INVITE and its replies?
The To-Tag and CSeq should be different right? Any other values which Kamailio perhaps uses internally to identify/associate messages? Are these values accessible?
The reason I'm asking this is because I want to log each INVITE tried as a separate call in our database and use SIP replies and in-dialog requests to update its state, but I'm doing this based on the CallID.
For this to work, I need another value to make each INVITE (which have the same CallID, in case of Failover) unique.
The requirements are that these values must be present for each message in a dialog.
I hope I'm being clear enough.
Regards,
Grant
Hi,
I am looking to track calls so I can see which carrier they went over. I am
using the LCR module to distribute calls but the CDR module doesn't tell me
the final destination IP where the call was sent.
Any help or advice would be appreciated.
Thanks,
Keith
Also I would like to try and store these numbers in a the DB somehow to
minimise code.
Keith
On Thu, Oct 3, 2013 at 1:40 PM, <sr-users-request(a)lists.sip-router.org>wrote:
> Send sr-users mailing list submissions to
> sr-users(a)lists.sip-router.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> or, via email, send a message with subject or body 'help' to
> sr-users-request(a)lists.sip-router.org
>
> You can reach the person managing the list at
> sr-users-owner(a)lists.sip-router.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of sr-users digest..."
>
>
> Today's Topics:
>
> 1. Destination number restriction (Keith)
> 2. Re: append_hf to reply generated by kamailio (Grant Bagdasarian)
> 3. Re: append_hf to reply generated by kamailio (Grant Bagdasarian)
> 4. Re: append_hf to reply generated by kamailio (Klaus Darilion)
> 5. Re: Destination number restriction (Morten Isaksen)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 3 Oct 2013 11:14:10 +0100
> From: Keith <keith(a)hubner.co.uk>
> To: "SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -
> Users Mailing List" <sr-users(a)lists.sip-router.org>
> Subject: [SR-Users] Destination number restriction
> Message-ID:
> <CAK7Ybu8=
> JNk+P4ASeB66XP6_3jUqxO1jhQBiPvAbDoEg5gjeDQ(a)mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
>
> I am looking to restrict calls based on destination numbers, e.g. so people
> can't call premium rate etc. Which module is best to achieve this?
>
> Thanks,
> Keith
>
Thanks Morten,
So basically it's saying, if it matches that number and the user does not
have the permission to call it then block. I am a bit unclear of the AVP
stuff to be honest, is this trying to match the username to the attribute
in the table? And what value does it look for in the table?
Thanks,
Keith
On Thu, Oct 3, 2013 at 1:40 PM, <sr-users-request(a)lists.sip-router.org>wrote:
> Send sr-users mailing list submissions to
> sr-users(a)lists.sip-router.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> or, via email, send a message with subject or body 'help' to
> sr-users-request(a)lists.sip-router.org
>
> You can reach the person managing the list at
> sr-users-owner(a)lists.sip-router.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of sr-users digest..."
>
>
> Today's Topics:
>
> 1. Destination number restriction (Keith)
> 2. Re: append_hf to reply generated by kamailio (Grant Bagdasarian)
> 3. Re: append_hf to reply generated by kamailio (Grant Bagdasarian)
> 4. Re: append_hf to reply generated by kamailio (Klaus Darilion)
> 5. Re: Destination number restriction (Morten Isaksen)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 3 Oct 2013 11:14:10 +0100
> From: Keith <keith(a)hubner.co.uk>
> To: "SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -
> Users Mailing List" <sr-users(a)lists.sip-router.org>
> Subject: [SR-Users] Destination number restriction
> Message-ID:
> <CAK7Ybu8=
> JNk+P4ASeB66XP6_3jUqxO1jhQBiPvAbDoEg5gjeDQ(a)mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
>
> I am looking to restrict calls based on destination numbers, e.g. so people
> can't call premium rate etc. Which module is best to achieve this?
>
> Thanks,
> Keith
>
Hi,
I am looking to restrict calls based on destination numbers, e.g. so people
can't call premium rate etc. Which module is best to achieve this?
Thanks,
Keith
Hello,
Is it possible to append a new header to a reply generated by Kamailio and also have it present when duplicating the message to a capture server?
At the moment the 603 Reply is duplicated to my capture server, but I don't know how to append a new header, because the kamailio script stops executing after exit is called.
>From what I understood: onreply_route is only executed when receiving replies.
Is there a reply_route which is executed for all replies, including the ones generated by kamailio itself?
For instance inside this code block:
request_route {
.....
if($var(routing_query_result) =~ "DESTINATION_NOT_ALLOWED") {
xlog("L_INFO", "[R-CORE-INCOMING-INVITE:$ci] !>" "Rejecting the call, because the destination is not allowed\r\n");
sl_send_reply("603", "Decline");
exit;
}
.....
}
Hello,
I'm trying to replace the value of a custom header in the failure_route, using the subst function.
subst('/^X-Dispatcher:(.+)$/"X-Dispatcher: \$(avp(dsattrs){param.value,dispatcher})"/i');
I also tried it with the subst_hf, but that didn't work either.
I'm getting the following message:
5(19536) DEBUG: <core> [re.c:454]: subst_run(): subst_run: running. r=1
5(19536) DEBUG: textops [textops.c:681]: subst_f(): lst was (nil)
Does anyone have an idea what I'm doing wrong here? I'm not a regex expert, so I'm guessing there is an error in the pattern.
Regards,
Grant
Hi,
I am looking to add some scripting to Kamailio so I can set my own
variables and configure from my own web page. Anyone point me in the right
direction?
Thanks,
Keith
Im trying to enable xcap service on kamailio. I would like to know if it
possible work as show in the video.
Thanks for any leads how to get it works as same as the youtube video below.
https://www.youtube.com/watch?v=3laTBL6NnbE
--
Kethzer Docteur