marcelog / Nami

Asterisk manager interface (ami) client for nodejs
http://marcelog.github.com/Nami
Apache License 2.0
99 stars 59 forks source link

Title:sip qualify peer additional parameters #5

Closed agustinmiura closed 12 years ago

agustinmiura commented 12 years ago

If i am using asterisk 1.8.13 with realtime configuration and i have for example two sip trunks (foo1, foo2) . And i send new namiLib.Actions.SipQualifyPeer() i get : "[2012-09-19 15:18:39.865] [FATAL] Nami.App - Error cant execute sip qualify for the sip peer [2012-09-19 15:18:39.865] [INFO] console - debug - 'websocket writing' '5:::{"name":"errorOnSipQualify","args":[{"peer":"foo1"}]}' ". But if i use the following code with PAMI : (new CommandAction("sip qualify peer foo1 load")) And later i use the "sip qualify peer foo1" functions. Is it possible to send additional parameters with the "SipQualifyPeer" Action ?.

marcelog commented 12 years ago

Hey :D

I'm not sure about what you are doing. You are on one hand issuing a SipQualifyPeer action, but comparing it to the result of executing "sip qualify peer.." on the cli (which is what CommandAction does).

In the nami code, SipQualifyPeer action takes 1 argument (as the asterisk wiki states), which is "Peer". This should suit your needs.

If, on the other hand, you want to do more (like executing cli commands), use the command action.

Cheers!