Speed dial to post to url. Part of my Google voice 2014 workaround.
Roger:
Finally got this to work. I don't want to admit how long it took me. For me the problem was the User Defined Macro 0 "ExpandIn" parameter, which I had set to ALL, and wasn't valid on my obi. The obitalk portal doesn't show the third line, so I didn't notice it, but if you log into the Obi device and look at it there the third line shows "SyntaxCheckResult" and ALL does not PASS. I changed it to ANY and that shows PASS and now it works.
Thank you SO MUCH to giqcass and azrobert. This is simply amazing creativity on your parts.
Regarding Sipsorcery, Yes Aaron is a really nice and helpful guy, but the service wasn't working reliably for me, and with the Obi I didn't need to dialplan, which is one of the main features of sipsorcery.
Roger:
While I am able to initiate a callback using this method, I am not sure if it is working as it should be. Trying to understand the configURL it seems that the Obi should only sync when a different number is dialed. Mine syncs up based on the wait internal. If I set the weight interval at 5 it syncs up 11 times per minute and if I set the WAIT interval to 15 it syncs up 4 times per minute. Can anyone clarify this for me? I have tried to describe how I understand it below. Maybe that will help highlight any misunderstanding:
Starcode 30 is configured to assign a number to speed dial #99, so when you dial *2125551212 speed dial #99 is populated with 2125551212. User Defined Macro 0 (UDM0) is set to equal the value of speed dial #99. Beyond that the main thing to study is the ConfigURL (broken up into lines):
SET TPRM1 = $UDM0;
@loop IF ( $UDM0 == 00 ) GOTO redial;
SET TPRM2 = $UDM0;
GOTO checkit;
@redial SET TPRM2 = $TPRM1;
@checkit IF ( $TPRM1 != $UDM0 ) SYNC http://www.abc.org/gv.php?dialnum=$TPRM2;
SET TPRM1 = $UDM0;
WAIT 5;
GOTO loop;
Temprorary Macro 1 is set to User Defined Macro 0 the first time the Obi starts up.
Then a loop starts. It checks if redial (00) has bee pressed. If so, proceed to @redial.
Otherwise set Temporary Macro 2 to User Defined Macro 0.
So the first time a call is made Temporary Macro 2 will contain the number and Temporary Macro 1 will be blank because it has not been updated yet for the dialed number.
@checkit will find that Temporary Macro 1 will be blank and User Defined Macro 0 will have a number, so the Obi will SYNC and place the call.
The next line after @checkit sets Temporary Macro 1 to equal User Defined Macro 0, so the obi doesn't SYNC again.
azrobert:
Roger,
Do you just want to understand the script or is there something wrong?
Here is an explanation of the script:
$UDM0 is the current dialed number.
$TPRM1 is the last dialed number.
$TPRM2 contains the current dialed number or the last dialed number on a redial.
Forget about SYNC. It's just the syntax of the statement.
"SYNC http://www.abc.org/gv.php?dialnum=$TPRM2" executes the URL
"IF ( $TPRM1 != $UDM0 )" != is NOT EQUAL, so I'm checking if a new number has been dialed.
Therefore, the URL is only executed when the current number is not equal to the last number dialed.
You cannot repeat dial the same number, including the redial number.
If you do, the script will not recognize it because the $UDM0 will still be equal to $TPRM1.
The loop is basically doing nothing, except checking if you dialed a new number.
When it detects a new number, it executes the URL.
The wait is how long you want the script to pause before checking for a new number.
Roger:
I though there was something wrong because I included an email feature in my php code and I was getting 11 emails every minute, so the URL was getting executed every time through the loop. By trial and error I seem to have figured out that after you reboot the Obi you have to dial a number and then dial redial to get all the parameters filled in. After that the URL will only get executed when a call is placed. So everything seems fine now. Thanks again.
azrobert:
Roger,
What you describe shouldn't happen. The first command gets executed only on startup and sets TPRM1 to equal $UDM0, so the URL shouldn't be executed until you dial a new number. It also shouldn't matter if you set Method to Periodically instead of System Start. You would just execute the script additional times setting TPRM1 to $UDM0.
Even if there was a logic error on startup that I don't see, the script would only be executed once, because the next command sets TPRM1 to $UDM0. Maybe if Speed Dial #99 was set to a null value would cause a problem. I didn't test that condition.
I've been really busy the last few days. I'm trying to get a Raspberry Pi configured and I haven't had much time to spend on that project, so I probably won't look at this for awhile. Let me know if you discover anything.
Navigation
[0] Message Index
[#] Next page
[*] Previous page