Daniel,

    I believe to have located the issue -- my apologies for not updating this thread however I wanted to confirm its resolution.  It appears that there was an email that went out stating to take out km_append_branch / append_branch from failure route.  It was appending two branches, one when I updated $ru and another after I did append_branch.  Taking out the append_branch call resolved the issue.

Sincerely,
Brandon Armstead

On Wed, Dec 14, 2011 at 1:36 AM, Daniel-Constantin Mierla <miconda@gmail.com> wrote:
Hello,


On 12/14/11 1:14 AM, Brandon Armstead wrote:
Hello,

   I am running into a problem where I am experiencing duplicated INVITE's being originated from Kamailio proxy.

U 2011/12/13 23:58:17.543802 KAMAILIO:5060 -> PSTN:5060
INVITE sip:URI@PSTN SIP/2.0.

U 2011/12/13 23:58:17.543840 KAMAILIO:5060 -> PSTN:5060
INVITE sip:URI@PSTN SIP/2.0.

As you can see that the timestamp between the two invites is literally a fraction of seconds.

There is no failure condition that is causing this with append_branch

There is no retransmission timer issue that is causing this (using default timing):

modparam("tm", "retr_timer1", 500)
modparam("tm", "retr_timer2", 4000)

Any thoughts / ideas - as this is causing a race condition in which there is a 200 OK that is being sent back from upstream -- and we are then CANCELING the 2nd INVITE which is essentially causing on overall problem with the call.

Thanks for all help / thoughts / input in advance, thanks!
if there is a CANCEL for second INVITE, then it is parallel forking with two branches. If you can provide ngrep with the INVITEs, I can confirm it properly. Can you check there are not two contacts in usrloc?

Cheers,
Daniel

--
Daniel-Constantin Mierla -- http://www.asipto.com
http://linkedin.com/in/miconda -- http://twitter.com/miconda