[asterisk-dev] Code Support request for IAX provider sending registration refreshes of 0

James Trix jamestrix at gmail.com
Fri Nov 3 03:44:28 MST 2006


Hello list

I have been trying to work out why my registration to my provider
keeps getting droped every few seconds and all my inbound calls go to
the providers voicemail. After some traceing and some googleing I
found the problem.

Tx-Frame Retry[000] -- OSeqno: 001 ISeqno: 001 Type: IAX     Subclass: REGREQ
   Timestamp: 00320ms  SCall: 00002  DCall: 00393 [202.148.48.108:4569]
   USERNAME        : XXXXXXXXXXX
   REFRESH         : 60
   MD5 RESULT      : XXXXXXXXXXX

Rx-Frame Retry[ No] -- OSeqno: 001 ISeqno: 002 Type: IAX     Subclass: REGACK
   Timestamp: 00313ms  SCall: 00393  DCall: 00002 [202.148.48.108:4569]
   USERNAME        : XXXXXXXXXXX
   DATE TIME       : 2006-10-29  12:49:58
   REFRESH         : 0
   APPARENT ADDRES : IPV4 58.106.XX.X:4569

The provider sends a REFRESH : 0 so asterisk does not reregister the
connection again.

As the provider does not seem willing to fix this I throught that only
way to fix it would be to
compile some code. The problem is I am not a coder so I can't fix this
my self so I was wondering if there where any kind devloeprs out there
that would be able to help me patch the code so that I could fix this
problem.

what I through to do was that if a refresh was sent as 0 from the
provider hard code that to be a refesh of 60 seconds.


Looking at

asterisk.org/doxygen/chan__iax2_8c-source.html

I can see the code check so if some one has time, do you think you
could code a line to support a auto refesh of 60 if 0 is passed from
the provider  or maybe give me a few clues on how else to fix the
problem

00417 struct iax2_registry {
00418    struct sockaddr_in addr;      /*!< Who we connect to for
registration purposes */
00419    char username[80];
00420    char secret[80];        /*!< Password or key name in []'s */
00421    char random[80];
00422    int expire;          /*!< Sched ID of expiration */
00423    int refresh;            /*!< How often to refresh */
00424    enum iax_reg_state regstate;
00425    int messages;           /*!< Message count, low 8 bits = new,
high 8 bits = old */
00426    int callno;          /*!< Associated call number if applicable */
00427    struct sockaddr_in us;        /*!< Who the server thinks we are */
00428    struct iax2_registry *next;
00429    struct ast_dnsmgr_entry *dnsmgr; /*!< DNS refresh manager */
00430 };

Thanks to any one who can spend a few minutes doing this.


More information about the asterisk-dev mailing list