Sipsorcery gives up trying sip providers

Discussions about using SIP Sorcery on your own computer/server
Post Reply
dig12345
Posts: 17
Joined: Thu Aug 05, 2010 8:01 pm

Sipsorcery gives up trying sip providers

Post by dig12345 » Tue Mar 15, 2011 12:57 am

I have a few users on my sipsorcery box. Sometimes my WAN connection goes down for a minute or two. After it comes back up, the sipprovider bindings are stuck in error state and I have to manually log in as each user to re-enable the Register flag. Is there a workaround to get sipsorcery to clear the error on each user's sipprovider bindings and attempt to re-register them. Restarting the service does not help, I have to actually login to the gui as each user and manual update the flag. I've tried SQL queries like the following but no dice, Is there a different way to go about this?

UPDATE `sipproviders`
SET registerenabled=1, registerdisabledreason=NULL
WHERE registerdisabledreason IS NOT NULL;

Aaron
Site Admin
Posts: 4652
Joined: Thu Jul 12, 2007 12:13 am

Re: Sipsorcery gives up trying sip providers

Post by Aaron » Tue Mar 15, 2011 1:19 am

There are two updates required. You've got the first one. The seond one is that for each provider that you want to re-enable a row needs to be added to the SIPProviderBindings table. The SIPProviderBindings table is the main one the registration agents works off. I'll get the insert statement for you this evening. Give me a reminder if it doesn't appear within 12 or so hours.

Aaron
Site Admin
Posts: 4652
Joined: Thu Jul 12, 2007 12:13 am

Re: Sipsorcery gives up trying sip providers

Post by Aaron » Tue Mar 15, 2011 11:20 am

The insert statement to recreate the SIP Provider bindings is of the form:

Code: Select all

insert into sipproviderbindings (id, providerid, owner, providername, nextregistrationtime, bindingexpiry, bindinguri, cseq) values ('fa9b3939-394b-4783-b73a-859b68f4b5cf', '089f6326-a630-442b-9523-12d237a0bde5', 'owner', 'providername', '2011-03-15T11:13:01+00:00', 3600, 'sip:user@sipsorcery.com', 0)
id - Must be a GUID and you can generate them using http://www.guidgenerator.com/online-guid-generator.aspx,
providerid - must match the id of the provider the binding is being created for,
owner - the username of the user that owns the provider,
providername - the name of the provider the binding is being created for,
nextregistrationtime - this dictates when the Registration Agent will next attempt to register. Use the format as specified in the example. You can set the time in the past to force an immediate registration attempt,
bindingexpiry - set to 3600. Will get updated at registration time if the provider has a different value,
bindinguri - the registration contact on the provider,
cseq - set to 0.

Post Reply