From 6eb1dbffd34e91d7780d6391acbc382819144ca5 Mon Sep 17 00:00:00 2001 From: Jon Bonilla Date: Thu, 1 Aug 2013 17:40:15 +0200 Subject: [PATCH] Send Via based on SIPFILE instead of autogeneated -i option prevents Via from being generated. Now we generate it in SIPFILE. This prevents hostname looking for the Via header and we can use [% sip_int_ips.0 %] for it BRANCH for the Via header is autogenerated by UUIDGEN command -l 5081 forces the source port for sending requests to be that one -S forces symetric mode and makes Sipsak listen in the same 5081 port --- vmnotify | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vmnotify b/vmnotify index f441e5a..f6d1bc3 100755 --- a/vmnotify +++ b/vmnotify @@ -77,7 +77,8 @@ BODY_VM="Voice-Message: $NEW/$OLD" BODYLEN=$((${#BODY_MW}+2+${#BODY_VM}+2)) CALL_ID=$($UUIDGEN)@voip.sipwise.local MBID=$USER +BRANCH=$($UUIDGEN) -$SIPSAK -f $SIPFILE \ - -G -g "!BODY_MW!$BODY_MW!BODY_VM!$BODY_VM!BODYLEN!$BODYLEN!CALL_ID!$CALL_ID!MBID!$MBID!" \ +$SIPSAK -f -i -l 5081 -S $SIPFILE \ + -G -g "!BODY_MW!$BODY_MW!BODY_VM!$BODY_VM!BODYLEN!$BODYLEN!CALL_ID!$CALL_ID!MBID!$MBID!BRANCH!$BRANCH!" \ $VERBOSE -E udp -s $URI